1 2011-09-29 Iain Sandoe <iains@gcc.gnu.org>
3 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
6 2011-09-27 Ed Schonberg <schonberg@adacore.com>
8 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
9 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
10 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
12 * a-coorma.ads: Minor reformmating.
13 * einfo.ads: Improve the comment describing the
14 Directly_Designated_Type function.
15 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
17 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
20 2011-09-27 Robert Dewar <dewar@adacore.com>
22 * a-comutr.ads: Minor reformatting.
24 2011-09-27 Ed Schonberg <schonberg@adacore.com>
26 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
27 iterators to multiway trees.
29 2011-09-27 Yannick Moy <moy@adacore.com>
31 * debug.adb (d.D): New option for strict Alfa mode.
32 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
33 permissions as strictly as possible.
34 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
35 Alfa mode, now, interpret ranges of base types like GNAT does; in
36 strict mode, simply change the range of the implicit base Itype.
37 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
39 2011-09-27 Robert Dewar <dewar@adacore.com>
41 * exp_ch9.adb: Minor comment fixes.
43 2011-09-27 Ed Schonberg <schonberg@adacore.com>
45 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
48 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
50 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
51 instead of Directly_Designated_Type in the indirect array case.
53 2011-09-27 Robert Dewar <dewar@adacore.com>
55 * exp_util.adb, exp_aggr.adb: Minor reformatting.
57 2011-09-27 Ed Schonberg <schonberg@adacore.com>
59 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
60 on subtype declarations.
61 * exp_aggr.adb: Minor comment update.
63 2011-09-27 Eric Botcazou <ebotcazou@adacore.com>
65 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
66 test in the N_Explicit_Dereference case. Fold double logical
67 negation in the special loop case and conditionalize it on
68 Variable_Ref being true.
70 2011-09-27 Ed Schonberg <schonberg@adacore.com>
72 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
73 single protected object and the selector is a discriminant or an
74 entry family, this is a non-overloaded candidate interpretation,
75 and possible primitive operations of the type must not be
78 2011-09-27 Arnaud Charlet <charlet@adacore.com>
80 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
82 2011-09-27 Pascal Obry <obry@adacore.com>
84 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
85 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
86 Add dummy definitions for pthread_rwlock_t
87 and pthread_rwlockattr_t on all POSIX platforms.
88 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
90 (Finalize_Lock): Likewise.
91 (Write_Lock): Likewise.
94 2011-09-27 Tristan Gingold <gingold@adacore.com>
96 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
99 2011-09-27 Pascal Obry <obry@adacore.com>
101 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
102 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
103 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
104 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
105 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
106 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
107 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
108 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
109 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
110 s-taprop-posix.adb: Revert previous changes.
111 (Lock): Now a record containing the two possible lock
112 (mutex and read/write) defined in OS_Interface.
113 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
115 (Initialize_Protection): Likewise.
117 (Lock_Read_Only): Likewise.
120 2011-09-27 Pascal Obry <obry@adacore.com>
122 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
123 OS_Interface.pthread_rwlock_t.
125 2011-09-27 Robert Dewar <dewar@adacore.com>
127 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
128 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
129 sem_ch5.adb, sem_util.adb: Minor reformatting.
131 2011-09-27 Pascal Obry <obry@adacore.com>
133 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
134 (Finalize_Lock)[RW_Lock]: Likewise.
135 (Write_Lock)[RW_Lock]: Likewise.
136 (Unlock)[RW_Lock]: Likewise.
137 (Read_Lock): Define L as RW_Lock (instead of Lock).
138 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
139 routine for r/w lock.
140 (Finalize_Lock)[RW_Lock]: Likewise.
141 (Write_Lock)[RW_Lock]: Likewise.
142 (Unlock)[RW_Lock]: Likewise.
143 (Read_Lock): Define L as RW_Lock (instead of Lock).
145 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
146 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
147 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
148 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
149 routine for standard lock.
150 (Finalize_Lock)[RW_Lock]: Likewise.
151 (Write_Lock)[RW_Lock]: Likewise.
152 (Unlock)[RW_Lock]: Likewise.
153 (Read_Lock): Define L as RW_Lock (instead of Lock).
154 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
155 in the record definition.
156 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
157 lock for 'R' locking policy.
158 (Initialize_Protection): Likewise.
160 (Lock_Read_Only): Likewise.
162 * s-taspri-posix.ads (RW_Lock): New type defined as
163 OS_Interface.pthread_rwlock_t.
165 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
166 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
167 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
168 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
170 2011-09-27 Pascal Obry <obry@adacore.com>
172 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
174 2011-09-27 Pascal Obry <obry@adacore.com>
176 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
177 s-osinte-hpux.ads, s-osinte-irix.ads,
178 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
180 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
181 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
182 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
183 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
184 pthread_rwlock_destroy, pthread_rwlock_rdlock,
185 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
187 2011-09-27 Pascal Obry <obry@adacore.com>
189 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
190 (RE_Id): Add RE_Lock_Read_Only.
191 (RE_Unit_Table): Likewise.
192 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
193 to lift restriction on first character. Handle now the
194 Name_Concurrent_Readers_Locking where policy character is set to
196 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
198 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
199 read only lock for function in protected object.
200 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
201 this routine is now used.
203 2011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
205 * s-atocou-x86.adb (Decrement): Use %;.
206 (Increment): Likewise.
208 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
210 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
211 dereference of the pointer to the storage area. Remove useless type
212 conversions and factor out common code.
214 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
216 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
217 variable and use it throughout.
218 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
219 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
220 first step. Also convert to the unpadded type as a last step.
222 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
224 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
225 DECL_CHAIN in comment.
226 * gcc-interface/trans.c (gigi): Likewise.
227 (Attribute_to_gnu): Likewise.
228 (build_function_stub): Likewise.
229 (gnat_to_gnu): Likewise.
230 * gcc-interface/utils.c (create_subprog_decl): Likewise.
231 (convert_vms_descriptor64): Likewise.
232 (convert_vms_descriptor32): Likewise.
234 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
236 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
237 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
238 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
239 the type of the record is TYPE_READONLY.
241 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
242 Robert Dewar <dewar@adacore.com>
244 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
245 OUT formal parameter which is of an null-exclusion access subtype.
247 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
249 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
250 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
251 (gnat_to_gnu_param): Likewise.
252 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
253 maybe_unconstrained_array instead of doing the work manually.
254 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
255 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
256 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
257 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
258 (gnat_stabilize_reference): Likewise.
260 2011-09-26 Eric Botcazou <ebotcazou@adacore.com>
262 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
263 (SET_TYPE_NULL_BOUNDS): Likewise.
264 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
265 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
266 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
268 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
269 check that the initializer is a valid constant expression for use in
270 initializing a static variable. Add missing guard.
271 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
272 (convert_to_fat_pointer): In the null fat pointer case, build a valid
273 pointer for the bounds.
274 * gcc-interface/utils2.c (compare_fat_pointers): New function.
275 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
277 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
279 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
280 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
281 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
282 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
283 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
284 to the indirect case.
285 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
286 the TREE_THIS_NOTRAP flag.
288 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
290 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
291 iteration scheme, always generate the do-while form if optimization
292 is enabled. Use more straightforward test at the end.
294 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
296 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
297 XNEW instead of xmalloc. Do not build useless pointer type.
298 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
299 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
300 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
302 2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
304 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
305 the alignment if this doesn't prevent BLKmode access to the object.
307 2011-09-24 Iain Sandoe <iains@gcc.gnu.org>
309 * gcc-interface/Makefile.in (darwin): Do not issue the
310 '-flat_namespace' linker flag during Ada build.
311 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
312 default shared library options.
314 2011-09-19 Alexandre Oliva <aoliva@redhat.com>
316 * gcc-interface/decl.c (annotate_value): Look up expression for
317 insertion in the cache at the end.
319 2011-09-19 Arnaud Charlet <charlet@adacore.com>
321 * gcc-interface/Make-lang.in: Update dependencies.
323 2011-09-19 Steve Baird <baird@adacore.com>
325 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
326 configuration pragma names so that Is_Configuration_Pragma_Name
327 will return True for Name_Annotate. Make corresponding change in
328 Pragma_Id enumeration type. This is needed to allow an Annotate
329 pragma to occur in a configuration pragma file (typically,
331 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
332 * gnat_rm.texi: Note that pragma Annotate may be used as a
333 configuration pragma.
335 2011-09-19 Ed Schonberg <schonberg@adacore.com>
337 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
338 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
340 2011-09-19 Yannick Moy <moy@adacore.com>
342 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
343 for expansion of set membership.
344 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
345 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
346 visible for use in Alfa expansion.
347 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
348 variable in Alfa mode.
350 2011-09-19 Thomas Quinot <quinot@adacore.com>
352 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
354 2011-09-19 Thomas Quinot <quinot@adacore.com>
356 * exp_ch9.adb: Minor reformatting.
358 2011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
360 * freeze.adb (Build_Renamed_Body): Generic subprograms
361 instantiations cannot be poperly inlined by the compiler, do
362 not set the Body_To_Inline attribute in such cases.
363 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
364 inlining-related flags from the generic subprogram declaration.
366 2011-09-19 Thomas Quinot <quinot@adacore.com>
368 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
369 (Build_Stub_Type): Remove, instead copy components from
370 System.Partition_Interface.RACW_Stub_Type.
371 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
372 (Copy_Component_List): New subprogram.
374 2011-09-19 Yannick Moy <moy@adacore.com>
376 * lib-xref.adb (Generate_Reference): Ignore references to
377 constants in Standard.
379 2011-09-19 Robert Dewar <dewar@adacore.com>
381 * err_vars.ads, errout.ads: Minor reformatting.
383 2011-09-19 Robert Dewar <dewar@adacore.com>
385 * aspects.ads (Impl_Defined_Aspects): New array
386 * lib-writ.adb (No_Dependences): New name for No_Dependence
387 * restrict.adb (No_Dependences): New name for No_Dependence
388 (Check_Restriction_No_Specification_Of_Aspect): New
390 (Set_Restriction_No_Specification_Of_Aspect): New procedure
391 (Restricted_Profile_Result): New variable
392 (No_Specification_Of_Aspects): New variable
393 (No_Specification_Of_Aspect_Warning): New variable
394 * restrict.ads (No_Dependences): New name for No_Dependence
395 (Check_Restriction_No_Specification_Of_Aspect): New procedure
396 (Set_Restriction_No_Specification_Of_Aspect): New procedure
397 * s-rident.ads: Add restriction
398 No_Implementation_Aspect_Specifications, this is also added to
399 the No_Implementation_Extensions profile.
400 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
401 No_Implementation_Defined_Aspects
402 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
403 * sem_prag.adb (Analyze_Aspect_Specifications): Check
404 No_Implementation_Aspects
405 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
406 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
408 2011-09-19 Yannick Moy <moy@adacore.com>
410 * lib-xref.adb (Generate_Reference): Take into account multiple
411 renamings for Alfa refs.
413 2011-09-19 Thomas Quinot <quinot@adacore.com>
415 * g-socthi-mingw.adb: Minor reformatting.
417 2011-09-19 Yannick Moy <moy@adacore.com>
419 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
420 expansion to False in mode Alfa
422 2011-09-19 Pascal Obry <obry@adacore.com>
424 * mingw32.h: Remove obsolete code needed for old versions
427 2011-09-19 Robert Dewar <dewar@adacore.com>
429 * errout.ads: Minor reformatting.
431 2011-09-19 Ed Schonberg <schonberg@adacore.com>
433 * sem_ch6.adb (Analyze_Expression_Function): When the expression
434 function is transformed into a declaration and a body, insert
435 body at the end of the declarative part, to prevent premature
436 freeze actions, and preserve original specification in the
437 subprogram declaration.
439 2011-09-19 Vincent Celier <celier@adacore.com>
441 * projects.texi: Minor editing.
443 2011-09-19 Robert Dewar <dewar@adacore.com>
445 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
446 exp_aggr.adb: Minor reformatting.
448 2011-09-19 Yannick Moy <moy@adacore.com>
450 * lib-xref.adb (Generate_Reference): Change entity referenced
451 to underlying object if any, or else reference to the HEAP.
453 2011-09-15 Arnaud Charlet <charlet@adacore.com>
455 * gcc-interface/Make-lang.in: Update dependencies.
457 2011-09-15 Robert Dewar <dewar@adacore.com>
459 * tree_io.ads: Minor reformatting.
460 * a-intnam.ads: Fix bad header.
462 2011-09-15 Thomas Quinot <quinot@adacore.com>
464 * a-exexpr-gcc.adb: Minor reformatting.
466 2011-09-15 Yannick Moy <moy@adacore.com>
468 * sem_ch6.adb: Propagate information that an expression function comes
469 from source (otherwise references to this entity are not stored).
471 2011-09-15 Robert Dewar <dewar@adacore.com>
473 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
474 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
475 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
477 2011-09-15 Ed Schonberg <schonberg@adacore.com>
479 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
480 if the expression function is not a completion, create a
481 new specification for the generated declaration, and keep the
482 original specification in the generated body. Shorter code also
483 ensures that proper warnings are generated for unused formals
486 2011-09-15 Sergey Rybin <rybin@adacore.com>
488 * tree_io.ads: Update ASIS_Version_Number because of the changes
489 in the tree structures for expression functions.
491 2011-09-15 Arnaud Charlet <charlet@adacore.com>
493 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
494 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
495 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
496 (CLOCK_REALTIME): Fix wrong value on some OSes.
497 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
499 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
501 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
502 to unconstrained array case, deal with each branch of a COND_EXPR.
503 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
504 a COND_EXPR in the initializer, if present.
506 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
508 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
509 of an addressable type.
510 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
511 Deal with those cases for which creating a temporary is mandatory.
513 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
515 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
516 this is a real formal parameter before testing whether it is by ref.
518 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
520 * gcc-interface/gigi.h (build_call_0_expr): Delete.
521 (build_call_1_expr): Likewise.
522 (build_call_2_expr): Likewise.
523 (build_call_n_expr): New prototype.
524 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
525 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
526 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
527 (Exception_Handler_to_gnu_zcx): Likewise.
528 (gnat_to_gnu): Likewise.
529 (build_binary_op_trapv): Likewise.
530 * gcc-interface/utils2.c (build_call_0_expr): Delete.
531 (build_call_1_expr): Likewise.
532 (build_call_2_expr): Likewise.
533 (build_call_n_expr): New function.
534 (build_call_raise): Use build_call_n_expr.
535 (build_call_raise_range): Likewise.
536 (build_call_raise_column): Likewise.
537 (build_call_alloc_dealloc_proc): Likewise.
538 (maybe_wrap_malloc): Likewise.
539 (maybe_wrap_free): Likewise.
541 2011-09-11 Eric Botcazou <ebotcazou@adacore.com>
543 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
545 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
546 the result type is null if ENABLE_CHECKING. Set operation_type at the
547 end unconditionally if not set in the previous cases.
548 Use build2 and void_type_node for MODIFY_EXPR.
549 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
551 2011-09-08 Eric Botcazou <ebotcazou@adacore.com>
553 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
554 precision when converting to or from an integral type whose precision
555 is not equal to its size.
557 2011-09-08 Iain Sandoe <iains@gcc.gnu.org>
559 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
561 2011-09-07 Iain Sandoe <iains@gcc.gnu.org>
563 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
565 * system-darwin-ppc64.ads: New file.
567 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
569 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
572 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
574 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
575 size switches to the link phase for shared libs.
577 2011-09-06 Iain Sandoe <iains@gcc.gnu.org>
579 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
580 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
582 2011-09-06 Arnaud Charlet <charlet@adacore.com>
584 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
585 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
586 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
588 (TOOLS_FLAGS_TO_PASS): New.
589 (../stamp-tools): Reintroduce, to avoid merge conflicts.
591 2011-09-06 Robert Dewar <dewar@adacore.com>
593 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
594 name for Is_RM_Defined_Unit. Also several fixes to this unit.
596 2011-09-06 Robert Dewar <dewar@adacore.com>
598 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
599 * s-rident.ads: New restriction No_Implementation_Units
600 (this restriction is also part of the profile
601 No_Implementation_Extensions)
602 * sem_ch10.adb (Analyze_With_Clause): Add check for
603 No_Implementation_Units restriction.
605 2011-09-06 Jerome Guitton <guitton@adacore.com>
607 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
610 2011-09-06 Thomas Quinot <quinot@adacore.com>
612 * s-solita.adb: Minor reformatting.
614 2011-09-06 Ed Schonberg <schonberg@adacore.com>
616 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
617 is a rewriting of an expression function does not freeze previous
620 2011-09-06 Robert Dewar <dewar@adacore.com>
622 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
624 2011-09-06 Tristan Gingold <gingold@adacore.com>
626 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
627 powerpc-wrs-vxworksae.
629 2011-09-06 Thomas Quinot <quinot@adacore.com>
631 * s-os_lib.ads (Spawn): Minor documentation clarification,
632 Success is True for a zero exit status.
634 2011-09-06 Ed Schonberg <schonberg@adacore.com>
636 * sem_ch5.adb: Add message for common iterator error.
638 2011-09-06 Ed Schonberg <schonberg@adacore.com>
640 * exp_ch3.adb (Build_Initialization_Call): If the target is a
641 selected component discriminated by a current instance, replace
642 the constraint with a reference to the target object, regardless
643 of whether the context is an init_proc.
645 2011-09-06 Robert Dewar <dewar@adacore.com>
647 * exp_attr.adb: Descriptor_Size is never static.
649 2011-09-06 Robert Dewar <dewar@adacore.com>
651 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
653 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
655 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
658 2011-09-06 Ed Schonberg <schonberg@adacore.com>
660 * sem_res.adb (Resolve): An expression that is the body of an
661 expression function does not freeze.
663 2011-09-06 Matthew Heaney <heaney@adacore.com>
665 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
666 a-cuprqu.adb: Changed copyright notice to indicate current
669 2011-09-06 Vincent Celier <celier@adacore.com>
671 * prj.adb: Minor spelling error fix in comment
672 * sem_res.adb: Minor reformatting
674 2011-09-06 Pascal Obry <obry@adacore.com>
676 * sysdep.c (winflush_nt): Removed as not needed anymore.
677 (winflush_95): Likewise.
678 (winflush_init): Likewise.
679 (winflush_function): Likewise.
680 (getc_immediate_common): Remove call to winflush_function.
682 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
684 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
685 processing for Descriptor_Size.
686 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
687 to account for its broader usage.
688 * sem_attr.adb (Analyze_Attribute): Change the error detection
689 circuitry for Descriptor_Size as the attribute is now applicable
692 2011-09-06 Robert Dewar <dewar@adacore.com>
694 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
696 2011-09-06 Ed Schonberg <schonberg@adacore.com>
698 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
699 in a parameter association must not set the Referenced flag on
701 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
703 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
705 * gnat_rm.texi: Add a section on attribute Descriptor_Size
707 2011-09-06 Arnaud Charlet <charlet@adacore.com>
709 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
710 gnatlink-re): Speed up by using -j0.
712 2011-09-06 Yannick Moy <moy@adacore.com>
714 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
715 Set_Corresponding_Aspect when creating pragma from aspect.
716 (Add_Predicates): Use new field Corresponding_Aspect.
717 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
718 name when present, for the purpose of issuing error messages;
719 remove local procedure Error_Pragma_Arg_Alternate_Name.
720 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
722 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
725 2011-09-06 Robert Dewar <dewar@adacore.com>
727 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
729 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
731 * exp_ch6.adb (Build_Heap_Allocator): Add new
732 local variable Desig_Typ. Code and comment reformatting. Add
733 machinery to ensure that the allocation uses a fat pointer when
734 the type of the return object is a constrained array and the
735 function return type is an unconstrained array.
737 2011-09-06 Vincent Celier <celier@adacore.com>
739 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
740 parameters in subprograms.
742 2011-09-06 Arnaud Charlet <charlet@adacore.com>
744 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
746 2011-09-06 Thomas Quinot <quinot@adacore.com>
748 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
749 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
751 (System.Tasking.Primitive_Operations.Specific.Set): If argument
752 is null, destroy task specific data, to make API consistent with
753 other platforms, and thus compatible with the shared version
755 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
756 Document the above assumption.
758 2011-09-06 Ed Schonberg <schonberg@adacore.com>
760 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
761 variable for type of return value when return type is
762 unconstrained and context is an assignment.
764 2011-09-06 Ed Schonberg <schonberg@adacore.com>
766 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
767 class-wide operation if expansion is not enabled.
769 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
771 * checks.adb (Apply_Scalar_Range_Check): Deal with access
774 2011-09-06 Yannick Moy <moy@adacore.com>
776 * sem_ch13.adb (Analyze_Aspect_Specifications, case
777 Aspect_Invariant): Do not issue error at this point on illegal
778 pragma placement, as this is checked later on when analyzing
779 the corresponding pragma.
780 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
781 similar to Error_Pragma_Arg, except the source name of the
782 aspect/pragma to use in warnings may be equal to parameter
783 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
784 message to distinguish source name of pragma/aspect, and whether
785 the illegality resides in the type being public, or being private
786 without a public declaration
788 2011-09-06 Thomas Quinot <quinot@adacore.com>
790 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
791 size check (fd_set is implemented differently on that platform).
793 2011-09-06 Thomas Quinot <quinot@adacore.com>
795 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
796 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
797 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
798 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
799 (ATCB_Allocation): New subpackage of
800 System.Tasking.Primitive_Operations, shared across all targets
801 with full tasking runtime.
802 (ATCB_Allocation.New_ATCB): Moved there (from target specific
804 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
805 taking care of establishing a local temporary ATCB if the one
806 being deallocated is Self, to avoid a reference to the freed
807 ATCB in Abort_Undefer.
809 2011-09-06 Thomas Quinot <quinot@adacore.com>
811 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
812 terminated, mark it for deallocation upon termination.
813 (Terminate_Task): Call Free_Task again if the task is marked
814 for automatic deallocation upon termination.
816 2011-09-06 Robert Dewar <dewar@adacore.com>
818 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
819 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
820 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
821 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
822 a-intnam-solaris.ads, a-intnam-tru64.ads,
823 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
824 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
825 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
826 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
827 * s-rident.ads: Add new restriction No_Implementation_Identifiers
828 Add new profile No_Implementation_Extensions
829 * sem_prag.adb: Implement pragma Implementation_Defined Implement
830 profile No_Implementation_Extensions
831 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
832 Check violation of restriction No_Implementation_Identifiers
833 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
834 Add entry for Name_No_Implementation_Extensions
836 2011-09-06 Robert Dewar <dewar@adacore.com>
838 * impunit.ads: Minor reformatting.
840 2011-09-06 Robert Dewar <dewar@adacore.com>
842 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
844 2011-09-06 Pascal Obry <obry@adacore.com>
846 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
849 2011-09-06 Robert Dewar <dewar@adacore.com>
851 * g-socket.adb: Minor reformatting
853 2011-09-06 Javier Miranda <miranda@adacore.com>
855 * ali.adb (Scan_ALI): Add missing support to load references of
856 entities imported from other languages.
857 * ali.ads (Xref_Record): Adding new fields to store the language and
858 name of an imported entity.
859 * lib-xref.adb (Output_Import_Export_Info): Fix typo
862 2011-09-06 Ed Schonberg <schonberg@adacore.com>
864 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
865 is allowed on a full type declaration if it is the completion of
866 a private declarations.
867 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
868 aspect is allowed on a full type declaration in the private part
871 2011-09-06 Robert Dewar <dewar@adacore.com>
873 * sem_ch8.ads: Minor reformatting
875 2011-09-06 Thomas Quinot <quinot@adacore.com>
877 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
878 Guard against socket values that are not in [0;FD_SETSIZE[
880 2011-09-06 Robert Dewar <dewar@adacore.com>
882 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
885 2011-09-06 Arnaud Charlet <charlet@adacore.com>
887 * s-linux-alpha.ads: Minor reformatting
888 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
889 Use sizeof instead of corresponding C defines in s-oscons template.
891 2011-09-06 Vadim Godunko <godunko@adacore.com>
893 * a-convec.ads, a-iteint.ads: Minor reformatting.
895 2011-09-06 Vincent Celier <celier@adacore.com>
897 * projects.texi: Add menus and @node lines.
899 2011-09-06 Ed Schonberg <schonberg@adacore.com>
901 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
902 where the return type is an unconstrained array and the context
903 is an assignment. Optimize the case when the target of the
904 assignment is a selected component.
906 2011-09-06 Arnaud Charlet <charlet@adacore.com>
908 * s-solita.adb: Update comments.
910 2011-09-06 Pascal Obry <obry@adacore.com>
912 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
913 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
914 * s-oscons-tmplt.c: Add support for generating pthread related
915 types size on GNU/Linux as done for Darwin.
916 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
918 2011-09-06 Robert Dewar <dewar@adacore.com>
920 * exp_ch6.adb: Fix minor typo.
922 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
924 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
925 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
926 (Double_Size_Of): Alphabetized. Update the comment on usage.
927 (Make_Finalize_Address_Stmts): Update comments and reformat code.
928 (Nearest_Multiple_Rounded_Up): New routine.
929 (Size_Of): Update comment on usage. The generated expression now
930 accounts for alignment gaps by rounding the size of the type to the
931 nearest multiple rounded up of the type's alignment.
933 2011-09-06 Robert Dewar <dewar@adacore.com>
935 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
937 2011-09-06 Steve Baird <baird@adacore.com>
939 * exp_ch4.adb (Expand_Allocator_Expression): Look through
940 derived subprograms in checking for presence of an
941 Extra_Accessibility_Of_Result formal parameter.
942 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
943 checking for presence of an Extra_Accessibility_Of_Result formal
945 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
946 case where the Parameter_Associatiations attribute is already set,
947 but set to an empty list.
948 (Needs_Result_Accessibility_Level):
949 Unconditionally return False. This is a temporary
950 change, disabling the Extra_Accessibility_Of_Result
952 (Expand_Simple_Function_Return): Check for
953 Extra_Accessibility_Of_Result parameter's presence instead of
954 testing Ada_Version when generating a runtime accessibility
955 check which makes use of the parameter.
957 2011-09-06 Ed Schonberg <schonberg@adacore.com>
959 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
960 expression in a given case alternative must be attached to the
961 statement list of the ccrresponding case statement alternative
962 They cannot be propagated ahead of the case statement, because
963 the validity of the expression that generated the action may
964 hold only for that alternative.
966 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
968 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
969 (Alignment_Of): Remove the code for strict alignment targets.
970 (Double_Alignment_Of): Removed.
971 (Double_Size_Of): New routine.
972 (Make_Finalize_Address_Stmts): Change the
973 calculation of the dope's size. Update relevant comments.
974 (Size_Of): New routine.
976 2011-09-06 Steve Baird <baird@adacore.com>
978 * einfo.ads (Extra_Accessibility): Update associated comment to use
979 the term "present" correctly ("present" just means that it is not
980 an error to query the value of the attribute - it does not imply
981 that the value must be non-null).
982 (Extra_Constrained): Ditto.
983 (Is_Visible_Formal): Ditto.
984 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
985 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
986 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
987 * exp_ch6.adb (Expand_Call): The callee may require an
988 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
989 < Ada_2012. This can occur if the callee is exported from a Gnat
990 runtimes unit. Also improve a comment.
992 2011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
994 * exp_ch7.adb: Add with and use clauses for Get_Targ.
995 (Alignment_Of): Rename formal parameter Some_Typ
996 to Typ, update related comment. Use the allocator alignment on
997 strict alignment targets such as SPARC.
998 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
1001 2011-09-06 Gary Dismukes <dismukes@adacore.com>
1003 * sem_ch9.adb (Check_Interfaces): Test
1004 Is_Limited_Type rather than Is_Limited_Record when checking that
1005 the partial view of a synchronized full view must be limited.
1007 2011-09-06 Emmanuel Briot <briot@adacore.com>
1009 * g-comlin.adb (Free): Fix memory leak.
1011 2011-09-06 Robert Dewar <dewar@adacore.com>
1013 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
1015 2011-09-06 Steve Baird <baird@adacore.com>
1017 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
1018 (Ada2012) cases described in AI05-0234 where the accessibility
1019 level of a function result is "determined by the point of
1020 call", an implicit parameter representing that accessibility
1021 level is passed in. Extra_Accessibilty_Of_Result yields this
1022 additional formal parameter. Extra_Accessibility_Of_Result
1023 is analogous to the existing Extra_Accessibility
1024 function used in the implementation of access parameters.
1025 (Set_Extra_Accessibility_Of_Result): New procedure; sets
1026 Extra_Accessibility_Of_Result attribute.
1027 * einfo.adb (Extra_Accessibility_Of_Result): New function.
1028 (Set_Extra_Accessibility_Of_Result): New procedure.
1029 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
1030 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
1031 an accessibility level literal to Natural; introduce a nested
1032 function, Make_Level_Literal, to do this.
1033 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
1034 determines whether a given function (or access-to-function
1035 type) needs to have an implicitly-declared accessibility-level
1036 parameter added to its profile.
1037 (Add_Extra_Actual_To_Call): Export an existing procedure which was
1038 previously declared in the body of Exp_Ch6.
1039 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
1041 (Has_Unconstrained_Access_Discriminants): New Function; a
1042 predicate on subtype entities which returns True if the given
1043 subtype is unconstrained and has one or more access discriminants.
1044 (Expand_Call): When expanding a call to a function which takes an
1045 Extra_Accessibility_Of_Result parameter, pass in the appropriate
1046 actual parameter value. In the case of a function call which is
1047 used to initialize an allocator, this may not be possible because
1048 the Etype of the allocator may not have been set yet. In this
1049 case, we defer passing in the parameter and handle it later in
1050 Expand_Allocator_Expression.
1051 (Expand_Simple_Function_Return): When returning from a function which
1052 returns an unconstrained subtype having at least one access
1053 discriminant, generate the accessibility check needed to ensure that
1054 the function result will not outlive any objects designated by its
1056 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
1058 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
1059 is used to initialize an allocator, we may need to pass in "the
1060 accessibility level determined by the point of call" (AI05-0234)
1061 to the function. Expand_Call, where such actual parameters are
1062 usually generated, is too early in this case because the Etype of
1063 the allocator (which is used in determining the level to be passed
1064 in) may not have been set yet when Expand_Call executes. Instead,
1065 we generate code to pass in the appropriate actual parameter
1066 in Expand_Allocator_Expression.
1067 * sem_ch6.adb (Create_Extra_Formals): Create
1068 the new Extra_Accessibility_Of_Result formal if
1069 Needs_Result_Accessibility_Level returns True. This includes the
1070 introduction of a nested procedure, Check_Against_Result_Level.
1072 2011-09-06 Arnaud Charlet <charlet@adacore.com>
1074 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
1077 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1079 * s-finmas.adb (Set_Finalize_Address): Explain the reason
1080 for the synchronization. Move the test for null from
1081 s-stposu.Allocate_Any_Controlled to this routine since the check
1082 needs to be protected too.
1083 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
1084 synchronization code.
1085 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
1086 explaining the context in which this routine is used.
1087 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
1088 to s-finmas.Set_Finalize_Address.
1090 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1092 * einfo.ads: Document that itypes have no parent field.
1094 2011-09-05 Robert Dewar <dewar@adacore.com>
1096 * rtsfind.adb (Check_CRT): Check for overloaded entity
1097 * rtsfind.ads: Document that entities to be found by rtsfind
1098 cannot be overloaded
1099 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
1100 (Lock_Entries_With_Status): New name for Lock_Entries with two
1101 arguments (changed to meet rtsfind no overloading rule).
1103 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1105 * s-finmas.adb (Set_Finalize_Address (Address,
1106 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
1107 (Set_Finalize_Address (in out Finalization_Master,
1108 Finalize_Address_Ptr): Add synchronization code.
1109 * s-finmas.ads (Set_Finalize_Address (Address,
1110 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
1111 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
1112 Set_Finalize_Address for the heterogeneous case.
1114 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1116 * sem_ch3.adb: Undo previous change, not suitable after all.
1118 2011-09-05 Robert Dewar <dewar@adacore.com>
1120 * einfo.ads: Minor comment clarification.
1122 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1124 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
1125 no longer needs to search through the entities of the return
1126 statement scope to find the _chain.
1127 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
1128 (Analyze_Block_Statement): Add local variable
1129 Is_BIP_Return_Statement. Add machinery to install all entities
1130 produced by the expansion of the return object declaration.
1131 (Install_Return_Entities): New routine.
1132 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
1134 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1136 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
1137 of subunit is incomplete.
1138 (Analyze_Proper_Body): If parent spec is not available, do not
1141 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1143 * sem_disp.adb (Find_Controlling_Arg): Add checks for
1144 interface type conversions, that are expanded into dereferences.
1146 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1148 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
1149 Examine the parameter and return profile of a subprogram and swap
1150 any incomplete types coming from a limited context with their
1151 corresponding non-limited views.
1152 (Exchange_Limited_Views): New routine.
1154 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1156 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
1157 of internal entity to the subtype declaration, so that when
1158 entities are subsequently exchanged in a package body, the tree
1159 remains properly formatted for ASIS.
1161 2011-09-05 Johannes Kanig <kanig@adacore.com>
1163 * g-comlin.adb (Set_Usage): Additional optional argument to set help
1165 (Display_Help): display the user given help message, if available.
1167 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1169 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
1170 is legal if the original node is an identifier that is a
1171 parameterless function call.
1173 2011-09-05 Pascal Obry <obry@adacore.com>
1175 * prj-nmsc.adb: Minor reformatting.
1176 Add support for standalone aggregate library.
1177 (Check_Stand_Alone_Library): Handle standalone aggregate library.
1178 * projects.texi: Fix documentation for aggregate library projects.
1180 2011-09-05 Robert Dewar <dewar@adacore.com>
1182 * sem_ch6.adb: Minor reformatting.
1184 2011-09-05 Matthew Gingell <gingell@adacore.com>
1186 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
1187 stack guard page on PPC Linux. This patch ensures the 64K guard page at
1188 the bottom of the stack is not overwritten.
1190 2011-09-05 Thomas Quinot <quinot@adacore.com>
1192 * exp_intr.adb, s-tasini.adb: Minor reformatting.
1194 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1196 * sem_ch3.adb (Access_Definition): If an access type declaration
1197 appears in a child unit, the scope of whatever anonymous type
1198 may be generated is the child unit itself.
1200 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1202 * sem_ch6.adb (Analyze_Expression_Function): Do not set
1203 Comes_From_Source on rewritten body.
1204 (Analyze_Subprogram_Body_Helper): Check that the original node for
1205 the body comes from source, when determining whether expansion
1206 of a protected operation is needed.
1208 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1210 * exp_aggr.adb (Replace_Type): If the target of the assignment is
1211 a selected component and the right-hand side is a self-referential
1212 access, the proper prefix of the rewritten attribute is a copy
1213 of the left-hand side, not of its prefix.
1215 2011-09-05 Robert Dewar <dewar@adacore.com>
1217 * sem_ch5.adb: Minor reformatting.
1218 * sem_ch3.adb: Minor code clean up.
1220 2011-09-05 Jose Ruiz <ruiz@adacore.com>
1222 * exp_ch9.adb (Make_Initialize_Protection): The fact that
1223 restriction No_Dynamic_Attachment is in effect or not should
1224 not influence the default priority associated to a protected
1225 object. With this change, when the restriction is in effect (as
1226 is the case for the Ravenscar profile) the default priority of
1227 a protected object with an interrupt handler is in the range of
1228 interrupt priorities (Default_Interrupt_Priority) as required
1231 2011-09-05 Arnaud Charlet <charlet@adacore.com>
1233 * a-iteint.ads: Fix header.
1235 2011-09-05 Vincent Celier <celier@adacore.com>
1237 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
1238 with a directory separator to avoid output such as:
1239 "/path/to/objauto.cgpr" has been deleted.
1241 2011-09-05 Robert Dewar <dewar@adacore.com>
1243 * sem_ch3.adb: Minor reformatting.
1245 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1247 * sem_ch5.adb: Better error message.
1249 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1251 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
1252 (Expand_Array_Aggregate): Detect a special case of an aggregate
1253 which contains tasks in the context of an unexpanded return
1254 statement of a build-in-place function.
1255 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
1256 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
1257 which contains tasks and expand it now that the original simple
1258 return statement has been rewritten.
1259 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
1260 reformatting. Do not create a chain for an extended return
1261 statement if one is already available.
1262 (Has_Activation_Chain): New routine.
1264 2011-09-05 Marc Sango <sango@adacore.com>
1266 * sem_ch3.adb (Analyze_Object_Declaration): Remove
1267 the wrong test and add the correct test to detect the violation
1268 of illegal use of unconstrained string type in SPARK mode.
1270 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1272 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
1273 message on an iterator over an array.
1275 2011-09-05 Robert Dewar <dewar@adacore.com>
1277 * lib-xref-alfa.adb: Minor reformatting.
1279 2011-09-05 Robert Dewar <dewar@adacore.com>
1281 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
1282 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
1284 2011-09-05 Gary Dismukes <dismukes@adacore.com>
1286 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
1288 2011-09-05 Johannes Kanig <kanig@adacore.com>
1290 * lib-xref-alfa.adb: Update comments.
1292 2011-09-05 Thomas Quinot <quinot@adacore.com>
1294 * sem_res.adb: Minor reformatting
1296 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1298 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
1299 present, create them now. Needed in case the return type was
1300 a limited view in the function declaration.
1301 (Make_Build_In_Place_Call_In_Allocator): If return type contains
1302 tasks, build the activation chain for it. Pass a reference to
1303 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
1304 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
1305 with build_in_place calls.
1306 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
1307 incomplete, inatialize its Corresponding_Record_Type component.
1308 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
1311 2011-09-05 Johannes Kanig <kanig@adacore.com>
1313 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
1316 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1318 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
1319 appears within a package specification and the token after "IS"
1320 is not a parenthesis, assume that this is an unparenthesized
1321 expression function, even if the token appears in a line by
1323 * par.adb: Clarify use of Labl field of scope stack in error
1326 2011-09-05 Bob Duff <duff@adacore.com>
1328 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
1329 conversions instead of normal type conversions in all cases where a
1330 type conversion would be illegal. In particular, use unchecked
1331 conversions when the operand types are private.
1333 2011-09-05 Johannes Kanig <kanig@adacore.com>
1335 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
1336 objects of task type or protected type.
1338 2011-09-05 Ed Schonberg <schonberg@adacore.com>
1340 * sem_ch6.adb (Analyze_Expression_Function): If the expression
1341 function comes from source, indicate that so does its rewriting,
1342 so it is compatible with any subsequent expansion of the
1343 subprogram body (e.g. when it is a protected operation).
1344 * sem_ch4.adb: minor reformatting
1346 2011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1348 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
1349 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
1350 may lead to wrong ancestor package in the case of instantiated subunit
1351 bodies. If a subunit is instantiated, follow the chain of instantiations
1352 rather than the stub structure.
1354 2011-09-02 Robert Dewar <dewar@adacore.com>
1356 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
1357 * gcc-interface/Make-lang.in: Update dependencies.
1359 2011-09-02 Marc Sango <sango@adacore.com>
1361 * sem_ch3.adb (Analyze_Object_Declaration): Change
1362 comment and add additional check to differentiate constant of
1363 type string from others unconstrained type.
1365 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1367 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
1368 present in incomplete type declarations to refine the error
1369 message the full declaration is in the same unit.
1370 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
1371 an incomplete type, set the Premature_Use for additional message.
1372 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
1373 and Premature_Use is set, place additional information at the
1374 point of premature use.
1376 2011-09-02 Bob Duff <duff@adacore.com>
1378 * sem_ch6.adb: (Check_Post_State): Suppress warning
1379 "postcondition refers only to pre-state" when the expression has not
1380 yet been analyzed, because it causes false alarms. This can happen when
1381 the postcondition contains a quantified expression, because those are
1382 analyzed later. This is a temporary/partial fix.
1383 (Process_Post_Conditions): Minor: change wording of warning.
1385 2011-09-02 Marc Sango <sango@adacore.com>
1387 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
1388 illegal use of unconstrained string type in SPARK mode.
1389 * sem_res.adb (Analyze_Operator_Symbol): Set the
1390 right place where the string operand of concatenation should be
1391 violate in SPARK mode.
1393 2011-09-02 Robert Dewar <dewar@adacore.com>
1395 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
1396 exp_ch3.adb: Minor reformatting.
1398 2011-09-02 Vincent Celier <celier@adacore.com>
1400 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
1401 as the compiler driver so Is_Compilable returns True for sources.
1402 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
1405 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1407 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
1408 condition, a reference to a controlling formal must be interpreted
1409 as having the class-wide type (or an access to such) so that the
1410 inherited condition can be properly applied to any overriding
1411 operation (see ARM12 6.6.1 (7)).
1413 2011-09-02 Tristan Gingold <gingold@adacore.com>
1415 * init.c (__gnat_is_vms_v7): Fix case and add prototype
1418 2011-09-02 Javier Miranda <miranda@adacore.com>
1420 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
1421 initializing expression of a class-wide interface object declaration
1422 if its type is limited.
1424 2011-09-02 Johannes Kanig <kanig@adacore.com>
1426 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
1427 literals, take into account the type name; the type is *not*
1428 the scope for an enumeration literal.
1430 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1432 * sem_ch6.adb (Check_Overriding_Indicator): add special check
1433 to reject an overriding indicator on a user-defined Adjust
1434 subprogram for a limited controlled type.
1436 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1438 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
1439 for an actual that is a function call returning an unconstrained
1440 limited controlled type.
1442 2011-09-02 Tristan Gingold <gingold@adacore.com>
1444 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
1446 2011-09-02 Johannes Kanig <kanig@adacore.com>
1448 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
1449 from "HEAP" to __HEAP Change comment that refers to that variable
1450 * put_alfa.adb: Change comment that refers to that variable
1452 2011-09-02 Robert Dewar <dewar@adacore.com>
1454 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
1456 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1458 * exp_util.adb (Extract_Renamed_Object): Renamed to
1459 Find_Renamed_Object. This routine has been reimplemented and now uses
1460 tree traversal to locate a renamed object.
1461 (Is_Aliased): Replace call to Extract_Renamed_Object with
1462 Find_Renamed_Object.
1464 2011-09-02 Tristan Gingold <gingold@adacore.com>
1466 * init.c: (__gnat_is_vms_v7): New function.
1468 2011-09-02 Olivier Hainque <hainque@adacore.com>
1470 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
1471 that have a misaligned backchain, necessarily bogus.
1473 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1475 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
1476 TSS routine Finalize_Address when compiling in Alfa mode.
1477 (Expand_Freeze_Record_Type): Do not create TSS routine
1478 Finalize_Address when compiling in Alfa mode.
1479 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
1480 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
1482 (Expand_N_Allocator): Do not produce a call to
1483 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
1484 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
1485 produce a call to primitive Set_Finalize_Address in Alfa mode because
1486 Finalize_Address is not built.
1487 * exp_ch7.adb (Build_Finalization_Master): Do not create
1488 finalization masters in Afa mode since they are not needed.
1489 (Build_Finalizer): Do not create scope and library-level
1490 finalizers in Alfa mode since they are not needed.
1491 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
1492 "new" and "free" when applied to controlled objects in Alfa mode since
1495 2011-09-02 Vincent Celier <celier@adacore.com>
1497 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
1498 only library names with the syntax of Ada identifiers, to avoid errors
1499 when compiling the binder generated files.
1500 * projects.texi: Document restriction on SAL library names
1502 2011-09-02 Thomas Quinot <quinot@adacore.com>
1504 * a-chtgbo.adb: Minor comment fix.
1506 2011-09-02 Robert Dewar <dewar@adacore.com>
1508 * lib-xref.adb: Minor reformatting
1510 2011-09-02 Vincent Celier <celier@adacore.com>
1512 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
1513 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
1514 --version and --help in usage.
1515 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
1517 2011-09-02 Bob Duff <duff@adacore.com>
1519 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
1520 compilers don't understand it.
1522 2011-09-02 Gary Dismukes <dismukes@adacore.com>
1524 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
1525 underlying subtype rather than its base type on the call to
1526 Build_Record_Or_Elementary_Input_Function, so that any
1527 constraints on a discriminated subtype will be available for
1528 doing the check required by AI05-0192.
1529 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
1530 If the prefix subtype of the 'Input attribute is a constrained
1531 discriminated subtype, then check each constrained discriminant value
1532 against the corresponding value read from the stream.
1534 2011-09-02 Yannick Moy <moy@adacore.com>
1536 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
1537 warnings on suspicious contracts, and enable them with -gnatwa.
1539 2011-09-02 Robert Dewar <dewar@adacore.com>
1541 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
1544 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1546 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
1547 which ensure that restriction No_Dynamic_Attachment has not been
1549 (Make_Initialize_Protection): Protected types with attach or
1550 interrupt handlers must not violate restriction No_Dynamic_Attachment.
1551 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
1552 which ensures that restriction No_Dynamic_Attachment has not been
1554 * sem_attr.adb: (Eval_Attribute): Transform
1555 VAX_Float_Type'First and 'Last into references to
1556 the temporaries which store the corresponding bounds. The
1557 transformation is needed since the back end cannot evaluate
1558 'First and 'Last on VAX.
1559 (Is_VAX_Float): New routine.
1561 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1563 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
1564 generic unit is not intrinsic and has an explicit convention,
1565 the instance inherits it.
1567 2011-09-02 Robert Dewar <dewar@adacore.com>
1569 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
1570 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
1572 2011-09-02 Thomas Quinot <quinot@adacore.com>
1574 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
1575 Guard against a prefix that is an N_Has_Entity but has no
1578 2011-09-02 Yannick Moy <moy@adacore.com>
1580 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
1583 2011-09-02 Yannick Moy <moy@adacore.com>
1585 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
1586 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
1588 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
1589 procedure looking for suspicious postconditions.
1590 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
1591 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
1592 options -gnatw.t and -gnatw.T.
1594 2011-09-02 Pascal Obry <obry@adacore.com>
1596 * prj.adb: Minor code refactoring. Move check for null project in
1598 * projects.texi: Fix minor typos.
1600 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1602 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
1603 of iteration is an expression, its value must be captured in a
1604 renaming declaration, so that modification of the elements is
1605 propagated to the original container.
1607 2011-09-02 Pascal Obry <obry@adacore.com>
1609 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
1610 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
1611 prj-tree.adb: Minor reformatting and style fixes.
1613 2011-09-02 Robert Dewar <dewar@adacore.com>
1615 * s-rident.ads: Add new restriction No_Implicit_Aliasing
1616 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
1617 No_Implicit_Aliasing
1618 (Analyze_Attribute, case Address): ditto
1619 (Analyze_Attribute, case Unrestricted_Access): ditto
1620 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
1621 No_Implicit_Aliasing restriction.
1622 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
1624 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1626 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
1627 is an unchecked conversion, apply test to its expression.
1629 2011-09-02 Javier Miranda <miranda@adacore.com>
1631 * sem_ch3.adb (Check_Abstract_Overriding): When
1632 traversing the chain of aliased subprograms avoid reporting a
1633 redundant error on the current entity.
1635 2011-09-02 Sergey Rybin <rybin@adacore.com>
1637 * gnat_ugn.texi: Minor clean up.
1639 2011-09-02 Bob Duff <duff@adacore.com>
1641 * s-htable.adb (Set_If_Not_Present): Use renaming
1642 instead of ":=", because the type Key is limited in the generic (even
1643 if not in the instances).
1645 2011-09-02 Robert Dewar <dewar@adacore.com>
1647 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
1648 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
1651 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1653 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
1654 inherited component with the enclosing derived type. Code reformatting.
1656 2011-09-02 Gary Dismukes <dismukes@adacore.com>
1658 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
1659 return done when overflow checks are enabled, since comparisons against
1660 Lor and Hir should not be done when OK1 is False.
1662 2011-09-02 Gary Dismukes <dismukes@adacore.com>
1664 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
1665 Add new formal Master_Exp. When present, add that expression to the
1666 call as an extra actual.
1667 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
1668 Fmaster_Actual and in the case of a BIP call initializing a return
1669 object of an enclosing BIP function set it to a
1670 new reference to the implicit finalization master
1671 formal of the enclosing function. Fmaster_Actual is
1672 then passed to the new formal Master_Exp on the call to
1673 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
1674 initializations of Enclosing_Func to its declaration.
1676 2011-09-02 Thomas Quinot <quinot@adacore.com>
1678 * csets.ads: Minor reformatting
1680 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1682 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
1683 the full view of a private type coming from an instantiation.
1684 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
1685 loop to iterate over the declarations rather than use the
1686 First_Entity / Next_Entity scheme.
1688 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1690 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
1691 X'range (N) into X'First (N) .. X'Last (N), do not share the
1692 dimension indicator N, if present. Even though it is a static
1693 constant, its source location may be modified when printing
1694 expanded code under -gnatDL, and node sharing will lead to chaos
1695 in Sprint on large files, by generating a sloc value that does
1696 not correspond to any source file.
1698 2011-09-02 Bob Duff <duff@adacore.com>
1700 * einfo.adb: (Has_Xref_Entry): Do not call
1701 Implementation_Base_Type. Lib.Xref has been
1702 rewritten to avoid the need for it, and it was costly.
1703 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
1704 functions in support of efficient xref.
1705 * lib-xref-alfa.adb: Misc changes related to Key component of
1707 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
1708 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
1709 no longer does. This is the one place where it is needed.
1711 2011-09-02 Johannes Kanig <kanig@adacore.com>
1713 * g-comlin.adb (Getopt): New optional argument Concatenate to have
1714 similar interface as the other Getopt function.
1716 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
1718 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
1719 a call to Set_Finalize_Address if there is no allocator available.
1720 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
1721 a case of allocator expansion where the allocator is not expanded but
1722 needs a custom allocate routine. Code reformatting.
1723 (Is_Finalizable_Transient): Remove local variables Has_Rens and
1724 Ren_Obj. Code reformatting.
1725 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
1726 through the use of 'reference.
1727 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
1728 as part of build-in-place expansion. They are intentionally marked as
1729 coming from source, but their parents are not.
1731 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1733 * sem_ch10.adb (Analyze_With_Clause): If the library unit
1734 is the generated subprogram declaration for a child unit body
1735 that acts as spec, use the original body in the with_clause,
1736 to prevent binding errors.
1738 2011-09-02 Vincent Celier <celier@adacore.com>
1740 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
1741 qualifier /MULTI_UNIT_INDEX=
1743 2011-09-02 Johannes Kanig <kanig@adacore.com>
1745 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
1746 instead of calling the callback function
1748 2011-09-02 Robert Dewar <dewar@adacore.com>
1750 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
1751 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
1753 2011-09-02 Vincent Celier <celier@adacore.com>
1755 * prj-nmsc.adb: (Find_Sources): When the list of sources is
1756 explicitly declared in an extending project, do not warn if a source
1757 for an inherited naming exception is not found.
1759 2011-09-02 Gary Dismukes <dismukes@adacore.com>
1761 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
1762 expansion is inactive.
1764 2011-09-02 Ed Schonberg <schonberg@adacore.com>
1766 * sem_util.adb (Note_Possible_Modification): If the entity
1767 being modified is the renaming generated for an Ada2012 iterator
1768 element, the enclosing container or array is modified as well.
1770 2011-09-02 Jose Ruiz <ruiz@adacore.com>
1772 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
1773 Initialize): Define and initialize the
1774 mutex attributes and condition variable attributes locally.
1776 2011-09-02 Vincent Celier <celier@adacore.com>
1778 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
1779 exception replaced in an extending project.
1780 (Check_Object): No error when the other source is locally removed.
1782 2011-09-02 Yannick Moy <moy@adacore.com>
1784 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
1787 2011-08-31 Arnaud Charlet <charlet@adacore.com>
1789 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
1791 * gcc-interface/Make-lang.in: Update dependencies.
1793 2011-09-01 Robert Dewar <dewar@adacore.com>
1795 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
1797 2011-09-01 Jose Ruiz <ruiz@adacore.com>
1799 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
1800 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
1801 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
1802 specific for systems where their glibc version does not define the
1803 routines to handle dynamically allocated CPU sets.
1805 2011-09-01 Vincent Celier <celier@adacore.com>
1807 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
1808 prj-env.adb: Implement inheritance of naming exceptions in extending
1811 2011-09-01 Romain Berrendonner <berrendo@adacore.com>
1813 * gnatls.adb: Display simple message instead of content of
1816 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1818 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
1819 access discriminant and anonymous access component scopes.
1820 (Inherit_Component): Reuse the itype of an access discriminant
1821 or anonymous access component by copying it in order to set the proper
1822 scope. This is done only when the parent and the derived type
1823 are in different scopes.
1824 (Set_Anonymous_Etype): New routine.
1826 2011-09-01 Robert Dewar <dewar@adacore.com>
1828 * a-convec.adb: Minor reformatting throughout.
1830 2011-09-01 Jose Ruiz <ruiz@adacore.com>
1832 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
1833 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
1834 CPU_ALLOC_SIZE and CPU_FREE linux macros.
1835 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
1836 CPU_SET_S respectively because we are now using dynamically allocated
1837 CPU sets which are more portable across different glibc versions.
1838 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
1839 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
1840 masks dynamically according to the number of processors in the target
1842 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
1843 respectively, so we need to pass the size of the masks as
1845 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
1846 created cpu_set_t masks
1847 with the number of processors available in the target platform,
1848 instead of static bit arrays. It enhances portability because
1849 it uses the information from the target platform.
1850 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
1851 are using a restricted run-time library, use the flag
1852 Configurable_Run_Time_Mode instead of Restricted_Profile.
1854 2011-09-01 Vincent Celier <celier@adacore.com>
1856 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
1857 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
1859 2011-09-01 Nicolas Roche <roche@adacore.com>
1861 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
1862 on VxWorks in kernel mode.
1864 2011-09-01 Jose Ruiz <ruiz@adacore.com>
1866 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
1867 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
1868 directly the bit array.
1869 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
1870 the linux macros with the same name.
1871 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
1872 wrappers around the CPU_ZERO and CPU_SET linux macros.
1874 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1876 * exp_ch7.adb (Find_Insertion_List): Removed.
1877 (Process_Transient_Objects): Insert the declarations of the hook
1878 access type and the hook object before the associated transient object.
1880 2011-09-01 Jose Ruiz <ruiz@adacore.com>
1882 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
1883 package System.Aux_Dec when using restricted run-time libraries which
1884 do not have this package.
1886 2011-09-01 Tristan Gingold <gingold@adacore.com>
1888 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
1890 2011-09-01 Bob Duff <duff@adacore.com>
1892 * sem_attr.adb (Analyze_Access_Attribute): Do not call
1893 Kill_Current_Values for P'Unrestricted_Access, where P is library level
1895 2011-09-01 Thomas Quinot <quinot@adacore.com>
1897 * exp_ch5.adb: Minor reformatting
1898 * gnat_ugn.texi: Fix minor typos.
1899 * gcc-interface/Make-lang.in: Update dependencies.
1901 2011-09-01 Robert Dewar <dewar@adacore.com>
1903 * inline.adb, sem_aggr.adb: Minor reformatting.
1905 2011-09-01 Ed Schonberg <schonberg@adacore.com>
1907 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
1909 2011-09-01 Robert Dewar <dewar@adacore.com>
1911 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
1913 2011-09-01 Bob Duff <duff@adacore.com>
1915 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
1916 body" the same as "in inlined body", because visibility shouldn't
1919 2011-09-01 Eric Botcazou <ebotcazou@adacore.com>
1921 * inline.adb (Add_Inlined_Body): Refine previous change.
1923 2011-09-01 Gary Dismukes <dismukes@adacore.com>
1925 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
1926 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1927 Test for case where call
1928 initializes an object of a return statement before testing for
1929 a constrained call, to ensure that all such cases get handled
1930 by simply passing on the caller's parameters. Also, in that
1931 case call Needs_BIP_Alloc_Form to determine whether to pass on
1932 the BIP_Alloc_Form parameter of the enclosing function rather
1933 than testing Is_Constrained. Add similar tests for the return
1934 of a BIP call to later processing to ensure consistent handling.
1935 (Needs_BIP_Alloc_Form): New utility function.
1936 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
1937 a BIP_Alloc_Form formal with call to new utility function
1938 Needs_BIP_Alloc_Form.
1940 2011-09-01 Pascal Obry <obry@adacore.com>
1942 * prj-part.adb: Minor reformatting.
1944 2011-09-01 Vincent Celier <celier@adacore.com>
1946 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
1947 half character in the unit name.
1949 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
1951 * exp_ch4.adb: Minor code and comment reformatting.
1953 2011-09-01 Thomas Quinot <quinot@adacore.com>
1955 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
1956 for Is_Limited_Type and Is_Tagged_Type in condition checking
1957 for by-reference type.
1958 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
1959 subprograms may have a completion because of a previous
1960 Inline_Always clause, but the enclosing package must be marked
1961 inlined for the subprogram body to become visible to the backend.
1963 2011-09-01 Thomas Quinot <quinot@adacore.com>
1965 * sem_aux.adb, exp_ch4.adb: Minor reformatting
1967 2011-09-01 Pascal Obry <obry@adacore.com>
1969 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
1971 2011-09-01 Ed Schonberg <schonberg@adacore.com>
1973 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
1974 the formals of a subprogram stub that acts as a spec.
1976 2011-09-01 Ed Schonberg <schonberg@adacore.com>
1978 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
1979 type, declare a renaming for it, not an object declaration.
1981 2011-09-01 Yannick Moy <moy@adacore.com>
1983 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
1984 Ignore_Errors to ignore failures to read ALI files when True.
1986 2011-09-01 Javier Miranda <miranda@adacore.com>
1988 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
1989 constructor calls associated with non-tagged record types.
1991 2011-09-01 Robert Dewar <dewar@adacore.com>
1993 * g-socthi-vms.adb: Minor reformatting.
1995 2011-09-01 Nicolas Roche <roche@adacore.com>
1997 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
1998 in order to avoid impact of imcompatible changes.
1999 * cstreams.c: Likewise
2001 * aux-io.c: Likewise
2003 2011-09-01 Yannick Moy <moy@adacore.com>
2005 * lib-writ.adb (Write_With_Lines): Always output complete information
2006 on "with" line in Alfa mode, as this is required by formal verification
2009 2011-09-01 Tristan Gingold <gingold@adacore.com>
2011 * g-socthi-vms.adb: Add comments.
2013 2011-09-01 Pascal Obry <obry@adacore.com>
2015 * prj.ads: Minor reformatting.
2017 2011-09-01 Vincent Celier <celier@adacore.com>
2019 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
2020 exceptions in the config pragmas file.
2022 2011-09-01 Tristan Gingold <gingold@adacore.com>
2024 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
2026 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2028 * exp_ch7.adb (Find_Insertion_List): New routine.
2029 (Process_Transient_Objects): Add code to handle the abnormal
2030 finalization of a controlled transient associated with a subprogram
2031 call. Since transients are cleaned up right after the associated
2032 context, an exception raised during a subprogram call may bypass the
2035 2011-09-01 Robert Dewar <dewar@adacore.com>
2037 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
2040 2011-09-01 Robert Dewar <dewar@adacore.com>
2042 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
2044 2011-09-01 Robert Dewar <dewar@adacore.com>
2046 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
2048 2011-09-01 Thomas Quinot <quinot@adacore.com>
2050 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
2051 GNATRTL_NONTASKING_OBJS.
2053 2011-09-01 Robert Dewar <dewar@adacore.com>
2055 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
2056 possibility of this flag being set for formals in Ada 2012 mode.
2057 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
2059 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
2061 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
2063 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
2066 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2068 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
2069 insertion node in a tree of nested Expression_With_Actions nodes.
2070 (Process_Transient_Object): In the case where a complex if statement
2071 has been converted into nested Expression_With_Actions nodes, the
2072 "hook" object and the associated access type must be inserted before
2073 the top most Expression_With_Actions.
2075 2011-09-01 Robert Dewar <dewar@adacore.com>
2077 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
2078 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
2080 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2082 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
2084 2011-09-01 Jose Ruiz <ruiz@adacore.com>
2086 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
2088 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
2089 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
2090 in a similar way as we do for the Priority or Dispatching_Domain aspect.
2091 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
2092 Dispatching_Domains_Frozen): Move this local data to package
2093 System.Tasking because with the CPU aspect we need to have access
2094 to this data when creating the task in System.Tasking.Stages.Create_Task
2095 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
2096 Move these variables from the body of
2097 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
2098 we need to have access to this data when creating the task in
2099 System.Tasking.Stages.Create_Task.
2100 * s-taskin.adb (Initialize): Signal the allocation of the environment
2101 task to a CPU, if any, so that we know whether the CPU can be
2102 transferred to a different dispatching domain.
2103 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
2104 is being allocated belongs to the dispatching domain where the task
2105 lives. Signal the allocation of the task to a CPU, if any, so that we
2106 know whether the CPU can be transferred to a different dispatching
2109 2011-09-01 Ed Schonberg <schonberg@adacore.com>
2111 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
2112 attributes Same_Storage and Overlaps_Storage.
2114 2011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2116 * exp_strm.adb: Remove with and use clause for Opt.
2117 (Build_Array_Input_Function): Remove the version-dependent generation
2118 of the return statement. The Ada 2005 tree is now the default.
2120 2011-09-01 Yannick Moy <moy@adacore.com>
2122 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
2123 it is never empty when compiling in Alfa mode.
2125 2011-09-01 Robert Dewar <dewar@adacore.com>
2127 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
2128 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
2129 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
2130 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
2132 2011-09-01 Matthew Heaney <heaney@adacore.com>
2134 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
2135 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
2136 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
2137 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
2138 unbounded queue container.
2139 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
2140 bounded queue container.
2141 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
2142 unbounded priority queue container.
2143 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
2144 bounded priority queue container.
2146 2011-08-31 Pascal Obry <obry@adacore.com>
2148 * a-direct.adb: Do not try to create an UNC path on Windows.
2149 (Create_Path): Skip leading computer name in UNC path if any.
2151 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2153 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
2154 version-dependent generation of the return statement. The Ada 2005 tree
2157 2011-08-31 Thomas Quinot <quinot@adacore.com>
2159 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
2160 types Stream_Element_Offset and Storage_Offset have a different native
2161 type depending on whether the platform is 32 or 64 bits. When
2162 exchanging them, always convert to 64 bits.
2164 2011-08-31 Yannick Moy <moy@adacore.com>
2166 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
2167 --force-alfa to gnat2why.
2169 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2171 * sem_ch12.adb (Save_References): If the node has aspects, save
2172 references within the corresponding expressions in a separate step,
2173 because the aspects are not directly in the tree for the declaration
2174 to which they belong.
2176 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2178 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
2179 in CodePeer mode, since representation clauses are partially ignored.
2180 * gcc-interface/Make-lang.in: Update dependencies.
2182 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2184 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
2185 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
2186 to any dispatching domain.
2188 2011-08-31 Thomas Quinot <quinot@adacore.com>
2190 * exp_ch4.adb: Minor reformatting.
2192 2011-08-31 Bob Duff <duff@adacore.com>
2194 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
2195 on nodes for which it is not defined.
2196 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
2199 2011-08-31 Bob Duff <duff@adacore.com>
2201 * sem_ch3.adb (Process_Full_View): Disable legality check if
2202 In_Instance, to avoid spurious errors.
2203 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
2204 if In_Instance, to avoid spurious errors.
2206 2011-08-31 Pascal Obry <obry@adacore.com>
2208 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
2209 directory speparators.
2210 (Compose): Use Dir_Seps to handle both forms.
2211 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
2213 (Extension): Use Dir_Seps to handle both forms.
2215 2011-08-31 Pascal Obry <obry@adacore.com>
2217 * prj-conf.adb: Minor reformatting.
2219 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2221 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
2222 dispatching domain aspect.
2223 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
2225 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
2226 Dispatching_Domain aspect in a similar way as we do for the Priority
2228 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
2229 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
2231 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
2232 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
2233 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
2234 Dispatching_Domain and add it to the task definition.
2235 (Sig_Flags): Add Pragma_Dispatching_Domain.
2236 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
2237 support to find the types Dispatching_Domain and
2238 Dispatching_Domain_Access.
2239 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
2240 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
2241 query the availability of a pragma Dispatching_Domain.
2242 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
2243 the expander to pass the Dispatching_Domain when creating a task.
2244 (Name_Dispatching_Domain): Add this new name for a pragma.
2245 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
2246 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
2247 task has been allocated at creation time.
2248 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
2249 Ravenscar is always null.
2250 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
2251 the task has been allocated at creation time.
2252 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
2253 a specific dispatching domain.
2254 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
2255 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
2256 and CPU are specified for the task, and the CPU value is not contained
2257 within the range of processors for the domain.
2259 2011-08-31 Vincent Celier <celier@adacore.com>
2261 * make.adb (Original_Gcc) : New constant String_Access.
2262 (Gnatmake): For VM targets, do not use VM version of the compiler if
2263 --GCC= has been specified.
2265 2011-08-31 Thomas Quinot <quinot@adacore.com>
2267 * sem_ch5.adb: Minor reformatting.
2269 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2271 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
2274 2011-08-31 Bob Duff <duff@adacore.com>
2276 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
2277 the access type is private; we don't care about privacy in expansion.
2279 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2281 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
2282 subcomponents tnat may be limited, because they originate in view
2283 conflicts. If the original aggregate is legal and the actuals are
2284 legal, the aggregate itself is legal.
2286 2011-08-31 Matthew Heaney <heaney@adacore.com>
2288 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
2291 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2293 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
2296 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2298 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
2299 Interrupt_Priority aspects, force the analysis of the aspect expression
2300 (when building the equivalent pragma). Otherwise, its analysis is done
2301 too late, after the task or protected object has been created.
2302 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
2303 Analyze_Single_Task_Declaration): Remove the code to move the aspects
2304 to the object declaration because they are needed in the type
2307 2011-08-31 Robert Dewar <dewar@adacore.com>
2309 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
2310 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
2313 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2315 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
2316 if the corresponding type is malformed due to restriction violations.
2318 2011-08-31 Robert Dewar <dewar@adacore.com>
2320 * s-ransee.ads, s-ransee.adb: Minor reformatting.
2322 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2324 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
2325 would cause the generation of Set_Finalize_Address if the target is a
2326 VM and the designated type is not derived from [Limited_]Controlled.
2328 2011-08-31 Arnaud Charlet <charlet@adacore.com>
2330 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
2332 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
2333 case of a compilation error.
2335 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2337 * init.c (__gnat_error_handler): Standardize the stack overflow or
2338 erroneous memory access message.
2339 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
2340 or erroneous memory access message.
2342 2011-08-31 Robert Dewar <dewar@adacore.com>
2344 * sem_ch4.adb: Minor reformatting.
2345 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
2347 2011-08-31 Thomas Quinot <quinot@adacore.com>
2349 * scos.ads: Minor documentation clarification.
2350 * put_scos.adb: Do not generate SCO unit header line for a unit that
2353 2011-08-31 Robert Dewar <dewar@adacore.com>
2355 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
2357 2011-08-31 Tristan Gingold <gingold@adacore.com>
2359 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
2360 hold variables between these following subprograms.
2361 (Build_Exception_Handler, Build_Object_Declarations,
2362 Build_Raise_Statement): Use the above type as parameter.
2363 Make the above adjustments.
2364 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
2366 2011-08-31 Pascal Obry <obry@adacore.com>
2368 * projects.texi: Minor reformatting.
2370 2011-08-31 Tristan Gingold <gingold@adacore.com>
2372 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
2373 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
2375 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2377 * exp_ch5.adb: Minor code cleanup.
2378 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
2379 prevent cascaded errors.
2380 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
2381 variable of an iterator specification in current scope.
2382 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
2383 postconditions on the stack, as they contain no return statements.
2385 2011-08-31 Yannick Moy <moy@adacore.com>
2387 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
2388 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
2389 call Qualify_Entity_Names.
2390 (Expand_Alfa): call Qualify_Entity_Names in more cases
2391 * lib-xref-alfa.adb: Take into account system package.
2392 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
2393 CodePeer mode in which we are interested in finding bugs even if
2394 compiler cannot compile source.
2395 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
2398 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2400 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
2401 denoted by the subtype mark to ensure getting the concurrent type in
2402 the case where the subtype mark denotes a private subtype of a
2403 concurrent type (needed when using -gnatc).
2404 (Process_Subtype): For the processing specific to type kinds, case on
2405 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
2406 subtype denotes a private subtype whose base type is nonprivate (needed
2407 for subtypes of private fulfilled by task types when compiling with
2410 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2412 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
2413 late primitives that override interface operations when the full
2414 expander is not active, to avoid blowups in Register_Primitive when
2415 types don't have associated secondary dispatch tables.
2417 2011-08-31 Yannick Moy <moy@adacore.com>
2419 * alfa_test.adb: Code clean up.
2421 2011-08-31 Marc Sango <sango@adacore.com>
2423 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
2424 by Comes_From_Source (Original_Node (N)) in order to treat also the
2425 nodes which have been rewritten.
2426 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
2427 explicit dereference and slice violation in spark mode on the nodes
2428 coming only from the source code.
2430 2011-08-31 Robert Dewar <dewar@adacore.com>
2432 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
2433 lib-xref-alfa.adb: Minor reformatting.
2435 2011-08-31 Matthew Heaney <heaney@adacore.com>
2437 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
2439 2011-08-31 Javier Miranda <miranda@adacore.com>
2441 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
2442 only for class-wide subprograms conflicting with entities of concurrent
2445 2011-08-31 Matthew Heaney <heaney@adacore.com>
2447 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
2450 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2452 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
2453 general description of the routine.
2455 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2457 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
2458 doubly-linked lists.
2460 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2462 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
2463 check is needed for a left-hand side that is a dereference, and the
2464 base type is private without discriminants (whereas the full type does
2465 have discriminants), an extra retrieval of the underlying type may be
2466 needed in the case where the subtype is a record subtype whose base
2467 type is private. Update comments.
2469 2011-08-31 Javier Miranda <miranda@adacore.com>
2471 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
2472 found check if there is a class-wide subprogram covering the primitive.
2474 2011-08-31 Yannick Moy <moy@adacore.com>
2476 * sem_res.adb: Further cases where full expansion test is needed,
2477 rather than expansion test.
2479 2011-08-31 Pascal Obry <obry@adacore.com>
2481 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
2483 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2485 * exp_ch5.adb: Handle iterators over derived container types.
2487 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2489 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
2490 (Has_Anonymous_Master): New routine.
2491 (Set_Has_Anonymous_Master): New routine.
2492 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
2493 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
2494 (Current_Anonymous_Master): New routine.
2495 (Current_Unit_First_Declaration): Removed.
2496 (Current_Unit_Scope): Removed.
2497 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
2498 their objects on a per-unit heterogeneous finalization master.
2500 2011-08-31 Matthew Heaney <heaney@adacore.com>
2502 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
2505 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2507 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
2510 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2512 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
2513 where the actual is an unexpanded call to 'Input.
2515 2011-08-31 Yannick Moy <moy@adacore.com>
2517 * sem_ch4.adb: Code clean up.
2519 2011-08-31 Yannick Moy <moy@adacore.com>
2521 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
2523 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2525 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
2526 and TSS primitive Finalize_Address if finalization is suppressed.
2527 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
2528 primitive Finalize_Address if finalization is suppressed.
2530 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2532 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
2533 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
2534 sure that the underlying task has already been created before trying
2535 to change its affinity.
2536 (Set_CPU): Use the term processor instead of CPU, as we do in
2539 2011-08-31 Vincent Celier <celier@adacore.com>
2541 * prj-attr.adb: New Compiler attribute Source_File_Switches.
2542 * prj-nmsc.adb (Process_Compiler): Process attribute
2543 Source_File_Switches.
2544 * prj.ads (Language_Config): New name list component
2545 Name_Source_File_Switches.
2546 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
2548 2011-08-31 Ed Schonberg <schonberg@adacore.com>
2550 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
2551 discriminated component of an actual, expand at once to prevent
2552 ouf-of-order references with generated subtypes.
2554 2011-08-31 Yannick Moy <moy@adacore.com>
2556 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
2557 reference to operator in Alfa xrefs.
2559 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2561 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
2562 where the parent instance was frozen before the current instance due to
2563 the presence of a source body. Update calls to Insert_After_Last_Decl.
2564 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
2565 Update the comment which illustrates the purpose of the routine.
2566 Package instances are now frozen by source bodies which appear after
2567 the instance. This ensures that entities coming from within the
2568 instance are available for use in the said bodies.
2569 (Install_Body): Add code to handle the case where the parent instance
2570 was frozen before the current instance due to the presence of a source
2571 body. Update calls to Insert_After_Last_Decl.
2573 2011-08-31 Jose Ruiz <ruiz@adacore.com>
2575 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
2577 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
2579 2011-08-31 Yannick Moy <moy@adacore.com>
2581 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
2583 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
2584 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
2585 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
2586 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
2587 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
2588 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
2589 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
2590 ALFA in Alfa (we dropped acronym).
2591 * einfo.adb (Primitive_Operations): Correctly return list of primitive
2592 operations in a case where it returned previously No_Elist.
2594 2011-08-31 Robert Dewar <dewar@adacore.com>
2596 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
2597 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
2598 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
2599 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
2600 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
2601 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
2604 2011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2606 * sem_ch12 (Check_Private_View): Revert previous change.
2607 * sem_res.adb (Conversion_Check): Do not emit the error message if the
2608 conversion is in a generic instance.
2610 2011-08-31 Matthew Heaney <heaney@adacore.com>
2612 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
2613 * a-chtgbo.adb (Free): Allow 0 as index value.
2615 2011-08-31 Matthew Heaney <heaney@adacore.com>
2617 * a-cborma.adb (Insert): Add comment to explain why no element
2620 2011-08-31 Gary Dismukes <dismukes@adacore.com>
2622 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
2623 spec discriminant is already a concurrent type, in which case just use
2624 it, otherwise fetch the Corresponding_Concurrent_Type as before.
2626 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
2628 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
2629 system-linux-mips.ads, system-linux-mipsel.ads,
2630 system-linux-mips64el.ads, system-linux-ppc64.ads,
2631 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
2633 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
2635 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
2636 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
2637 (build_unary_op): Likewise.
2639 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
2641 * raise-gcc.c: Do not include coretypes.h and tm.h.
2642 (setup_to_install): Remove test for compiler macro.
2643 * targext.c: Document use for the library.
2644 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
2646 2011-08-30 Eric Botcazou <ebotcazou@adacore.com>
2648 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
2649 the expression to the nominal type if the latter is a record type with
2650 a variant part and the type of the former is a record type without one.
2652 2011-08-30 Yannick Moy <moy@adacore.com>
2654 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
2655 expansion in Alfa mode.
2656 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
2657 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
2659 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
2660 * sem_res.adb: Ditto.
2661 * gcc-interface/Make-lang.in: Update dependencies.
2663 2011-08-30 Thomas Quinot <quinot@adacore.com>
2665 * g-socket.ads: Minor documentation adjustment.
2667 2011-08-30 Robert Dewar <dewar@adacore.com>
2669 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
2671 2011-08-30 Yannick Moy <moy@adacore.com>
2673 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
2674 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
2675 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
2676 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
2677 Revert change which introduced files for "light"
2678 expansion, to be replaced by a single file for Alfa expansion.
2680 2011-08-30 Robert Dewar <dewar@adacore.com>
2682 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
2683 Minor code reorg/reformatting.
2685 2011-08-30 Yannick Moy <moy@adacore.com>
2687 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
2688 common shorthand for (Expander_Active and not ALFA_Mode) that can be
2689 used for testing full expansion, that is active expansion not in the
2690 reduced mode for Alfa
2691 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
2692 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
2693 of the verbose (Expander_Active and not ALFA_Mode)
2695 2011-08-30 Tristan Gingold <gingold@adacore.com>
2697 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
2698 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
2699 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
2700 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
2702 2011-08-30 Gary Dismukes <dismukes@adacore.com>
2704 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
2705 access conversions to check that the conversion is a rewritten node,
2706 rather than just having Comes_From_Source set to False, which wasn't
2709 2011-08-30 Robert Dewar <dewar@adacore.com>
2711 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
2712 g-socket.ads: Minor reformatting.
2714 2011-08-30 Thomas Quinot <quinot@adacore.com>
2716 * sem_util.adb: Minor reformatting.
2718 2011-08-30 Tristan Gingold <gingold@adacore.com>
2720 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
2721 to be compliant with the ABI.
2723 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
2725 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
2726 of a designated type when the related access type is an actual in an
2727 instance. This ensures that the full view of designated type is
2728 available when inside the body of the instance.
2730 2011-08-30 Ed Schonberg <schonberg@adacore.com>
2732 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
2733 in a position to be modified, a slice is treated like an indexed
2736 2011-08-30 Thomas Quinot <quinot@adacore.com>
2738 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
2739 field tv_sec in struct timeval.
2741 2011-08-30 Yannick Moy <moy@adacore.com>
2743 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
2744 blocks of code doing full expansion, previously only guarded by
2745 Expander_Active, by anding the test that ALFA_Mode is not set
2747 2011-08-30 Ed Schonberg <schonberg@adacore.com>
2749 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
2750 add the function to the list of private dependents, for subsequent
2751 legality check on Taft amendment types.
2752 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
2753 Private_Dependents, as for other incomplete types.
2754 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
2755 Taft-amendment type is used as the return type of a function.
2757 2011-08-30 Javier Miranda <miranda@adacore.com>
2759 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
2760 which emits an error by a call to a new routine which report the error.
2761 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
2762 entity does not cover an existing interface.
2763 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
2765 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
2766 protected procedures or entries whose mode is not conformant.
2767 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
2768 an error by a call to a new routine which report the error.
2770 2011-08-30 Robert Dewar <dewar@adacore.com>
2772 * gnat_rm.texi: Minor change.
2773 * exp_attr_light.adb: Minor reformatting.
2775 2011-08-30 Ed Schonberg <schonberg@adacore.com>
2777 * sem_ch3.adb: Patch inheritance of aspects in
2778 Complete_Private_Subtype, to avoid infinite loop.
2780 2011-08-30 Javier Miranda <miranda@adacore.com>
2782 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
2783 been reported and a subprogram covering an interface primitive is not
2784 found then skip generating the internal entity. Done to avoid crashing
2786 (Check_Abstract_Overriding): Change text of error of wrong formal of
2787 protected subprogram or entry. Done for consistency to emit exactly the
2788 same error reported by Check_Synchronized_Overriding. In addition, the
2789 error is restricted to protected types (bug found working on AI05-0090)
2791 2011-08-30 Yannick Moy <moy@adacore.com>
2793 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
2794 expansion in Alfa mode.
2795 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
2796 * exp_light.adb, exp_light.ads: New package defining light expansion.
2797 * expander.adb (Expand): Call light expansion in Alfa mode
2798 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
2800 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
2802 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
2803 * gnat1drv.adb (Adjust_Global_Switches): Comment
2805 2011-08-30 Yannick Moy <moy@adacore.com>
2807 * lib-xref-alfa.adb: Minor refactoring.
2809 2011-08-30 Yannick Moy <moy@adacore.com>
2811 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
2813 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
2814 expansion in Alfa mode.
2815 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
2818 2011-08-30 Robert Dewar <dewar@adacore.com>
2820 * debug_a.adb: Update comment.
2822 2011-08-30 Robert Dewar <dewar@adacore.com>
2824 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
2825 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
2826 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
2827 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
2829 2011-08-30 Robert Dewar <dewar@adacore.com>
2831 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
2834 2011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
2836 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
2837 Build_Finalization_Master by supplying an insertion node and enclosing
2838 scope. In its old version, the call did not generate a finalization
2840 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
2841 recognize anonymous access-to-controlled components. Rewrite the
2842 machinery which creates finalization masters to service anonymous
2843 access-to-controlled components of a record type. In its current state,
2844 only one heterogeneous master is necessary to handle multiple anonymous
2846 (Freeze_Type): Comment reformatting.
2847 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
2849 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
2850 associates TSS primitive Finalize_Address with either the master itself
2851 or with the internal hash table depending on the mode of operation of
2854 2011-08-30 Javier Miranda <miranda@adacore.com>
2856 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
2857 interface type then do not generate code to compare this component.
2858 Required since they have no components and their equality operator is
2861 2011-08-30 Steve Baird <baird@adacore.com>
2863 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
2864 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
2865 returns the (static) accessibility level of the object. Otherwise, the
2866 same as Type_Access_Level.
2867 (Dynamic_Accessibility_Level): New function; given an expression which
2868 could occur as the rhs of an assignment to a saooaaat (i.e., an
2869 expression of an access-to-object type), return the new value for the
2870 saooaaat's associated Extra_Accessibility object.
2871 (Effective_Extra_Accessibility): New function; same as
2872 Einfo.Extra_Accessibility except that object renames are looked through.
2874 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
2875 (Dynamic_Accessibility_Level): New function; see sem_util.ads
2877 (Effective_Extra_Accessibility): New function; see sem_util.ads
2879 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
2880 (Extra_Accessibility): Update comments.
2881 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
2882 except RM_Size field (which is only for types) is unaffected.
2884 (Extra_Accessibility): Expand domain to allow objects, not just formals.
2885 (Set_Extra_Accessibility): Expand domain to allow objects, not just
2887 (Init_Size): Add assertion that we are not trashing the
2888 Extra_Accessibility attribute of an object.
2889 (Init_Size_Align): Add assertion that we are not trashing the
2890 Extra_Accessibility attribute of an object.
2891 (Init_Object_Size_Align): New procedure; see einfo.ads description.
2892 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
2893 differently for the type of a (non-library-level) saooaaat depending
2894 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
2895 is queried in this set of changes - everything else (in particular,
2896 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
2897 driven off of the setting of the Is_Local_Anonymous_Access attribute.
2898 The special treatment of library-level saooaaats is an optimization,
2899 not required for correctnesss. This is based on the observation that the
2900 Ada2012 rules (static and dynamic) for saooaaats turn out to be
2901 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
2903 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
2904 false for the type of a saooaaat, declare and initialize its
2905 accessibility level object and set the Extra_Accessibility attribute
2906 of the saooaaat to refer to this object.
2907 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
2908 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
2909 calls to Effective_Extra_Accessibility in order to support
2910 renames of saooaaats.
2911 (Expand_N_Type_Conversion): Add new local function,
2912 Has_Extra_Accessibility, and call it when determining whether an
2913 accessibility check is needed.
2914 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
2915 evaluate to True (without raising an exception).
2917 (Expand_N_Assignment_Statement): When assigning to an Ada2012
2918 saooaaat, update its associated Extra_Accessibility object (if
2919 it has one). This includes an accessibility check.
2920 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
2921 a saooaaat, update its Extra_Accessibility object too (if it
2923 (Expand_Call): Replace a couple of calls to Type_Access_Level
2924 with calls to Dynamic_Access_Level to handle cases where
2925 passing a literal (any literal) is incorrect.
2926 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
2927 checks associated with "Saooaat := Some_Object'Access;"; this must
2928 be rejected if Some_Object is declared in a more nested scope
2930 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
2931 assignment to a saooaaat even if Is_Local_Anonymous_Access
2932 returns False for its type (indicating a 2012-style saooaaat).
2934 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
2935 (which is only appropriate for objects, not types) with a call
2936 of Init_Object_Size_Align in order to avoid trashing the
2937 Extra_Accessibility attribute of a rename (the two attributes
2940 (Valid_Conversion) Replace six calls to Type_Access_Level with
2941 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
2942 Ada2012 non-library-level saooaaat, the former returns library level
2943 while the latter returns the (static) accessibility level of the
2944 saooaaat. A type conversion to the anonymous type of a saooaaat
2945 can only occur as part of an assignment to the saooaaat, so we
2946 know that such a conversion must be in a lhs context, so Deepest
2947 yields the result that we need. If such a conversion could occur,
2948 say, as the operand of an equality operator, then this might not
2949 be right. Also add a test so that static accessibilty checks are
2950 performed for converting to a saooaaat's type even if
2951 Is_Local_Anonymous_Access yields False for the type.
2953 2011-08-30 Javier Miranda <miranda@adacore.com>
2955 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
2956 controls generation of a warning associated with late declaration of
2957 dispatching functions. Required to avoid generating spurious
2960 2011-08-30 Gary Dismukes <dismukes@adacore.com>
2962 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
2963 return object has an anonymous access type and the function's type is
2964 a named access type.
2965 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
2966 conversions on implicit conversions, since such conversions can occur
2967 for anonymous access cases due to expansion. Issue error for attempt
2968 to rename an anonymous expression as an object of a named access type.
2969 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
2970 to indicate whether this function should report errors on invalid
2972 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
2973 the expression is of an anonymous access type and the expected type is
2974 a named general access type, rewrite the expression as a type
2975 conversion, unless this is an expression of a membership test.
2976 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
2977 calling of Error_Msg_N on new formal Report_Errs.
2978 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
2979 calling of Error_Msg_NE on new formal Report_Errs.
2980 (Valid_Conversion): Move declaration of this function to the package
2981 spec, to allow calls from membership test processing. For Ada 2012,
2982 enforce legality restrictions on implicit conversions of anonymous
2983 access values to general access types, disallowing such conversions in
2984 cases where the expression has a dynamic accessibility level (access
2985 parameters, stand-alone anonymous access objects, or a component of a
2986 dereference of one of the first two cases).
2987 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
2988 in the context of a named general access expected type.
2989 * exp_ch4.adb Add with and use of Exp_Ch2.
2990 (Expand_N_In): Add processing for membership tests applied to
2991 expressions of an anonymous access type. First, Valid_Conversion is
2992 called to check whether the test is statically False, and then the
2993 conversion is expanded to test that the expression's accessibility
2994 level is no deeper than that of the tested type. In the case of
2995 anonymous access-to-tagged types, a tagged membership test is applied
2997 (Tagged_Membership): Extend to handle access type cases, applying the
2998 test to the designated types.
2999 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
3000 accessibility level, and the actual is a 'Access applied to a current
3001 instance, pass the accessibility level of the type of the current
3002 instance rather than applying Object_Access_Level to the prefix. Add a
3003 ??? comment, since this level isn't quite right either (will eventually
3004 need to pass an implicit level parameter to init procs).
3006 2011-08-30 Bob Duff <duff@adacore.com>
3008 * s-taskin.ads: Minor comment fix.
3010 2011-08-30 Ed Schonberg <schonberg@adacore.com>
3012 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
3013 component and the selector is a dispatching operation, check if it is
3014 a prefixed call before rewriting as a parameterless function call.
3016 2011-08-29 Jakub Jelinek <jakub@redhat.com>
3018 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
3019 tsystem.h into $(RTSDIR) instead of rts.
3021 2011-08-29 Robert Dewar <dewar@adacore.com>
3023 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
3025 * gcc-interface/Make-lang.in: Update dependencies.
3027 2011-08-29 Yannick Moy <moy@adacore.com>
3029 * alfa.ads (Name_Of_Heap_Variable): New constant name.
3030 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
3031 table to hold dereferences.
3032 (Add_ALFA_Xrefs): Take into account dereferences as special
3033 reads/writes to the variable "HEAP".
3034 (Enclosing_Subprogram_Or_Package): Move subprogram here.
3035 (Generate_Dereference): New procedure to store a read/write dereferencew
3037 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
3038 the special "HEAP" var.
3039 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
3041 * sem_util.adb (Note_Possible_Modification): Store write dereference
3044 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3046 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
3047 ensures that the level of the subpool access type is not deeper than
3048 that of the pool object.
3049 * sem_util.adb (Object_Access_Level): Expand to handle defining
3051 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
3052 subpool handle name of a rewritten allocator.
3054 2011-08-29 Robert Dewar <dewar@adacore.com>
3056 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
3058 2011-08-29 Thomas Quinot <quinot@adacore.com>
3060 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
3061 values, we generate multiple triples of parameters in the TypeCode.
3062 Bump Choice_Index for each such triple so that a subsequent default
3063 choice is associated with the correct index in the typecode.
3065 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3067 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
3069 (First, Last): Handle properly an iterator over a null container.
3071 2011-08-29 Bob Duff <duff@adacore.com>
3073 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
3074 processing if we run across a node with no Scope. This can happen if
3075 we're with-ing an library-level instance, and that instance got errors
3076 that caused "instantiation abandoned".
3077 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
3078 an exception instead of using Assert, so it won't go into an infinite
3079 loop, even when assertions are turned off.
3081 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3083 * a-coorse.adb: Proper handling of empty ordered sets.
3085 2011-08-29 Johannes Kanig <kanig@adacore.com>
3087 * debug.adb: Add comments.
3089 2011-08-29 Thomas Quinot <quinot@adacore.com>
3091 * a-except.adb, a-except-2005.adb: Minor comment rewording and
3094 2011-08-29 Yannick Moy <moy@adacore.com>
3096 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
3097 declaration for Itypes in Alfa mode.
3099 2011-08-29 Robert Dewar <dewar@adacore.com>
3101 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
3102 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
3103 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
3106 2011-08-29 Tristan Gingold <gingold@adacore.com>
3108 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
3110 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
3111 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
3114 2011-08-29 Robert Dewar <dewar@adacore.com>
3116 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
3118 2011-08-29 Javier Miranda <miranda@adacore.com>
3120 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
3121 renamings of formal subprograms when the actual for a formal type is
3124 2011-08-29 Matthew Heaney <heaney@adacore.com>
3126 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
3129 2011-08-29 Matthew Heaney <heaney@adacore.com>
3131 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
3132 components of record type.
3133 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
3136 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3138 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
3139 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
3142 2011-08-29 Robert Dewar <dewar@adacore.com>
3144 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
3147 2011-08-29 Matthew Heaney <heaney@adacore.com>
3149 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
3150 components of record type.
3152 2011-08-29 Bob Duff <duff@adacore.com>
3154 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
3155 by the termination handler.
3157 2011-08-29 Yannick Moy <moy@adacore.com>
3159 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
3160 created in Alfa mode, instead of inserting artificial declarations of
3161 non-Itypes in the tree.
3162 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
3163 know if an Itype has a corresponding declaration, as defined in
3166 2011-08-29 Yannick Moy <moy@adacore.com>
3168 * gnat1drv.adb: Minor rewrite.
3170 2011-08-29 Bob Duff <duff@adacore.com>
3172 * s-tasuti.adb (Make_Passive): Work around race condition in
3173 Make_Independent, which can cause Wait_Count to be zero. So instead of
3174 asserting that Wait_Count > 0, and then decrementing it, decrement it
3175 only if Wait_Count > 0.
3176 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
3177 should be nonnegative, so declare them Natural instead of Integer.
3179 2011-08-29 Robert Dewar <dewar@adacore.com>
3181 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
3182 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
3183 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
3184 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
3185 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
3187 2011-08-29 Tristan Gingold <gingold@adacore.com>
3189 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
3191 2011-08-29 Vadim Godunko <godunko@adacore.com>
3193 * s-parint.ads: Minor comment clarification.
3195 2011-08-29 Vincent Celier <celier@adacore.com>
3197 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
3198 may be used as identifiers.
3200 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3202 * a-coinho.ads: Minor reformating.
3204 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3206 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
3207 container of a derived type.
3209 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3211 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
3212 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
3214 2011-08-29 Pascal Obry <obry@adacore.com>
3216 * exp_disp.adb: Minor comment fix.
3217 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
3218 to avoid warnings when compiling with -Wall.
3219 (Make_Disp_Conditional_Select_Body): Likewise.
3220 (Make_Disp_Timed_Select_Body): Likewise.
3222 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3224 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
3225 an entity name, generate reference for it.
3227 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3229 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
3231 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
3232 the class-wide type.
3233 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
3235 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3237 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
3238 subtype for an object whose type is an unconstrained union.
3240 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3242 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
3243 is allowed in a component definition, by AI95-406.
3245 2011-08-29 Matthew Heaney <heaney@adacore.com>
3247 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
3249 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3251 * a-except-2005.adb: Alphabetize all routines.
3252 (Triggered_By_Abort): New routine.
3253 * a-except-2005.ads (Triggered_By_Abort): New routine.
3254 * a-except.adb Alphabetize all routines.
3255 (Triggered_By_Abort): New routine.
3256 * a-except.ads (Triggered_By_Abort): New routine.
3257 * exp_ch7.adb: Update all comments involving the detection of aborts in
3259 (Build_Object_Declarations): Do not generate code to detect the
3260 presence of an abort at the start of finalization code, use a runtime
3262 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
3264 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
3265 allocate a task on a subpool.
3266 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
3267 The flag disables all actions related to the maintenance of
3268 Finalize_Address_Table when subpools are not in use.
3269 (Allocate_Any_Controlled): Signal the machinery that subpools are in
3271 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
3272 performs costly task locking when subpools are not in use.
3274 2011-08-29 Yannick Moy <moy@adacore.com>
3276 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
3277 types and dispatching calls in Alfa mode.
3278 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
3279 correspondance between body and spec scopes, to reuse utility functions
3280 (Traverse_Declarations_Or_Statements): Protect access to body for stub
3281 by testing the presence of the library unit for the body
3282 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
3283 mode the expansion of accept statements is skipped
3284 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
3285 the unique entity corresponding to the one returned by
3286 Unique_Defining_Entity applied to the enclosing declaration of the
3289 2011-08-29 Bob Duff <duff@adacore.com>
3291 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
3292 gdb when x is not a node (it can be a node list, name_id, etc). pp is
3293 an alias for pn. ppp is an alias for pt.
3295 2011-08-29 Javier Miranda <miranda@adacore.com>
3297 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
3298 aggregate to take a consistent decision on the need to convert into
3299 assignments aggregates that initialize constant objects.
3301 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3303 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
3304 Build_Allocate_Deallocate_Proc in order to handle allocation of
3305 non-controlled objects on subpools.
3306 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
3307 to be end-user visible.
3308 * s-finmas.adb: Add with and use clause for System.HTable.
3309 Add an instantiation of Simple_HTable which provides a mapping between
3310 the address of a controlled object and the corresponding
3311 Finalize_Address used to clean up the object. The table is used when a
3312 master is operating in heterogeneous mode.
3313 (Attach): Explain why the input node is not verified on being already
3315 (Delete_Finalize_Address): New routine.
3316 (Detach): Add pragma Assert which ensures that a node is already
3318 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
3319 since nodes are no longer removed on traversal. Explain why node
3320 detachment is undesirable in this case.
3321 (Get_Finalize_Address): New routine.
3322 (Hash): New routine.
3323 (Is_Empty_List): Removed.
3324 (pm): Renamed to Print_Master. Add output for discriminant
3326 Comment reformatting.
3327 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
3328 * s-finmas.ads: Various comments additions / improvements.
3329 Type Finalization_Master has a discriminant which determines the mode of
3331 (Delete_Finalize_Address): New routine.
3332 (Get_Finalize_Address): New routine.
3333 (pm): Renamed to Print_Master.
3334 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
3335 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
3336 use clause for System.IO.
3337 (Allocate_Any_Controlled): Add machinery to set TSS primitive
3338 Finalize_Address depending on the mode of allocation and the mode of
3340 (Deallocate_Any_Controlled): Remove the relation pair object -
3341 Finalize_Address regardless of the master mode. Add comment explaining
3343 (Detach): Ensure that fields Prev and Next are null after detachment.
3344 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
3345 scheme to check whether the list of subpools is empty. There is no
3346 longer need to store the next subpool or advance the current pointer.
3347 (Is_Empty_List): New routine.
3348 (Print_Pool): New routine.
3349 (Print_Subpool): New routine.
3350 * s-stposu.ads: Various comments additions / improvements.
3351 Field Master of type Root_Subpool is now a heterogeneous collection.
3352 (Print_Pool): New routine.
3353 (Print_Subpool): New routine.
3355 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3357 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
3358 forms, using aspects of container types.
3359 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
3360 Has_Implicit_Dereference flags, that may be set on the partial view.
3361 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
3362 container type with an indexing aspect.
3363 (Analyze_Quantified_Expression): Analyze construct with expansion
3364 disabled, because it will be rewritten as a loop during expansion.
3365 (Try_Container_Indexing): The prefix itself may be a container type
3366 with an indexing aspect, as with a vector of vectors.
3367 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
3368 the original doamin of iteration, for name capture.
3369 (Analyze_Iterator_Specification): If the domain is an expression that
3370 needs finalization, create a separate declaration for it.
3371 For an iterator with "of" retrieve default iterator info from aspect of
3372 container type. For "in" iterator, retrieve type of Iterate function.
3373 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
3374 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
3375 analysis, to prevent spurious errors about late attributes.
3376 * sprint.adb: Handle quantified expression with either loop or iterator
3378 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
3381 2011-08-29 Vincent Celier <celier@adacore.com>
3383 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
3384 Binder or Linker of the main project file.
3386 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3388 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
3391 2011-08-29 Yannick Moy <moy@adacore.com>
3393 * exp_ch9.adb: Partial revert of previous change for Alfa mode
3395 2011-08-29 Yannick Moy <moy@adacore.com>
3397 * exp_ch11.adb: Minor expansion of comment.
3399 2011-08-29 Yannick Moy <moy@adacore.com>
3401 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
3403 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3405 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
3406 interpretation, set the type before resolving the operands, because
3407 legality checks on an exponention operand need to know the type of the
3410 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3412 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
3413 cleanups on a master if the instance is within a generic unit.
3414 Complement to the corresponding fix to inline.adb for K520-030.
3416 2011-08-29 Tristan Gingold <gingold@adacore.com>
3418 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
3420 * exp_intr.adb: Minor comment fix.
3422 2011-08-29 Bob Duff <duff@adacore.com>
3424 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
3425 Delay_Required was used as an uninitialized variable.
3427 2011-08-29 Robert Dewar <dewar@adacore.com>
3429 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
3430 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
3431 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
3433 2011-08-29 Thomas Quinot <quinot@adacore.com>
3435 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
3436 Remove unused variables.
3438 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3440 * sem_res.adb: Remove Build_Explicit_Dereference.
3441 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
3442 from sem_res.adb, used in analysis of additional constructs.
3443 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
3444 expansion of iterators.
3445 (Is_Object_Reference): Recognize variables rewritten as explicit
3446 dereferences in Ada2012.
3447 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
3448 Reversible_Iterator names, for expansion of Ada2012 iterators.
3449 * aspects.ads, aspects.adb (Find_Aspect): Utility.
3450 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
3451 linked list container.
3452 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
3453 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
3455 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3457 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
3460 2011-08-29 Vincent Celier <celier@adacore.com>
3462 * make.adb (Gnatmake): Get the maximum number of simultaneous
3463 compilation processes after the Builder switches has been scanned, as
3464 there may include -jnn.
3466 2011-08-29 Matthew Heaney <heaney@adacore.com>
3468 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
3470 2011-08-29 Tristan Gingold <gingold@adacore.com>
3472 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
3473 GNAT_DRIVER_COMMAND_LINE to 255.
3475 2011-08-29 Pascal Obry <obry@adacore.com>
3477 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
3478 reformatting and style fix (class attribute casing).
3480 2011-08-29 Yannick Moy <moy@adacore.com>
3482 * exp_ch11.adb: Yet another case where expansion should be common
3483 between CodePeer and Alfa.
3485 2011-08-29 Yannick Moy <moy@adacore.com>
3487 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
3489 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3491 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
3492 incomplete type and its completion match.
3494 2011-08-29 Yannick Moy <moy@adacore.com>
3496 * exp_ch13.adb: Adjust previous change.
3498 2011-08-29 Robert Dewar <dewar@adacore.com>
3500 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
3501 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
3504 2011-08-29 Emmanuel Briot <briot@adacore.com>
3506 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
3507 initialize aggregated projects.
3509 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3511 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
3512 depth of candidates to resolve a potentially spurious ambiguity between
3513 two visible subprograms.
3515 2011-08-29 Yannick Moy <moy@adacore.com>
3517 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
3519 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
3520 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
3523 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3525 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
3528 2011-08-29 Thomas Quinot <quinot@adacore.com>
3530 * sem_res.adb: Minor reformatting.
3532 2011-08-29 Johannes Kanig <kanig@adacore.com>
3534 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
3536 * gnat1drv.adb (Adjust_Global_Switches): Set
3537 Use_Expressions_With_Actions to False in ALFA mode.
3538 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
3541 2011-08-29 Yannick Moy <moy@adacore.com>
3543 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
3544 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
3545 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
3546 tagged types and dispatching calls in Alfa mode.
3548 2011-08-29 Javier Miranda <miranda@adacore.com>
3550 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
3551 we do not report an error on an Empty node.
3553 2011-08-29 Geert Bosch <bosch@adacore.com>
3555 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
3556 a-nlrear.o and a-nurear.o.
3558 2011-08-29 Robert Dewar <dewar@adacore.com>
3560 * freeze.adb: Minor code reorganization.
3562 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
3563 sem_ch6.adb: Minor reformatting
3565 2011-08-29 Tristan Gingold <gingold@adacore.com>
3567 * s-except.ads, s-except.adb: Provide dummy body.
3569 2011-08-29 Yannick Moy <moy@adacore.com>
3571 * sem_warn.adb (Within_Postcondition): Take into account the case of
3572 an Ensures component in a Test_Case.
3574 2011-08-29 Tristan Gingold <gingold@adacore.com>
3576 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
3577 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
3578 System_Exceptions_Debug
3579 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
3580 * a-except.adb: With and use System.Exceptions_Debug instead of
3582 * a-except-2005.adb: Likewise.
3583 * s-assert.adb: Likewise.
3584 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
3585 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
3586 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
3587 s-excdeb. Update dependencies.
3588 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
3589 as these no longer need external libraries.
3591 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3593 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
3594 exponentiation operator on universal values in a context that requires
3597 2011-08-29 Tristan Gingold <gingold@adacore.com>
3599 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
3600 before calling notify_handled_exception.
3601 * a-exextr.adb: Fix comment.
3603 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3605 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
3606 Finalize_Address of the access type's finalization master.
3607 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
3608 access type's finalization master. Add a guard to prevent
3609 Associated_Storage_Pool from being set on .NET/JVM.
3610 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
3611 attribute Finalize_Address of the access type's finalization master.
3612 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
3613 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
3614 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
3616 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
3617 use clause for System.IO
3618 (Detach): Relax the assertion, to be reinstated later.
3619 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
3620 Relax the assertion on Finalize_Address, to be reinstated later.
3621 (Is_Empty_List): New routine.
3622 (pm): New debug routine.
3623 (Set_Finalize_Address): New routine.
3624 * s-finmas.ads (pm): New debug routine.
3625 (Set_Finalize_Address): New routine.
3626 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
3628 2011-08-29 Tristan Gingold <gingold@adacore.com>
3630 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
3631 Remove convention C.
3633 2011-08-29 Tristan Gingold <gingold@adacore.com>
3635 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
3636 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
3637 (Finalize_TCB): Remove its finalization.
3638 (Initialize): Remove assignment of GET_Exc_Stack_Addr
3639 * s-soflin.adb (NT_Exc_Stack): Remove
3640 (Get_Exc_Stack_Addr_NT): Likewise.
3641 (Get_Exc_Stack_Addr_Soft): Likewise.
3642 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
3643 (Get_Exc_Stack_Addr): Likewise.
3644 (Get_Exc_Stack_Addr_Soft): Likewise
3645 * s-taspri-vms.ads (Exc_Stack_T): Remove.
3646 (Exc_Stack_Ptr_T): Likewise.
3647 (Private_Data): Remove Exc_Stack_Ptr component.
3649 2011-08-29 Tristan Gingold <gingold@adacore.com>
3651 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
3653 2011-08-29 Tristan Gingold <gingold@adacore.com>
3655 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
3657 2011-08-29 Geert Bosch <bosch@adacore.com>
3659 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
3660 L2_Norm, Swap_Column): New generic subprograms
3661 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
3662 L2_Norm, Swap_Column): Implement new subprograms in order to
3663 eliminate dependency on BLAS and LAPACK libraries in
3664 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
3665 version. Forward_Eliminate/Back_Substitute can be used to put a
3666 matrix in row echelon or reduced row echelon form using partial
3668 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
3669 Swap_Column): Instantiate from System.Generic_Array_Operations.
3670 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
3671 (Sqrt): Local function for simple computation of square root without
3672 adding dependencies on Generic_Elementary_Functions.
3673 (Swap): New subprogram to exchange floating point numbers.
3674 (Inverse): Reimplement using Jordan-Gauss elimination.
3675 (Jacobi): New procedure implementing Jacobi's method for computation
3676 of eigensystems, based on Rutishauser's implementation.
3677 (L2_Norm): Implement directly using the inner product.
3678 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
3679 decreasing eigenvalue as required by the Ada RM.
3680 (Swap_Column): New helper procedure for Sort_Eigensystem.
3681 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
3682 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
3685 2011-08-29 Thomas Quinot <quinot@adacore.com>
3687 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
3690 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3692 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
3693 than the current node.
3694 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
3695 Finalization_Master. The list headers have two fields instead of three.
3696 This should fix alignment issue but subpool allocations are now
3697 unusable. Alphabetize subprograms.
3698 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
3699 the size of the header when converting the beginning of the object to
3700 a FM_Node. Set the master's Finalize_Address attribute if not already
3702 (Deallocate_Any_Controlled): Use the offset rather than the size of the
3703 header when converting the beginning of the object to a FM_Node.
3705 2011-08-29 Gary Dismukes <dismukes@adacore.com>
3707 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
3708 reraise when compiling for CodePeer.
3710 2011-08-29 Arnaud Charlet <charlet@adacore.com>
3712 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
3713 now needed by a-convec.adb. Fix warning.
3715 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3717 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
3718 processing of TSS routine Finalize_Address when compiling in
3721 2011-08-29 Thomas Quinot <quinot@adacore.com>
3723 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
3724 sem_warn.adb: Minor reformatting.
3726 2011-08-29 Emmanuel Briot <briot@adacore.com>
3728 * prj-conf.adb (Get_Config_Switches): Also collect the list of
3729 languages from aggregated projects.
3731 2011-08-29 Yannick Moy <moy@adacore.com>
3733 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
3734 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
3735 Traverse_Package_Declaration, Traverse_Subprogram_Body,
3736 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
3737 for stubs are traversed too when parameter is set
3738 (Traverse_All_Compilation_Units): Traverse without going inside stubs
3739 (Traverse_Declarations_Or_Statements): Do the special traversing for
3740 stubs when required.
3741 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
3742 return subprogram or package body from stub.
3743 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
3744 stubs without prior subprogram decl.
3746 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
3748 * gnat_ugn.texi: Fix typo.
3750 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3752 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
3753 which accounts for size vs alignment issues and calculates the size of
3755 (Deallocate_Any_Controlled): Ditto.
3756 (Nearest_Multiple_Rounded_Up): New routine.
3758 2011-08-29 Tristan Gingold <gingold@adacore.com>
3760 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
3761 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
3762 (Set_Exception_Msg): Ditto.
3763 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
3765 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
3766 Use Save_Occurrence instead of Save_Occurrence_No_Private.
3767 (Raise_With_Msg): Remove Cleanup_Flag.
3768 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
3769 Clean_Flag and Private_Data components.
3771 2011-08-29 Yannick Moy <moy@adacore.com>
3773 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
3775 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
3776 of an explicitly declared type, so that the base types of the original
3777 type and this generated type are the same, and a "type" (not a subtype
3779 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
3780 small" in Alfa mode, like in CodePeer mode.
3781 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
3782 clauses in Alfa mode.
3784 2011-08-29 Javier Miranda <miranda@adacore.com>
3786 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
3787 function to the package spec.
3788 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
3789 internally generated bodies of null procedures locate the internally
3790 generated spec enforcing mode conformance.
3791 (Is_Interface_Conformant): Ensure that the controlling formal of the
3794 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3796 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
3797 reject the pragma if it appears to apply to a formal subprogram.
3799 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3801 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
3802 inner expression, to prevent double evaluation.
3804 2011-08-29 Tristan Gingold <gingold@adacore.com>
3806 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
3808 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
3809 * a-except-2005.adb (Propagate_Exception): Adjust spec.
3810 (Raise_Current_Excep): Adjust call.
3811 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
3813 2011-08-29 Thomas Quinot <quinot@adacore.com>
3815 * exp_disp.adb: Minor reformatting.
3817 2011-08-29 Tristan Gingold <gingold@adacore.com>
3819 * a-exexpr.adb (Setup_Exception): Removed.
3820 * a-exexpr-gcc.adb (Setup_Exception): Removed.
3821 * a-except.adb (Exception_Propagation): Removed.
3822 * a-except-2005.adb (Setup_Exception): Removed.
3823 (Reraise): Remove call to Setup_Exception.
3824 (Reraise_Occurrence): Ditto.
3825 (Reraise_Occurrence_Always): Ditto.
3826 (Reraise_Occurrence_No_Defer): Ditto.
3827 (Transfer_Occurrence): Ditto.
3828 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
3829 (Set_Exception_Msg): Ditto.
3831 2011-08-29 Robert Dewar <dewar@adacore.com>
3833 * a-convec.adb, exp_disp.adb: Minor reformatting.
3835 2011-08-29 Tristan Gingold <gingold@adacore.com>
3837 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
3839 2011-08-29 Gary Dismukes <dismukes@adacore.com>
3841 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
3842 Exception_Handlers to No_List instead of Empty_List in the case where
3843 there are no handlers.
3845 2011-08-29 Tristan Gingold <gingold@adacore.com>
3847 * gcc-interface/gigi.h (enum standard_datatypes): Add
3848 ADT_reraise_zcx_decl
3849 (reraise_zcx_decl): New macro.
3850 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
3851 (gigi): Set reraise_zcx_decl.
3852 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
3853 (gnat_to_gnu): Handle N_Raise_Statement.
3855 2011-08-29 Robert Dewar <dewar@adacore.com>
3857 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
3858 a-undesu.adb: Minor reformatting.
3860 2011-08-29 Ed Schonberg <schonberg@adacore.com>
3862 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
3863 table, accept an unfrozen untagged component if it is an actual for a
3864 formal incomplete type.
3865 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
3866 provide new iterator forms over vectors.
3867 Introduce type Iterator in package body to implement operations of
3868 Reversible_Iterator interface.
3869 * a-iteint.ads: Make package pure so it is usable with new container
3870 packages, that are categorized Remote_Types.
3872 2011-08-29 Robert Dewar <dewar@adacore.com>
3874 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
3876 2011-08-29 Bob Duff <duff@adacore.com>
3878 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
3879 of <>, because this is the routine that checks for dimensionality
3880 errors (for example, for a two-dimensional array, (others => <>) should
3881 be (others => (others => <>)).
3883 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3885 * impunit.adb: Add new run-time units.
3886 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
3887 s-stposu.ads, s-stposu.adb: Code clean up.
3888 Handle protected class-wide or task class-wide types
3889 Handle C/C++/CIL/Java types.
3890 * s-spsufi.adb, s-spsufi.ads: New files.
3892 2011-08-29 Yannick Moy <moy@adacore.com>
3894 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
3895 library-level subprogram.
3896 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
3898 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
3900 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
3902 * gnat_rm.texi: Update doc for Test_Case pragma.
3904 2011-08-29 Tristan Gingold <gingold@adacore.com>
3906 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
3908 (GCC_Exception_Access): New type.
3909 (Unwind_DeleteException): New imported procedure
3910 (Foreign_Exception): Import it.
3911 (GNAT_GCC_Exception): Simply have the occurrence inside.
3912 (To_GCC_Exception): New function.
3913 (To_GNAT_GCC_Exception): New function.
3914 (GNAT_GCC_Exception_Cleanup): New procedure..
3915 (Propagate_GCC_Exception): New procedure.
3916 (Reraise_GCC_Exception): New procedure.
3917 (Setup_Current_Excep): New procedure.
3918 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
3919 (Unwind_RaiseException): Ditto.
3920 (Unwind_ForcedUnwind): Ditto.
3922 (Begin_Handler): Change type of parameter.
3923 (End_Handler): Ditto. Now delete the exception if still present.
3924 (Setup_Key): Removed.
3925 (Is_Setup_And_Not_Propagated): Removed.
3926 (Set_Setup_And_Not_Propagated): Ditto.
3927 (Clear_Setup_And_Not_Propagated): Ditto.
3928 (Save_Occurrence_And_Private): Ditto.
3929 (EID_For): Add 'not null' constraint on parameter.
3930 (Setup_Exception): Does nothing.
3931 (Propagate_Exception): Simplified.
3932 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
3933 re-raise is not expanded anymore.
3934 * s-except.ads (Foreign_Exception): New exception - placeholder for
3936 * raise-gcc.c (__gnat_setup_current_excep): Declare
3937 (CXX_EXCEPTION_CLASS): Define (not yet used)
3938 (GNAT_EXCEPTION_CLASS): Define.
3939 (is_handled_by): Handle foreign exceptions.
3940 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
3942 2011-08-29 Jose Ruiz <ruiz@adacore.com>
3944 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
3946 2011-08-29 Thomas Quinot <quinot@adacore.com>
3948 * a-synbar-posix.adb: Minor reformatting.
3950 2011-08-29 Jose Ruiz <ruiz@adacore.com>
3952 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
3953 a-exetim-default.ads (Interrupt_Clocks_Supported,
3954 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
3955 definitions to be compliant with AI-0171. The target systems do not
3956 support separate account for the execution time of interrupt handlers.
3958 2011-08-29 Jose Ruiz <ruiz@adacore.com>
3960 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
3961 in the barrier to put first the easiest to evaluate (and the one which
3962 will be True more often). More efficient.
3964 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
3966 * s-atocou-x86.adb: Fix constraint in machine code insertion.
3968 2011-08-29 Bob Duff <duff@adacore.com>
3970 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
3971 attributes that are now aspects, as specified by AI05-0229-1.
3972 * sem_ch13.adb (Analyze_Aspect_Specifications,
3973 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
3974 pragmas or attribute references, as appropriate.
3976 2011-08-29 Robert Dewar <dewar@adacore.com>
3978 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
3979 a-synbar-posix.ads: Minor reformatting.
3981 2011-08-29 Yannick Moy <moy@adacore.com>
3983 * snames.ads-tmpl: Add name Force.
3985 2011-08-29 Pascal Obry <obry@adacore.com>
3987 * prj-nmsc.adb: Minor reformatting.
3989 2011-08-29 Jose Ruiz <ruiz@adacore.com>
3991 * a-exetim.ads (Interrupt_Clocks_Supported,
3992 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
3993 definitions to be compliant with AI-0171.
3995 2011-08-29 Robert Dewar <dewar@adacore.com>
3997 * a-ngelfu.adb: Add comments.
3999 2011-08-29 Geert Bosch <bosch@adacore.com>
4001 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
4002 the closest machine number to Pi / 2.0.
4004 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4006 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
4007 package Ada.Synchronous_Barriers.
4008 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
4009 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
4010 default implementation using protected objects and another one
4011 a-synbar-posix using POSIX barriers as the underlying support.
4012 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
4013 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
4014 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
4015 Clean up dependencies.
4016 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
4018 2011-08-29 Robert Dewar <dewar@adacore.com>
4020 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
4021 exp_dist.adb: Minor code reorganization.
4024 2011-08-29 Thomas Quinot <quinot@adacore.com>
4026 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
4027 primitive operation must support external streaming if it is not a
4028 controlling access result.
4030 2011-08-29 Thomas Quinot <quinot@adacore.com>
4032 * sinfo.ads, sem_ch7.adb: Minor reformatting.
4034 2011-08-29 Bob Duff <duff@adacore.com>
4036 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
4037 restriction on allocators, as required by AI05-0013-1.
4038 * restrict.ads: Minor comment fix.
4040 2011-08-29 Tristan Gingold <gingold@adacore.com>
4042 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
4043 (To_Jmpbuf_Address): Ditto
4044 (builtin_longjmp): Ditto
4046 2011-08-29 Thomas Quinot <quinot@adacore.com>
4048 * sem_res.adb: Minor reformatting.
4050 2011-08-29 Vincent Celier <celier@adacore.com>
4052 * make.adb (Gnatmake): Move special processing for VM targets after the
4053 call to Get_Target_Parameters.
4055 2011-08-29 Thomas Quinot <quinot@adacore.com>
4057 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
4059 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4061 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
4062 where an anonymous access discriminant of a limited designated type
4063 appears in a non-immutably limited discriminated type and issue an
4064 error message. Add local variable Desig_T and replace all occurrences
4067 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4069 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
4070 implementation is compliant to RM D.15(15/2) after the modification
4071 imposed by AI05-0094-1 (binding interpretation).
4073 2011-08-29 Robert Dewar <dewar@adacore.com>
4075 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
4076 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
4078 2011-08-29 Thomas Quinot <quinot@adacore.com>
4080 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
4081 the scope name, do not report a missing label as a style violation (it
4082 will be diagnosed as an illegality).
4083 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
4084 variant records: Get_Enum_Lit_From_Pos already returns a usage
4085 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
4086 on Expr in Integer_Literal case so that it can be used by
4089 2011-08-29 Tristan Gingold <gingold@adacore.com>
4091 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
4093 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
4094 (Build_Abort_Block_Handler): New function to build an Abort_Signal
4096 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
4097 Build_Abort_Block_Handler to build the exception handler. Do not
4098 undefer aborts for the Abort_Signal exception handler if back-end
4099 exception mechanism.
4100 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
4101 back_end exceptions for all others and abort_signal.
4102 * s-except.ads (ZCX_By_Default): New constant.
4103 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
4104 (Raise_Exception_Always): Ditto.
4105 (Raise_From_Signal_Handler): Ditto.
4106 (Raise_With_Location_And_Msg): Ditto.
4107 (Raise_With_Msg): Ditto.
4109 (Reraise_Occurence): Ditto.
4110 (Reraise_Occurrence_Always): Ditto.
4111 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
4112 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
4114 2011-08-29 Thomas Quinot <quinot@adacore.com>
4116 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
4118 2011-08-29 Robert Dewar <dewar@adacore.com>
4120 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
4121 Minor code reorganization.
4123 2011-08-29 Bob Duff <duff@adacore.com>
4125 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
4126 2012, not just Ada 2005.
4128 2011-08-29 Vincent Celier <celier@adacore.com>
4130 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
4131 with a project file or with gprbuid, if -gnatep= is specified, the
4132 builder may need to be invoked with -x.
4134 2011-08-29 Tristan Gingold <gingold@adacore.com>
4136 * a-exexpr-gcc.adb: Minor comment fix.
4138 2011-08-29 Robert Dewar <dewar@adacore.com>
4140 * sem_ch8.adb: Minor reformatting.
4142 2011-08-29 Bob Duff <duff@adacore.com>
4144 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
4145 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
4146 treating "some" as unreserved in earlier Ada versions. This is now
4147 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
4148 rather than Name_Some, since Tok_Some is now recognized as reserved.
4149 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
4151 * scans.ads: Minor comment fixes.
4152 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
4153 for other language versions.
4154 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
4155 treating "some" as unreserved in earlier Ada versions. This is now
4156 handled in Snames.Is_Keyword_Name.
4157 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
4159 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
4160 unreserved in earlier Ada versions. This is now handled in
4161 Snames.Is_Keyword_Name.
4162 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
4163 words as for other language versions.
4164 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
4165 Ada 2012, not just Ada 2005.
4167 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4169 * sem_ch13.adb: Additional semantic checks for aspects involved in
4172 2011-08-29 Matthew Heaney <heaney@adacore.com>
4174 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
4175 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
4176 Container parameter.
4177 (Ancestor_Find): ditto.
4179 2011-08-29 Thomas Quinot <quinot@adacore.com>
4181 * par-endh.adb: Minor reformatting.
4183 2011-08-29 Tristan Gingold <gingold@adacore.com>
4185 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
4186 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
4187 (Adjust_N_CLeanups_For): Remove.
4188 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
4190 (Propgate_Exception): Adjust.
4191 * raise-gcc.c: Add a few static/const.
4192 (Adjust_N_Cleanups_For): Remove declaration.
4193 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
4195 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4197 * sem_ch8.adb: Use type of function return when rewriting as object
4200 2011-08-29 Gary Dismukes <dismukes@adacore.com>
4202 * sem_type.adb: Minor reformatting.
4204 2011-08-29 Robert Dewar <dewar@adacore.com>
4206 * makeutl.adb: Minor reformatting.
4208 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4210 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
4211 function call of a limited type, the expansion of the renaming is
4212 complicated by the presence of various temporaries and subtypes that
4213 capture constraints of the renamed object.
4214 Rewrite node as an object declaration, whose expansion is simpler.
4215 Given that the object is limited there is no copy involved and no
4218 2011-08-29 Robert Dewar <dewar@adacore.com>
4220 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
4221 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
4223 2011-08-29 Tristan Gingold <gingold@adacore.com>
4225 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
4226 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
4227 system-linux-hppa.ads, system-linux-s390.ads,
4228 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
4229 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
4230 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
4231 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
4232 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
4233 system-solaris-sparc.ads, system-lynxos-x86.ads,
4234 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
4235 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
4236 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
4237 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
4238 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
4239 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
4240 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
4241 * opt.ads: Adjust comment.
4242 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
4243 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
4244 * system.ads: Move GCC_ZCX_Support to obsolete entries.
4246 2011-08-29 Emmanuel Briot <briot@adacore.com>
4248 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
4249 file name is specified on the gnatmake or gprbuild command line, and
4250 before we search for that file in the project.
4252 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4254 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
4255 used to determine whether a possible interpretation for an overloadable
4256 entity is declared within the current instantiation and should be
4257 included in the candidate set.
4259 2011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4261 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
4263 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4265 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
4266 access subtype is access_to_subprogram, when applying checks for
4269 2011-08-29 Matthew Heaney <heaney@adacore.com>
4271 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
4272 for sibling when common parent.
4274 2011-08-29 Thomas Quinot <quinot@adacore.com>
4276 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
4279 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4281 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
4282 for the return type when in ASIS mode.
4284 2011-08-29 Vincent Celier <celier@adacore.com>
4286 * make.adb (Gnatmake): Get the default search dirs, then the target
4287 parameters after getting the Builder switches, as the Builder switches
4288 may include --RTS= and that could change the default search dirs.
4290 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4292 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
4293 Make_Final_Call. Move the processing for class-wide types before the
4294 processing for derivations from [Limited_]Controlled.
4295 (Make_Final_Call): Move the processing for class-wide types before the
4296 processing for derivations from [Limited_]Controlled.
4297 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
4298 Add code to account for alignments larger than the list header. Add a
4299 comment illustrating the structure of the allocated object + padding +
4301 (Deallocate_Any_Controlled): Add code to account for alignments larger
4302 than the list header.
4304 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4306 * sinfo.ads, sinfo.adb: New node kind
4307 N_Formal_Incomplete_Type_Definition, related flags.
4308 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
4309 Parse formal incomplete types.
4310 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
4312 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
4313 Formal incomplete types do not need completion.
4314 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
4315 Validate_Incomplete_Type_Instance): New procedures to handle formal
4317 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
4318 that corresponds to a formal incomplete type.
4319 * sprint.adb: Handle formal incomplete type declarations.
4320 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
4323 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4325 * a-fihema.ads, a-fihema.adb: Unit removed.
4326 * a-undesu.ads, a-undesu.adb: New unit implementing
4327 Ada.Unchecked_Deallocate_Subpool.
4328 * einfo.adb: Remove Associated_Collection from the node usage.
4329 Add Finalization_Master to the node usage.
4330 (Associated_Collection): Removed.
4331 (Finalization_Master): New routine.
4332 (Set_Associated_Collection): Removed.
4333 (Set_Finalization_Master): New routine.
4334 (Write_Field23_Name): Remove Associated_Collection from the output. Add
4335 Finalization_Master to the output.
4336 * einfo.ads: Remove attribute Associated_Collection and its uses in
4338 Add new attribute Finalization_Master along with its uses in entitites.
4339 (Associated_Collection): Removed along with its pragma import.
4340 (Finalization_Master): New routine along with a pragma import.
4341 (Set_Associated_Collection): Removed along with its pragma import.
4342 (Set_Finalization_Master): New routine along with a pragma import.
4343 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
4344 Build_Finalization_Collection with Build_Finalization_Master.
4345 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
4346 before the bodies of the predefined routines. Add comment explaining
4347 this. Replace call to Build_Finalization_Collection with
4348 Build_Finalization_Master.
4349 (Freeze_Type): Replace call to Build_Finalization_Collection with
4350 Build_Finalization_Master.
4351 (Make_Finalize_Address_Body): Comment reformatting.
4352 (Make_Predefined_Primitive_Specs): Code reformatting.
4353 (Stream_Operation_OK): Update comment mentioning finalization
4354 collections. Replace RE_Finalization_Collection with
4355 RE_Finalization_Master.
4356 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
4357 Associated_Collection with Finalization_Master. Replace call to
4358 Build_Finalization_Collection with Build_Finalization_Master.
4359 (Expand_Allocator_Expression): Replace call to Associated_Collection
4360 with Finalization_Master. Replace call to Set_Associated_Collection with
4361 Set_Finalization_Master. Remove the generation of
4362 Set_Finalize_Address_Ptr.
4363 (Expand_N_Allocator): Replace call to Associated_Collection with
4364 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
4365 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
4366 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
4367 comment on usage. Replace call to Needs_BIP_Collection with
4368 Needs_BIP_Finalization_Master Remplace BIP_Collection with
4369 BIP_Finalization_Master. Update all comments which mention finalization
4370 collections. Replace Associated_Collection with
4371 Finalization_Master. Replace Build_Finalization_Collection with
4372 Build_Finalization_Master.
4373 (BIP_Formal_Suffix): Update BIP_Collection's case.
4374 (Build_Heap_Allocator): Update the related comment. Rename local
4375 variable Collect to Fin_Mas_Id and update its occurrences. Update
4376 comments which mention finalization collections. Replace
4377 Set_Associated_Collection with Set_Finalization_Master.
4378 (Expand_Call): Update the code which detects a special piece of library
4380 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
4381 Add_Collection_Actual_To_Build_In_Place_Call with
4382 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
4383 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
4384 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
4385 Add_Collection_Actual_To_Build_In_Place_Call with
4386 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
4387 (Make_Build_In_Place_Call_In_Assignment): Replace call to
4388 Add_Collection_Actual_To_Build_In_Place_Call with
4389 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
4390 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
4391 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
4392 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
4393 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
4394 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
4395 Replace call to Set_Associated_Collection with Set_Finalization_Master.
4396 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
4397 Replace the call to Associated_Collection with Finalization_Master.
4398 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
4399 Update the way finalization master names are generated. Update the
4400 retrieval of the correct access type which will carry the pool and
4402 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
4403 (Make_Finalize_Address_Body): Abstract types do not need
4404 Finalize_Address. Code reformatting.
4405 (Make_Finalize_Address_Stmts): Update comment on usage.
4406 (Make_Set_Finalize_Address_Ptr_Call): Removed.
4407 (Process_Declarations): Update comments.
4408 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
4409 Build_Finalization_Master. Update associated comment.
4410 (Make_Set_Finalize_Address_Ptr_Call): Removed.
4411 * exp_ch13.adb: Update comments which mention finalization collections.
4412 (Expand_N_Free_Statement): Replace the call to Associated_Collection
4413 with Finalization_Master.
4414 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
4415 create calls to routines Allocate_Any_Controlled and
4416 Deallocate_Any_Controlled.
4417 (Find_Finalize_Address): New routine.
4418 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
4420 (Requires_Cleanup_Actions): Update the comment on freeze node
4422 * exp_util.ads: Remove comment on generated code for
4423 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
4424 is better to simply look in the body.
4425 * freeze.adb (Freeze_All): Update the comment of finalization
4426 collections. Replace the call to Associated_Collection with
4427 Finalization_Master. Replace the call to Build_Finalization_Collection
4428 with Build_Finalization_Master.
4429 * impunit.adb: Add a-undesu and s-stposu to the list of units.
4430 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
4432 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
4433 Ada.Finalization. Add processing for children of System.Storage_Pools.
4434 * rtsfind.ads: Remove the naming of second level children of
4436 Remove Ada_Finalization_Heap_Management from the list of units.
4437 Remove subtype Ada_Finalization_Child.
4438 Remove the following subprogram entities:
4442 RE_Finalization_Collection
4443 RE_Finalization_Collection_Ptr
4444 RE_Set_Finalize_Address_Ptr
4446 Add the naming of second level children of System.Storage_Pools.
4447 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
4449 Add subtype System_Storage_Pools_Child.
4450 Add the following subprogram entities to System.Finalization_Masters:
4452 RE_Finalization_Master
4453 RE_Finalization_Master_Ptr
4455 Add the following subprogram entities to System.Storage_Pools.Subpools:
4457 RE_Allocate_Any_Controlled
4458 RE_Deallocate_Any_Controlled
4459 RE_Root_Storage_Pool_With_Subpools
4463 Move the following subprogram entities from
4464 Ada.Finalization.Heap_Management to System.Finalization_Masters:
4466 RE_Add_Offset_To_Address
4471 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
4472 Set_Associated_Collection with Set_Finalization_Master.
4473 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
4474 BIP_Finalization_Master is created.
4475 * s-finmas.adb: New unit System.Finalization_Masters.
4476 * s-finmas.ads: New unit System.Finalization_Masters.
4477 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
4478 * s-stposu.ads, s-stposu.adb: New unit implementing
4479 System.Storage_Pools.Subpools.
4481 2011-08-29 Bob Duff <duff@adacore.com>
4483 * tbuild.adb: Add assertion.
4485 2011-08-29 Thomas Quinot <quinot@adacore.com>
4487 * s-pooglo.adb: Minor reformatting.
4489 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4491 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
4492 an indexed component of a packed array whose element type is a record
4493 with a representation clause different from that of the right-hand
4494 side, generate a temporary to minimuze the number of bit-field
4495 operations generated.
4497 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4499 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
4500 declarations, and thus are likely insertion points for actions.
4502 2011-08-29 Bob Duff <duff@adacore.com>
4504 * einfo.ads: Minor comment fix.
4506 2011-08-29 Robert Dewar <dewar@adacore.com>
4508 * frontend.adb, gnat1drv.adb: Minor reformatting.
4510 2011-08-29 Tristan Gingold <gingold@adacore.com>
4512 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
4513 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
4514 space in front of the header.
4516 2011-08-29 Johannes Kanig <kanig@adacore.com>
4518 * frontend.adb (Frontend): Exit after creating Standard package when
4519 -gnatd.H is present.
4520 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
4523 2011-08-29 Robert Dewar <dewar@adacore.com>
4525 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
4526 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
4527 snames.ads-tmpl: Minor reformatting.
4529 2011-08-29 Philippe Gil <gil@adacore.com>
4531 * prj.adb (Reset_Units_In_Table): New procedure.
4532 Reset units to avoid access to freed memory.
4534 2011-08-29 Thomas Quinot <quinot@adacore.com>
4536 * get_scos.adb: When reading a P statement SCO without a pragma name
4537 (from an older ALI file), ensure that the Pragma_Name component is set
4538 to Unknown_Pragma (not left uninitialized).
4540 2011-08-29 Vincent Celier <celier@adacore.com>
4542 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
4543 modified to compute correctly the object path of a SAL project that is
4544 extending another library project.
4545 (Write_Path_File): New procedure.
4546 * makeutl.ads (Directories): New table moved from Buildgpr
4547 (Get_Directories): New procedure moved from Buildgpr
4548 (Write_Path_File): New procedure
4549 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
4550 paths before binding SALs, instead of Set_Ada_Paths.
4551 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
4553 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
4554 (Current_Source_Path_File_Of): New function
4555 (Set_Current_Object_Path_File_Of): New procedure
4556 (Current_Source_Object_File_Of): New function
4557 (Set_Current_Object_Path_File_Of): New procedure
4558 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
4559 (Current_Source_Path_File_Of): New function
4560 (Set_Current_Object_Path_File_Of): New procedure
4561 (Current_Source_Object_File_Of): New function
4562 (Set_Current_Object_Path_File_Of): New procedure
4564 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4566 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
4567 packed entity, use a bit-field assignment only if there is no change of
4570 2011-08-29 Thomas Quinot <quinot@adacore.com>
4572 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
4573 Is_RTU instead of using Chars comparisons.
4575 2011-08-29 Thomas Quinot <quinot@adacore.com>
4577 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
4578 temporary object if the actual is constrained, and the discriminants
4579 read from the stream don't match.
4581 2011-08-29 Tristan Gingold <gingold@adacore.com>
4583 * sem_attr.adb, exp_attr.adb: Add handling of
4584 Attribute_System_Allocator_Alignment
4585 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
4586 Attribute_System_Allocator_Alignment.
4587 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
4588 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
4589 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
4590 get_target_system_allocator_alignment.
4592 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4594 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
4597 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4599 * exp_ch3.adb (In_Runtime): Fix typo.
4601 2011-08-29 Bob Duff <duff@adacore.com>
4603 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
4605 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4607 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
4608 and a separate tag assignment is generated, ensure that the tag
4609 assignment is analyzed.
4611 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4613 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
4614 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
4615 of statement lists that may contain local declarations.
4616 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
4617 duplicate the triggering statements needed for the expansion of this
4618 construct, when the trigger is a dispatching call to a synchronized
4621 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4623 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
4624 * bindgen.adb: Add comments.
4625 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
4628 2011-08-29 Robert Dewar <dewar@adacore.com>
4630 * exp_attr.adb: Minor reformatting.
4631 Minor code reorganization and commenting.
4632 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
4635 2011-08-29 Thomas Quinot <quinot@adacore.com>
4637 * get_scos.adb: Ignore chaining indicators not currently supported
4640 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4642 * system.ads: Minor editing.
4644 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4646 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
4648 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
4649 Attribute_Elab_Subp_Body.
4650 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
4651 * sem_util.adb: Update comments.
4653 2011-08-29 Thomas Quinot <quinot@adacore.com>
4655 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
4656 pragma name for each SCO statement corresponding to a pragma.
4658 2011-08-29 Arnaud Charlet <charlet@adacore.com>
4660 * opt.ads: Minor editing.
4662 2011-08-29 Yannick Moy <moy@adacore.com>
4664 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
4665 that only made sense for CodePeer mode.
4667 2011-08-29 Jose Ruiz <ruiz@adacore.com>
4669 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
4670 which is no longer used.
4671 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
4672 handling of the 64-bit division check.
4673 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
4675 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
4678 2011-08-29 Thomas Quinot <quinot@adacore.com>
4680 * get_scos.adb: Minor reformatting.
4682 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4684 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
4685 statement list is wrapped in a block, the block is explicitly analyzed
4686 in order to properly redecorate the entities and create a servicing
4689 2011-08-29 Tristan Gingold <gingold@adacore.com>
4691 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
4692 (Set_Zero_Cost_Handling): Remove.
4694 2011-08-29 Thomas Quinot <quinot@adacore.com>
4696 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
4698 2011-08-29 Geert Bosch <bosch@adacore.com>
4700 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
4701 instruction, as the latter may produce -0.0, which is not a valid VAX
4703 (Neg_G): Likewise for VAX F float.
4705 2011-08-29 Robert Dewar <dewar@adacore.com>
4707 * exp_util.adb: Minor reformatting.
4709 2011-08-29 Yannick Moy <moy@adacore.com>
4711 * sem_ch3.adb: Minor comment update.
4713 2011-08-29 Thomas Quinot <quinot@adacore.com>
4715 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
4718 2011-08-29 Thomas Quinot <quinot@adacore.com>
4720 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
4721 current statement sequence on a generic instantiation or a subprogram
4724 2011-08-29 Robert Dewar <dewar@adacore.com>
4726 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
4729 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4731 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
4732 Correct the check which involves the freeze node of a controlled or
4733 access-to-controlled type.
4735 2011-08-29 Geert Bosch <bosch@adacore.com>
4737 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
4739 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
4742 2011-08-29 Yannick Moy <moy@adacore.com>
4744 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
4745 for every index type and component type that is not a subtype_mark.
4746 (Process_Subtype): Set Etype of subtype.
4748 2011-08-29 Robert Dewar <dewar@adacore.com>
4750 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
4751 reorganization. Minor reformatting.
4753 2011-08-29 Steve Baird <baird@adacore.com>
4755 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
4756 for CodePeer and ALFA modes.
4758 2011-08-29 Ed Schonberg <schonberg@adacore.com>
4760 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
4761 that comes from an enclosing scope if it is not the renaming of an
4762 actual, to handle properly a spurious ambiguity in an instance.
4764 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
4766 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
4767 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
4768 use it instead of the Esize of the first parameter.
4769 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
4771 <Size>: Likewise. Call it for composite types on the RM size.
4773 2011-08-29 Yannick Moy <moy@adacore.com>
4775 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
4776 * sem_util.adb (Unique_Name): Correct behaviour for names of
4779 2011-08-29 Yannick Moy <moy@adacore.com>
4781 * sem_prag.adb (Check_Precondition_Postcondition): In formal
4782 verification mode, analyze pragma expression for correctness, for
4783 pre/post on library-level subprogram, as it is not expanded later.
4785 2011-08-29 Yannick Moy <moy@adacore.com>
4787 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
4788 in formal verification.
4790 2011-08-29 Thomas Quinot <quinot@adacore.com>
4792 * sem_util.adb: Minor reformatting.
4793 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
4795 * par_sco.ads, par_sco.adb: Update comments.
4797 2011-08-29 Yannick Moy <moy@adacore.com>
4799 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
4800 associated getter/setter.
4801 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
4803 2011-08-29 Vincent Celier <celier@adacore.com>
4805 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
4806 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
4807 with declarations for Language_Kind and Dependency_Kind for Ada.
4808 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
4809 (Process_Compiler): Take into account the new attributes Dependency_Kind
4811 (Check_Configuration): Check if language kind is unit based, not if the
4812 language name is Ada.
4813 (Process_Exceptions_Unit_Based): Ditto
4814 (Add_Language): Remove default additions of language and dependency kind
4815 * prj.ads: Minor comment change
4816 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
4818 2011-08-29 Johannes Kanig <kanig@adacore.com>
4820 * debug.adb: Update comments.
4822 2011-08-24 Joseph Myers <joseph@codesourcery.com>
4824 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
4825 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
4826 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
4827 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
4828 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
4830 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4832 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
4833 (GNATLIBCFLAGS_FOR_C): Replace
4834 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
4835 (gnatlib-shared-default, gnatlib-shared-dual-win32)
4836 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
4837 (gnatlib-sjlj, gnatlib-zcx): Likewise.
4839 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
4841 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
4843 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
4845 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
4847 2011-08-05 Nicolas Roche <roche@adacore.com>
4849 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
4850 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
4852 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
4854 2011-08-05 Matthew Heaney <heaney@adacore.com>
4856 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
4857 subprogram bodies declared out-of-order.
4859 2011-08-05 Yannick Moy <moy@adacore.com>
4861 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
4862 entities directly in package Standard, otherwise skip the standard
4865 2011-08-05 Robert Dewar <dewar@adacore.com>
4867 * a-cbmutr.adb: Minor reformatting
4868 (Allocate_Node): refactor node allocation algorithm
4870 2011-08-05 Robert Dewar <dewar@adacore.com>
4872 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
4873 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
4875 (Analyze_Pragma, case Check_Policy): Ditto.
4876 * sem_prag.ads (Check_Disabled): New function
4877 * snames.ads-tmpl: Add Name_Disable.
4879 2011-08-05 Robert Dewar <dewar@adacore.com>
4881 * gnat_rm.texi: Document implementation-defined policy DISABLE for
4882 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
4884 2011-08-05 Ed Schonberg <schonberg@adacore.com>
4886 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
4887 that appears in a generic formal part and applies to a formal
4890 2011-08-05 Robert Dewar <dewar@adacore.com>
4892 * a-cbmutr.ads: Minor reformatting.
4894 2011-08-05 Matthew Heaney <heaney@adacore.com>
4896 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
4897 to check count, check sign of value instead.
4898 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
4899 (Copy_Subtree): allocate copy of source element
4900 (Equal_Subtree): compare elements, not access objects
4902 2011-08-05 Vincent Celier <celier@adacore.com>
4904 * gnat_ugn.texi: Fix VMS alternative.
4906 2011-08-05 Thomas Quinot <quinot@adacore.com>
4908 * sem_ch11.adb: Add comment.
4910 2011-08-05 Robert Dewar <dewar@adacore.com>
4912 * exp_util.adb: Minor comment fix.
4914 2011-08-05 Robert Dewar <dewar@adacore.com>
4916 * scng.adb (Error_Unterminated_String): Improve flag position when
4919 2011-08-05 Matthew Heaney <heaney@adacore.com>
4921 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
4923 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
4924 multiway tree containers.
4926 2011-08-05 Robert Dewar <dewar@adacore.com>
4928 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
4929 * stylesw.adb: Implement -gnatyC to control comment spacing
4930 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
4932 * usage.adb: Add line for -gnatyC.
4934 2011-08-05 Robert Dewar <dewar@adacore.com>
4936 * gnat_ugn.texi: Document -gnatyC.
4937 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
4938 synonym for COMMENTS2).
4940 2011-08-05 Robert Dewar <dewar@adacore.com>
4942 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
4943 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
4944 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
4945 a-comutr.ads, lib-xref.adb: Minor reformatting.
4947 2011-08-05 Robert Dewar <dewar@adacore.com>
4949 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
4950 warning if there is an exception handler present.
4952 2011-08-05 Pascal Obry <obry@adacore.com>
4954 * a-iteint.ads: Fix copyright year.
4956 2011-08-05 Thomas Quinot <quinot@adacore.com>
4958 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
4959 statement SCO for a USE clause or a representation clause.
4961 2011-08-05 Yannick Moy <moy@adacore.com>
4963 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
4964 between body and spec for stub.
4965 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
4966 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
4967 pragma precondition or postcondition, for which the enclosing
4968 subprogram or package in the AST is not the desired one, return empty.
4970 2011-08-05 Thomas Quinot <quinot@adacore.com>
4972 * g-expect.adb: Minor reformatting.
4974 2011-08-05 Bob Duff <duff@adacore.com>
4976 * a-fihema.adb: Comment out OS_Lib.
4978 2011-08-05 Matthew Heaney <heaney@adacore.com>
4980 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
4981 (unbounded multiway tree containers) and a-iteint.ads.
4982 * a-comutr.ads, a-comutr.adb:
4983 This is the new Ada 2012 unit for unbounded multiway tree containers
4984 * a-cimutr.ads, a-cimutr.adb
4985 This is the new Ada 2012 unit for indefinite multiway tree containers
4986 * a-iteint.ads: New file.
4988 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4990 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
4992 2011-08-05 Bob Duff <duff@adacore.com>
4994 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
4996 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
4998 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5000 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
5001 general indexing aspects of Ada2012. Called when analyzing indexed
5002 components when other interpretations fail.
5003 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
5004 in an expression context where overloading is meaningful. This excludes
5005 the occurrence in an aspect specification (efficiency only).
5006 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
5007 related to iterators can be set by an attribute specification, but
5009 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
5010 Constant_Indexing and Variable_Indexing.
5011 (Check_Indexing_Functions): New procedure to perform legality checks.
5012 Additional semantic checks at end of declarations.
5014 2011-08-05 Sergey Rybin <rybin@adacore.com>
5016 * tree_io.ads: Update ASIS_Version_Number because of the change of the
5017 order of calling Tree_Write/Tree_Read routines made for aspects.
5019 2011-08-05 Bob Duff <duff@adacore.com>
5021 * a-fihema.adb (Finalize): Fix race condition.
5023 2011-08-05 Yannick Moy <moy@adacore.com>
5025 * sem_ch12.adb (Analyze_Package_Instantiation,
5026 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
5029 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5031 * sem_type.adb (Specific_Type): in an instance, the type-specific
5032 operand of an equality check that involves null may have a private
5033 type. Use full view to determine legality of construct.
5035 2011-08-05 Vincent Celier <celier@adacore.com>
5037 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5038 delete or close the file when the call to gnatmake was successful.
5040 2011-08-05 Yannick Moy <moy@adacore.com>
5042 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
5043 Global_Discard_Names.
5045 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5047 * sinfo.ads: comments on use of entity field for aspect specifications.
5049 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5051 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
5052 node is not itself an entity but a selected component, it is a
5053 rewritten parameterless call to an en enclosing synchronized operation,
5054 and this expansion will be performed again in the instance, so there is
5055 no global information to preserve.
5057 2011-08-05 Javier Miranda <miranda@adacore.com>
5059 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
5060 for renamings of predefined primitives.
5061 (In_Predef_Prims_DT): New subprogram.
5063 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5065 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
5066 possible interpretation of name is a reference type, add an
5067 interpretation that is the designated type of the reference
5068 discriminant of that type.
5069 * sem_res.adb (resolve): If the interpretation imposed by context is an
5070 implicit dereference, rewrite the node as the deference of the
5071 reference discriminant.
5072 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
5073 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
5074 parent type or base type.
5075 * sem_ch4.adb (Process_Indexed_Component,
5076 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
5077 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
5078 Check for implicit dereference.
5079 (List_Operand_Interps): Indicate when an implicit dereference is
5081 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
5083 2011-08-05 Thomas Quinot <quinot@adacore.com>
5085 * scos.ads: Update documentation of SCO table. Pragma statements can now
5086 be marked as disabled (using 'p' instead of 'P' as the statement kind).
5087 * par_sco.ads, par_sco.adb: Implement the above change.
5088 (Process_Decisions_Defer): Generate a P decision for the first parameter
5089 of a dyadic pragma Debug.
5090 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
5092 * put_scos.adb: Code simplification based on above change.
5094 2011-08-05 Robert Dewar <dewar@adacore.com>
5096 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
5097 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
5098 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
5099 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
5101 2011-08-05 Bob Duff <duff@adacore.com>
5103 * a-stunau.ads, g-spipat.adb: Update comments.
5105 2011-08-05 Bob Duff <duff@adacore.com>
5107 * a-fihema.ads: Minor comment fix.
5108 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
5110 (Attach, Detach): Remove some unnecessary code.
5111 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
5113 2011-08-05 Bob Duff <duff@adacore.com>
5115 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
5116 allocation for Objects component. This simplifies the code somewhat. It
5117 is also a little more efficient in the not-so-unusual case where there
5118 are no controlled objects allocated.
5119 Make Finalization_Started flag atomic.
5120 (Finalize): Avoid unnecessary detachment of items from the list.
5121 (pcol): Minor cleanup.
5123 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5125 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
5126 package whose name is the same as that of the generic unit, or its
5129 2011-08-05 Bob Duff <duff@adacore.com>
5131 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
5132 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
5133 Minor comment fixes.
5135 2011-08-05 Arnaud Charlet <charlet@adacore.com>
5137 * make.adb (Linking_Phase): No longer need to set source search path
5138 before calling gnatlink in CodePeer mode.
5139 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
5140 gcc in CodePeer mode, since the binder generated file no longer has a
5142 * switch.ads, switch.adb (Is_Language_Switch): Removed.
5143 * switch-c.adb: Update comment.
5145 2011-08-05 Thomas Quinot <quinot@adacore.com>
5147 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
5149 2011-08-05 Nicolas Roche <roche@adacore.com>
5151 * gnat_ugn.texi: Fix minor syntax error issue.
5153 2011-08-05 Vincent Celier <celier@adacore.com>
5155 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5156 delete or close the file when the call to gnatmake returns a non
5157 successful return code.
5159 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5161 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
5162 check, indicate that the copy of the original node does not come from
5163 source, to prevent an infinite recursion of the expansion.
5165 2011-08-05 Johannes Kanig <kanig@adacore.com>
5167 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
5168 VC generation for subprogram bodies.
5170 2011-08-05 Yannick Moy <moy@adacore.com>
5173 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
5174 the base type with the smallest allowed base type.
5176 2011-08-05 Sergey Rybin <rybin@adacore.com>
5178 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
5181 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5183 * sem_ch12.ads: minor comment updates.
5185 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5187 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
5188 instantiation and a formal package the compiler generates a package
5189 renaming declaration so that the generic name within the declaration
5190 is interpreted as a renaming of the instance. At the end of a formal
5191 package declaration, this renaming must become invisible.
5193 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5195 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
5196 comparison and rely on concrete entities instead.
5198 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5200 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
5201 and discriminants, to indicate that the type has an access discriminant
5202 that supports implicit dereference.
5203 * snames.ads-tmpl: Add names of aspects and attributes related to
5204 Ada2012 iterators: constant_indexing, default_iterator,
5205 iterator_element, implicit_dereference, variable_indexing.
5206 * aspects.ads, aspects.adb: entries for iterator-related aspects.
5207 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
5208 iterator-related aspects.
5209 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
5211 2011-08-05 Sergey Rybin <rybin@adacore.com>
5213 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
5214 metrics in gnatmetric to cover new kinds of coupling mentrics.
5216 2011-08-05 Steve Baird <baird@adacore.com>
5218 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
5219 of calling the user-defined main subprogram.
5220 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
5221 is set) Call_Main_Subprogram ahead of, as opposed to
5223 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
5224 generation of a "with" of the user-defined main subprogram.
5225 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
5226 (which is now called from Gen_Main instead).
5228 2011-08-05 Emmanuel Briot <briot@adacore.com>
5230 * projects.texi: Added reference to the Makefile package.
5232 2011-08-05 Thomas Quinot <quinot@adacore.com>
5234 * exp_ch7.adb: Minor comment rewording.
5236 2011-08-05 Ed Falis <falis@adacore.com>
5238 * env.c: Fix comment.
5240 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5242 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
5243 character comparison and rely on concrete entities instead.
5245 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5247 * sem_ch3.adb: (Check_Private_Overriding): better error message,
5248 suggested by AI95-0068.
5250 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5252 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
5253 the two potential initialization calls. This accounts for any
5254 access-before-elaboration checks which may precede the initialization
5256 (Next_Suitable_Statement): New routine. Returns the next real statement
5257 after the input node while skipping generated checks.
5258 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
5259 with comment on usage.
5260 Do not generate Elaborate_All when the trigger is a finalization call
5261 coming from a type init proc.
5262 (Check_Elab_Call): Propagate the initialization procedure context to
5263 subsequent calls to Check_A_Call.
5264 (Check_Internal_Call_Continue): Propagate the initialization procedure
5265 context to subsequent calls to Check_Elab_Call.
5266 (Is_Finalization_Procedure): New routine. Returns True if the input
5267 entity denotes a [Deep_]Finalize routine.
5268 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
5269 along with comment on usage.
5271 2011-08-05 Vadim Godunko <godunko@adacore.com>
5273 * s-atocou.ads: Add list of supported platforms.
5275 2011-08-05 Yannick Moy <moy@adacore.com>
5277 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
5279 * opt.ads (Disable_ALI_File): new Boolean flag
5280 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
5282 2011-08-05 Ed Falis <falis@adacore.com>
5284 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
5285 environ is properly defined.
5287 2011-08-05 Vincent Celier <celier@adacore.com>
5289 * make.adb (Compilation_Phase): Exit immediately when all objects have
5290 been found up to date, to avoid multiple exit messages.
5291 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
5292 same project for languages with no compiler.
5293 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
5295 2011-08-05 Robert Dewar <dewar@adacore.com>
5297 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
5298 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
5299 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
5300 s-atocou-builtin.adb: Minor reformatting.
5302 2011-08-05 Yannick Moy <moy@adacore.com>
5304 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
5305 if the node to wrap is a pragma check, this node and enclosed
5306 expression are not expanded, so do not apply any transformations here.
5307 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
5308 introducing transient scopes.
5310 2011-08-05 Jose Ruiz <ruiz@adacore.com>
5312 * adaint.c (__gnat_set_writable, __gnat_set_readable,
5313 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
5314 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
5315 routine is available, so we use the default implementation of these
5317 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
5318 support for copying attributes on VxWorks 6.
5320 2011-08-05 Yannick Moy <moy@adacore.com>
5322 * debug.adb: Remove use of -gnatd.D.
5323 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
5324 * opt.ads: Simplify variables for ALFA mode, to keep one only
5325 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
5328 2011-08-05 Vincent Celier <celier@adacore.com>
5330 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
5331 Builder'Default_Switches.
5333 2011-08-05 Vincent Celier <celier@adacore.com>
5335 * makeusg.adb: Add lines for --create-map-file switches.
5337 2011-08-05 Ed Schonberg <schonberg@adacore.com>
5339 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
5340 profile is incomplete and the full view is available, replace it with
5342 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
5343 incomplete, freezing the subprogram is delayed until the full view is
5345 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
5346 fixed-point multiplication operator and the predefined operator is
5347 resolved in favor of the user-defined one.
5349 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5351 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
5354 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5356 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
5357 whether a type lacks user-defined Read or Write operations, or has a
5358 component that lacks them.
5359 * sem_attr.adb (Check_Stream_Attribute): if restriction
5360 No_Default_Stream_Attributes is active, verify that all subcomponent
5361 types of the target have user-defined stream operations, and report
5363 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
5364 * exp_strm.adb: Build_Elementary_Input_Call,
5365 Build_Elementary_Write_Call): remove checks for restriction
5366 No_Default_Stream_Attributes, now checked in semantics.
5368 2011-08-04 Vincent Celier <celier@adacore.com>
5370 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
5371 switches on the command line, look for all valid --RTS switches in the
5372 Builder switches and for each language use the first runtime name found
5373 to invoke gprconfig.
5374 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
5375 command line and there is no auto-configuration.
5376 (Runtime_Name_Set_For): New function.
5378 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5380 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
5381 elaborate initialization expression for variable Abort when processing
5382 a package body or a declaration.
5383 (Create_Finalizer): Propagate the package context when creating the
5384 exception-related variables.
5385 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
5386 For_Package along with usage comment.
5388 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5390 * gcc-interface/Makefile.in: Clean up targets.
5391 Enable new package for atomic counters and copy-on-write implementation
5392 of unbounded strings on x86 platforms.
5393 * gcc-interface/Make-lang.in: Update dependencies.
5395 2011-08-04 Robert Dewar <dewar@adacore.com>
5397 * exp_ch7.adb: Minor reformatting.
5399 2011-08-04 Robert Dewar <dewar@adacore.com>
5401 * exp_strm.adb: Minor reformatting.
5403 2011-08-04 Vadim Godunko <godunko@adacore.com>
5405 * s-atocou.adb: Replace by dummy version and use on targets where atomic
5406 operations are not supported.
5407 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
5408 * s-atocou-x86.adb: New file.
5409 * Makefile.rtl: Add s-atocou.o file
5411 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5413 * make.adb (Compile): Move setting of CodePeer_Mode to ...
5414 (Compilation_Phase): ... here.
5415 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
5417 2011-08-04 Thomas Quinot <quinot@adacore.com>
5419 * Make-generated.in: Fix minor typo in comment.
5421 2011-08-04 Thomas Quinot <quinot@adacore.com>
5423 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
5426 2011-08-04 Robert Dewar <dewar@adacore.com>
5428 * a-coinho.adb: Minor reformatting.
5430 2011-08-04 Robert Dewar <dewar@adacore.com>
5432 * a-coinho.ads: Minor reformatting.
5434 2011-08-04 Vadim Godunko <godunko@adacore.com>
5436 * s-atocou.ads, s-atocou.adb: New files.
5437 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
5438 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
5439 direct use of GCC's atomic builtins and replace them by use of new
5440 atomic counter package.
5442 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5444 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
5446 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5448 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
5449 with a call to Get_External_Tag.
5450 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
5451 subprogram usage. Remove the guard against package declarations and
5452 bodies since Build_Cleanup_Statements is no longer invoked in that
5454 (Build_Components): Initialize Tagged_Type_Stmts when the context
5455 contains at least one library-level tagged type.
5456 (Build_Finalizer): New local variables Has_Tagged_Types and
5457 Tagged_Type_Stmts along with associated comments on usage. Update the
5458 logic to include tagged type processing.
5459 (Create_Finalizer): Insert all library-level tagged type unregistration
5460 code before the jump block circuitry.
5461 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
5462 (Expand_N_Package_Declaration): Remove the call to
5463 Build_Cleanup_Statements.
5464 (Process_Tagged_Type_Declaration): New routine. Generate a call to
5465 unregister the external tag of a tagged type.
5466 (Processing_Actions): Reimplemented to handle tagged types.
5467 (Process_Declarations): Detect the declaration of a library-level
5468 tagged type and carry out the appropriate actions.
5469 (Unregister_Tagged_Types): Removed. The machinery has been directly
5470 merged with Build_Finalizer.
5472 2011-08-04 Robert Dewar <dewar@adacore.com>
5474 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
5475 gnatls.adb, exp_ch3.adb: Minor reformatting.
5477 2011-08-04 Marc Sango <sango@adacore.com>
5479 * sem_attr.adb (Analyze_Attribute): Replace the message
5480 "invisible attribute of}" of the spark restriction violation in
5481 attribute reference by the simple message "invisible attribute of type".
5482 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
5483 two insertion characters: '&' and '}'.
5485 2011-08-04 Vadim Godunko <godunko@adacore.com>
5487 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
5488 * a-coinho.ads, a-coinho.adb: New file.
5489 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
5491 2011-08-04 Nicolas Roche <roche@adacore.com>
5493 * alfa_test.adb: Not all ali files are containing alfa information even
5494 if compiled with -gnatd.F. So suppress warning about missing ALFA
5497 2011-08-04 Yannick Moy <moy@adacore.com>
5499 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
5501 * put_alfa.adb: Check that scope name is not empty.
5503 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5505 * exp_ch3.adb (Stream_Operation_Ok): new predicate
5506 Needs_Elementary_Stream_Operation, to determine whether user-defined
5507 Read and Write attributes are available for the elementary components
5508 of the given type. If only the predefined attributes are available,
5509 then when restriction No_Default_Stream_Attributes is active the
5510 predefined stream attributes for the composite type cannot be created.
5512 2011-08-04 Robert Dewar <dewar@adacore.com>
5514 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
5515 Put routines in alpha order
5517 2011-08-04 Jose Ruiz <ruiz@adacore.com>
5519 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
5520 * gcc-interface/Make-lang.in: Update dependencies.
5522 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5524 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
5525 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
5528 2011-08-04 Robert Dewar <dewar@adacore.com>
5530 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
5531 lib-xref-alfa.adb: Minor reformatting.
5533 2011-08-04 Marc Sango <sango@adacore.com>
5535 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
5536 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
5537 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
5540 2011-08-04 Tristan Gingold <gingold@adacore.com>
5542 * bindgen.adb (Gen_Adainit_C): Remove.
5543 (Gen_Adafinal_C): Ditto.
5544 (Gen_Elab_Externals_C): Ditto.
5545 (Gen_Elab_Calls_C): Ditto.
5546 (Gen_Elab_Order_C): Ditto.
5547 (Gen_Elab_Defs_C): Ditto.
5548 (Gen_Finalize_Library_C): Ditto.
5549 (Gen_Finalize_Library_Defs_C): Ditto.
5550 (Gen_Main_C): Ditto.
5551 (Gen_Output_File_C): Ditto.
5552 (Gen_Restrictions_C): Ditto.
5553 (Gen_Versions_C): Ditto.
5554 (Write_Info_Ada_C): Ditto.
5555 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
5556 (Gen_Output_File): Do not force Ada_Bind_File anymore.
5557 Always call Gen_Output_File_Ada.
5558 * gnatlink.adb (Begin_Info): Now a constant.
5560 (Ada_Bind_File): Remove
5561 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
5562 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
5563 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
5564 * opt.ads (Ada_Bind_File): Remove.
5566 2011-08-04 Thomas Quinot <quinot@adacore.com>
5568 * projects.texi: Document target-specific directory in default project
5571 2011-08-04 Thomas Quinot <quinot@adacore.com>
5573 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
5576 2011-08-04 Yannick Moy <moy@adacore.com>
5578 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
5579 opt.ads, lib-xref.ads: Code clean up.
5581 2011-08-04 Yannick Moy <moy@adacore.com>
5583 * gnat_rm.texi: Update description of Test_Case
5584 * gnat_ugn.texi: Typo.
5586 2011-08-04 Ed Falis <falis@adacore.com>
5588 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
5590 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5592 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
5593 it is of type Root_Controlled. This action eliminates fields Prev and
5594 Next from type equality.
5596 2011-08-04 Yannick Moy <moy@adacore.com>
5598 * lib-xref-alfa.adb: Correct typo.
5600 2011-08-04 Matthew Heaney <heaney@adacore.com>
5602 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
5605 2011-08-04 Yannick Moy <moy@adacore.com>
5607 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
5608 (Analyze_Pragma): allow static string expression for name of Test_Case,
5609 instead of simply string literals.
5610 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
5613 2011-08-04 Vincent Celier <celier@adacore.com>
5615 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
5616 case suffixes to find truncated main sources.
5618 2011-08-04 Tristan Gingold <gingold@adacore.com>
5620 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
5621 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
5622 (Compute_Current_Task): Ditto.
5624 2011-08-04 Tristan Gingold <gingold@adacore.com>
5626 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
5628 2011-08-04 Yannick Moy <moy@adacore.com>
5630 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
5631 library-level constant.
5632 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
5633 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
5634 used as selector of parameter association, in ALFA mode.
5636 2011-08-04 Robert Dewar <dewar@adacore.com>
5638 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
5639 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
5642 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5644 * make.adb (Linking_Phase): Set source search path before calling
5645 gnatlink in CodePeer mode.
5647 2011-08-04 Javier Miranda <miranda@adacore.com>
5649 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
5650 Remove code which takes care of building TSDs.
5651 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
5652 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
5653 the accessibility check in VM targets.
5654 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
5655 (Building_Static_DT): Now returns false for VM targets.
5656 (Build_VM_TSDs): Removed.
5657 (Expand_Interface_Conversion): Generate missing runtime check for
5658 conversions to interface types whose target type is unknown at compile
5660 (Make_VM_TSD): Add missing code to disable the generation of calls to
5661 Check_TSD if the tagged type is not defined at library level, or not
5662 has a representation clause specifying its external tag, or -gnatdQ is
5664 * exp_disp.ads (Build_VM_TSDs): Removed.
5665 (Make_VM_TSDs): Spec relocated from exp_disp.adb
5666 * sem_disp.adb (Check_Dispatching_Operation): No code required to
5667 register primitives in the dispatch tables in VM targets.
5668 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
5669 initialization of class-wide interface objects in VM targets.
5670 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
5673 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
5675 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
5676 when dotnet-ld cannot be found.
5678 2011-08-04 Arnaud Charlet <charlet@adacore.com>
5680 * bindgen.adb: Simplify significantly generation of binder body file in
5682 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
5683 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
5686 2011-08-04 Yannick Moy <moy@adacore.com>
5688 * sem_prag.adb, sem.ads: Code cleanup.
5690 2011-08-04 Tristan Gingold <gingold@adacore.com>
5692 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
5693 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
5694 results if possible.
5695 * s-stusta.adb (Print): Adjust after changes in s-stausa.
5696 * gnat_ugn.texi: Update dynamic stack usage section.
5698 2011-08-04 Steve Baird <baird@adacore.com>
5700 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
5701 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
5702 contains only a call to the user-defined main subprogram.
5703 (Gen_Main_Ada) - If CodePeer_Mode is set, then
5704 call the "wrapper" subprogram instead of directly
5705 calling the user-defined main subprogram.
5707 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5709 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
5710 alternatives of a case statement for controlled objects. Rename local
5711 variable A to Dead_Alt.
5712 (Expand_N_If_Statement): Check the then and else statements of an if
5713 statement for controlled objects. Check the then statements of all
5714 elsif parts of an if statement for controlled objects.
5715 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
5717 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
5718 detects a loop associated with the expansion of an array object.
5719 Augment the processing of the loop statements to account for a possible
5720 wrap done by Process_Statements_For_Controlled_Objects.
5721 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
5722 statements and abortable part of an asynchronous select for controlled
5724 (Expand_N_Conditional_Entry_Call): Check the else statements of a
5725 conditional entry call for controlled objects.
5726 (Expand_N_Selective_Accept): Check the alternatives of a selective
5727 accept for controlled objects.
5728 (Expand_N_Timed_Entry_Call): Check the entry call and delay
5729 alternatives of a timed entry call for controlled objects.
5730 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
5731 exception handler for controlled objects.
5732 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5733 Add formal parameter Nested_Constructs along with its associated
5735 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
5736 Requires_Cleanup_Actions.
5737 (Process_Statements_For_Controlled_Objects): New routine.
5738 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
5739 routine. Inspect a node which contains a non-handled sequence of
5740 statements for controlled objects. If such an object is found, the
5741 statements are wrapped in a block.
5743 2011-08-04 Bob Duff <duff@adacore.com>
5745 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
5746 need to compare with Class_Wide_Type (T2), in order to get at the
5747 original class-wide type node.
5748 * sem_type.ads (Covers): Improve the comment.
5749 * einfo.ads (Class_Wide_Type): Improve the comment.
5750 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
5751 the type of the Deref.
5753 2011-08-04 Yannick Moy <moy@adacore.com>
5755 * gnat_rm.texi: Document that Test_Case pragma can only appear on
5756 separate declarations.
5757 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
5758 check identifier of pragma argument.
5759 (Chain_TC): check that no other test case associated to the same entity
5760 share the same name.
5761 (Check_Test_Case): disallow test case inside subprogram body
5762 (Analyze_Pragma): correct call to check identifier and not argument
5763 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
5764 function gets name from test case pragma.
5766 2011-08-04 Yannick Moy <moy@adacore.com>
5768 * gnat_rm.texi: Document new pragma and aspect.
5769 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
5770 (No_Duplicates_Allowed): new constant array defining whether duplicates
5771 aspects of each kind can appear on the same declaration.
5772 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
5773 field, which points to a node holding the previous Spec_PPC_List.
5774 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
5775 through the indirection with Contract.
5776 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
5777 * par-prag.adb (Prag): do nothing on Test_Case pragma
5778 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
5780 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
5781 component Ensures of Test_Case.
5782 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
5783 (Analyze_Generic_Subprogram_Declaration,
5784 Analyze_Subprogram_Instantiation,
5785 Analyze_Abstract_Subprogram_Declaration,
5786 Analyze_Subprogram_Body_Helper,
5787 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
5788 insert contract in subprogram node at point of definition
5790 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
5791 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
5792 corresponding pragma
5793 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
5794 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
5795 similar to the analysis of pre/post
5796 (Derive_Subprogram): insert contract in subprogram node at point of
5798 * sem_prag.adb, sem_prag.ads
5799 (Check_Arg_Is_String_Literal, Check_Identifier):
5800 new checking procedures to be called in treatment of pragmas
5801 (Check_Test_Case): new procedure to check that a Test_Case aspect or
5802 pragma is well-formed. This does not check currently that 'Result is
5803 used only in the Ensures component of a Test_Case.
5804 (Analyze_Pragma): add case for Test_Case
5805 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
5806 components of a Test_Case.
5807 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
5808 expressions in the 3rd (and 4th if present) arguments of a Test_Case
5809 pragma, treated as spec expressions.
5810 (Sig_Flags): add value -1 for Test_Case.
5811 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
5812 Get_Requires_From_Test_Case_Pragma): getters for both expression
5813 components of a Test_Case.
5814 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
5815 indirection between an entry or [generic] subprogram entity and its
5816 pre/post + test-cases.
5817 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
5818 get/set for fields of an N_Contract node.
5819 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
5820 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
5821 names and pragma for Test_Case.
5822 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
5824 2011-08-04 Vincent Celier <celier@adacore.com>
5826 * gnat_ugn.texi: Improve documentation of gnatmake switch
5827 --source-info-file=.
5829 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5831 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
5832 type). Initialize Atyp to the appropriate type which is later checked
5833 for completion. Rewrite the assertion associated with private type
5836 2011-08-04 Ed Falis <falis@adacore.com>
5838 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
5839 initialize the number of CPUs.
5841 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5843 * sem_type.adb (Disambiguate): New subsidiary routine
5844 In_Same_Declaration_List, to implement AI05-0020: a user-defined
5845 equality on an anonymous access type whose designated type is private
5846 does not lead to an ambiguity with the universal access equality
5847 operator in the body or child units of the defining package. The same
5848 is true for a multiplication operator on a private type completed with
5851 2011-08-04 Javier Miranda <miranda@adacore.com>
5853 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
5854 (Normalize_Scalars_Config): Removed.
5856 (Register_Opt_Config_Switches): Remove registering config values of
5857 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
5858 (Restore_Opt_Config_Switches): Remove code which restores the values of
5859 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
5860 Init_Or_Norm_Scalars.
5861 (Save_Opt_Config_Switches): Remove code which saves values of
5862 Init_Or_Norm_Scalars and Normalize_Scalars.
5863 (Set_Opt_Config_Switches): Remove code which restores config values of
5864 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
5865 Init_Or_Norm_Scalars.
5867 2011-08-04 Yannick Moy <moy@adacore.com>
5869 * frontend.adb (Frontend): remove previous patch to avoid full
5870 qualification in ALFA mode.
5871 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
5872 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
5873 unique name for an entity, which could be used to identify the entity
5874 across compilation units.
5876 2011-08-04 Thomas Quinot <quinot@adacore.com>
5879 (Initialize_Default_Project_Path): Add target specific directory
5880 ($prefix/$target/lib/gnat) in front of project path in all cases
5881 (making gnatmake's behaviour consistent with gprbuild).
5882 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
5883 Pass target name from Sdefault to project subsystem.
5884 * gnatls.adb: Show new target specific default project directory.
5886 2011-08-04 Johannes Kanig <kanig@adacore.com>
5888 * cstand.adb: Add Information to Identifier in Standard
5889 (Identifer_For): Set Entity to the corresponding entity
5891 2011-08-04 Sergey Rybin <rybin@adacore.com>
5893 * gnat_ugn.texi: Update doc on gnatcheck.
5895 2011-08-04 Yannick Moy <moy@adacore.com>
5897 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
5900 2011-08-04 Yannick Moy <moy@adacore.com>
5902 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
5903 performing expansion.
5904 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
5905 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
5906 it is not called in ALFA mode.
5908 2011-08-04 Emmanuel Briot <briot@adacore.com>
5910 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
5911 after all, so removed.
5913 2011-08-04 Sergey Rybin <rybin@adacore.com>
5915 * vms_data.ads: Add missing VMS qualifiers.
5917 2011-08-04 Emmanuel Briot <briot@adacore.com>
5919 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
5920 the list of files on the command line after processing it through
5923 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5925 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
5926 processing for .NET/JVM. These targets can now benefit from
5927 Raise_From_Controlled_Operation and they share the same processing with
5929 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
5930 These targets need transient scopes in order to properly finalize short
5931 lived controlled objects.
5932 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
5933 NET/JVM. These targets can now benefit from
5934 Raise_From_Controlled_Operation and they share the same processing with
5937 2011-08-04 Geert Bosch <bosch@adacore.com>
5939 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
5941 2011-08-04 Ed Schonberg <schonberg@adacore.com>
5943 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
5944 Expand_Record_Aggregate, to determine whether aggregate must be
5945 expanded into assignments. This is the case if the ancestor part is
5946 private, regarless of the setting of the flag Has_Private_Ancestor.
5948 2011-08-04 Ed Falis <falis@adacore.com>
5950 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
5952 2011-08-04 Bob Duff <duff@adacore.com>
5954 * sinfo.ads: Fix comment.
5956 2011-08-04 Steve Baird <baird@adacore.com>
5958 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
5959 choose a package name in much the same way as is
5960 done for JGNAT when VM_Target /= No_VM, except that
5961 a slightly more distinctive prefix string is used.
5963 2011-08-04 Emmanuel Briot <briot@adacore.com>
5965 * makeutl.adb (Complete_Mains): no longer accept unit names on the
5966 gnatmake command line.
5967 This behavior was never documented (and was supported only because of
5968 an early bug in the code). This case might lead to ambiguous cases
5969 (between unit names and truncated base names without suffixes).
5971 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
5973 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
5974 Remove the external tag of a tagged type from the internal hash table.
5975 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
5976 expanded usage of the routine. Strenghten the check for Is_Master. Add
5977 processing for tagged types.
5978 (Build_Finalizer): Create all the necessary lists used in finalizer
5979 creation when the processed context is a package that may contain
5981 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
5982 Requires_Cleanup_Actions.
5983 (Expand_N_Package_Body): Package bodies may need clean up code
5984 depending on whether they contain tagged types.
5985 (Expand_N_Package_Declaration): Package declarations may need clean up
5986 code depending on whether they contain tagged types.
5987 (Unregister_Tagged_Types): New routine. Search through a list of
5988 declarations or statements, looking for non-abstract Ada tagged types.
5989 For each such type, generate code to unregister the external tag.
5990 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
5991 Requires_Cleanup_Actions.
5992 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
5993 through a list of declarations or statements looking for non-abstract
5994 Ada tagged types or controlled objects.
5995 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
5996 Requires_Cleanup_Actions.
5997 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
5998 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
6001 2011-08-04 Vincent Celier <celier@adacore.com>
6003 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
6004 has Ada sources, not project Project, because if the root project
6005 Project has no sources of its own, all projects will be deemed without
6008 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6010 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
6011 of the No_Param_Proc acc-to-subp type used for initialization of
6012 __gnat_finalize_library_objects so that it's declared at library level
6013 rather than nested inside of the adainit routine.
6015 2011-08-04 Javier Miranda <miranda@adacore.com>
6017 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
6018 if the tagged type has a representation clause which specifies its
6021 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6023 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
6024 Remove previous procedure with that name.
6025 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
6027 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
6028 subtype mark, the ancestor cannot have unknown discriminants.
6029 (Resolve_Record_Aggregate): if the type has invisible components
6030 because of a private ancestor, the aggregate is illegal.
6032 2011-08-04 Vincent Celier <celier@adacore.com>
6034 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
6035 account switches -gnat2005, -gnat12 and -gnat2012.
6037 2011-08-04 Bob Duff <duff@adacore.com>
6039 * s-tasdeb.ads: Minor comment fix.
6041 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6043 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
6045 * switch.ads, switch.adb (Is_Language_Switch): New function.
6047 2011-08-04 Vincent Celier <celier@adacore.com>
6049 * switch-c.adb: Minor comment addition.
6051 2011-08-04 Vincent Celier <celier@adacore.com>
6053 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
6054 ending with '=' is followed by a space (missing file name).
6056 2011-08-04 Pascal Obry <obry@adacore.com>
6058 * g-regist.ads: Fix size of HKEY on x86_64-windows.
6060 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6062 * sem_ch12.adb (Analyze_Associations): New routine
6063 Check_Overloaded_Formal_Subprogram to reject a formal package when
6064 there is a named association or a box initialisation for an overloaded
6065 formal subprogram of the corresponding generic.
6067 2011-08-04 Yannick Moy <moy@adacore.com>
6069 * alfa.ads (ALFA_Xref_Record): add component for type of entity
6070 * get_alfa.adb, put_alfa.adb: Read and write new component of
6072 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
6074 2011-08-04 Pascal Obry <obry@adacore.com>
6076 * urealp.adb: Minor reformatting.
6078 2011-08-04 Tristan Gingold <gingold@adacore.com>
6080 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
6081 Handle the case when Cleanup_Protected_Object returns Empty.
6083 2011-08-04 Yannick Moy <moy@adacore.com>
6085 * frontend.adb (Frontend): only qualify names in non-ALFA mode
6087 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6089 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
6090 call, ignore functions.
6092 2011-08-04 Geert Bosch <bosch@adacore.com>
6094 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
6097 2011-08-04 Emmanuel Briot <briot@adacore.com>
6099 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
6100 as an index for Builder'Switches. This conforms to the documentation.
6101 * make.adb (Insert_Project_Sources): avoid duplicate code
6103 2011-08-04 Emmanuel Briot <briot@adacore.com>
6105 * makeutl.adb (Complete_Mains): if the user has passed a relative file
6106 name on the command line (for instance "../dummy"), never assume it can
6109 2011-08-04 Tristan Gingold <gingold@adacore.com>
6111 * bindgen.adb: Remove code the reference or create the
6112 Break_Start/__gnat_break_start procedure.
6113 * s-stalib.adb (Break_Start): Removed.
6115 2011-08-04 Emmanuel Briot <briot@adacore.com>
6117 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
6118 shared with gprbuild.
6120 2011-08-04 Yannick Moy <moy@adacore.com>
6122 * par-ch4.adb (P_Primary): preferentially issue an error message about
6123 a missing parenthesis arount a conditional or case expression in Ada
6124 2012 mode, if we detect that the alignment is not correct for a
6127 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6129 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
6130 tag-to-class-wide conversion as needing finalization actions.
6131 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
6132 a tag-to-class-wide conversion as needing finalization actions.
6133 (Is_Finalizable_Transient): The result of a tag-to-class-wide
6134 conversion does not need finalization actions.
6135 (Is_Tag_To_CW_Conversion): New routine.
6136 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
6137 whether an object is the result of a tag-to-class-wide conversion.
6139 2011-08-04 Yannick Moy <moy@adacore.com>
6141 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
6142 the left-hand-side and right-hand-side of a conjunct are inserted when
6143 translating a pre- or postcondition
6144 * sem_ch6.adb: Correct typo in comment
6146 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6148 * gnat_rm.texi: Ravenscar does not prohibit dependence on
6149 Unchecked_Conversion and Unchecked_Deallocation.
6151 2011-08-04 Thomas Quinot <quinot@adacore.com>
6153 * make.adb: Minor reformatting.
6155 2011-08-04 Emmanuel Briot <briot@adacore.com>
6157 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
6158 sources in the project and its imported projects, but not in the whole
6161 2011-08-04 Emmanuel Briot <briot@adacore.com>
6163 * make.adb: Remove debug trace.
6165 2011-08-04 Vincent Celier <celier@adacore.com>
6167 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
6168 path in canonical form, to be able to compare path names on platforms
6169 such as Windows or Darwin.
6171 2011-08-04 Thomas Quinot <quinot@adacore.com>
6173 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
6174 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
6175 * scos.ads: Update documentation accordingly.
6176 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
6179 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6181 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
6182 attribute only if prefix type is scalar.
6184 2011-08-04 Emmanuel Briot <briot@adacore.com>
6186 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
6187 in gnatmake for specifying mains on the command line that do not belong
6188 to the main project. These mains must currently all belong to the same
6190 (Ultimate_Extension_Of): removed, since duplicated
6191 Ultimate_Extending_Project.
6193 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6195 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
6197 (CodePeer_Mode_String): New.
6198 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
6200 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
6201 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
6202 mode, since no useful elaboration subprogram is needed by CodePeer.
6203 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
6204 In this mode, compile binder file with -gnatC and do stop after this
6207 2011-08-04 Vincent Celier <celier@adacore.com>
6209 * exp_ch7.adb: Minor comment fix.
6211 2011-08-04 Robert Dewar <dewar@adacore.com>
6213 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
6214 exp_ch4.adb, makeutl.adb: Minor reformatting.
6216 2011-08-04 Emmanuel Briot <briot@adacore.com>
6218 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
6219 Create several new subprograms to move code out of Make. This makes the
6220 code more readable, removes code duplication, and is a preparation work
6221 for adding support for aggregate projects.
6223 2011-08-04 Tristan Gingold <gingold@adacore.com>
6225 * s-po32gl.ads, s-po32gl.adb: New files.
6226 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
6227 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
6228 (Build_Finalization_Collection): Use it.
6229 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
6230 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
6232 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
6233 * gcc-interface/Make-lang.in: Update dependencies.
6235 2011-08-04 Emmanuel Briot <briot@adacore.com>
6237 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
6240 2011-08-04 Emmanuel Briot <briot@adacore.com>
6242 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
6243 command line is not a file name, also check whether it could be a unit
6246 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6248 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
6249 the header of the finalization routine.
6250 If the unit has no finalizer but is a body whose spec has one, then
6251 generate the decrement of the elaboration entity only.
6252 If the unit has a finalizer and is a spec, then do not generate the
6253 decrement of the elaboration entity.
6254 (Gen_Finalize_Library_C): Likewise.
6256 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6258 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
6259 (Bounds_Size_Expression): Removed.
6260 (Double_Alignment_Of): New subsidiary routine.
6261 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
6262 for a hole in the dope vector of unconstrained arrays due to different
6263 index and element alignments.
6265 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6267 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
6268 raise program_error because body has not been seen yet.
6270 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6272 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
6275 2011-08-04 Vincent Celier <celier@adacore.com>
6277 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
6279 2011-08-04 Yannick Moy <moy@adacore.com>
6281 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
6282 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
6284 2011-08-04 Thomas Quinot <quinot@adacore.com>
6286 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
6287 instantiation in RCI.
6289 2011-08-04 Emmanuel Briot <briot@adacore.com>
6291 * make.adb: Share more code with gprbuild
6293 2011-08-04 Emmanuel Briot <briot@adacore.com>
6295 * projects.texi: Added documentation for the IDE'Gnat project file
6298 2011-08-04 Nicolas Roche <roche@adacore.com>
6300 * gnat_rm.texi: Minor editing.
6302 2011-08-04 Javier Miranda <miranda@adacore.com>
6304 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
6305 and the library case for VM targets.
6306 (Gen_Adainit_Ada): Likewise.
6308 2011-08-04 Robert Dewar <dewar@adacore.com>
6310 * g-altive.ads: Minor comment updates.
6311 * prj-nmsc.adb: Minor reformatting.
6313 2011-08-04 Javier Miranda <miranda@adacore.com>
6316 (Normalize_Scalars_Config): Value of the configuration switch set by
6317 pragma Normalize_Scalars when it appears in the gnat.adc file.
6318 (Normalize_Scalars): New field for record Config_Switches_Type. Used
6319 to save and restore settings of this pragma.
6321 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
6322 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
6324 2011-08-04 Vincent Celier <celier@adacore.com>
6326 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
6328 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6330 * makeutl.adb: Minor reformatting.
6332 2011-08-04 Olivier Hainque <hainque@adacore.com>
6334 * g-altive.ads: Update comments to reflect that only the soft
6335 binding is available today.
6337 2011-08-04 Robert Dewar <dewar@adacore.com>
6339 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
6340 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
6341 * gcc-interface/Make-lang.in: Update dependencies.
6343 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6345 * prj-env.adb: Remove local debug traces.
6347 2011-08-04 Yannick Moy <moy@adacore.com>
6349 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
6350 was used instead of Hi_OK, which could cause a read of an uninitialized
6351 value later on. Detected while working on the new warning.
6352 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
6354 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
6355 in more cases, in order to detect more unreferenced values.
6356 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
6357 object for expression, if any.
6359 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6361 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
6362 the operand types instead of the Esize.
6364 2011-08-04 Steve Baird <baird@adacore.com>
6366 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
6367 enable CodePeer_Mode.
6368 * bindusg.adb (Display): Add help message describing -P binder switch.
6369 * gnat_ugn.texi: Document -P binder switch.
6370 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
6371 user-defined main program directly.
6372 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
6373 user-defined main program in the context clause of the package body.
6375 2011-08-04 Yannick Moy <moy@adacore.com>
6377 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
6378 duplicate of Defining_Entity
6379 (Get_Unique_Entity_For_Decl): rename function into
6380 Unique_Defining_Entity
6381 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
6382 (Formal_Proof_On): remove synthesized flag
6383 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
6384 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
6385 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
6386 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
6387 Annotate (Formal_Proof)
6389 2011-08-04 Emmanuel Briot <briot@adacore.com>
6391 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
6392 source files with non-standard naming schemes, in imported projects
6394 2011-08-04 Emmanuel Briot <briot@adacore.com>
6396 * makeutl.adb (Complete_Mains): when a multi-unit source file is
6397 specified on the gprbuild command line, we need to compile all units
6398 within that file, not just the first one we find
6399 Fix error message for mains that are not found.
6401 2011-08-04 Thomas Quinot <quinot@adacore.com>
6403 * sem_ch6.adb: Update comment.
6404 * sem_ch12.adb: Minor reformatting.
6406 2011-08-04 Bob Duff <duff@adacore.com>
6408 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
6409 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
6410 race condition whose symptom is to fail to lock Parent. That, in turn,
6411 causes Parent.Awake_Count to be accessed without locking Parent, which
6412 causes another race condition whose symptom is that Parent.Awake_Count
6413 can be off by 1 (either too high or too low). The solution is to lock
6414 Parent unconditionally, and then lock Acceptor, before reading
6415 Acceptor.Terminate_Alternative.
6417 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6419 * debug.adb: Update comment.
6421 2011-08-04 Robert Dewar <dewar@adacore.com>
6423 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
6424 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
6425 exp_ch6.adb: Minor reformatting.
6427 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6429 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
6432 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6434 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
6436 2011-08-04 Thomas Quinot <quinot@adacore.com>
6438 * sinfo.ads: Minor reformatting.
6440 2011-08-04 Emmanuel Briot <briot@adacore.com>
6442 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
6443 even if there is no location.
6445 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6447 * sem_res.adb, sem_ch4.adb: move check for restriction
6448 No_Task_Hierarchy to resolve_allocator.
6450 2011-08-04 Thomas Quinot <quinot@adacore.com>
6452 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
6453 This flag of N_Pragma nodes is not used, remove it as well as all of
6454 the associated circuitry.
6456 2011-08-04 Javier Miranda <miranda@adacore.com>
6458 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
6459 runtime check on duplicated externa tags
6460 * debug.adb Document switch -gnatdQ.
6462 2011-08-04 Gary Dismukes <dismukes@adacore.com>
6464 * a-fihema.ads: Minor typo fix.
6466 2011-08-04 Yannick Moy <moy@adacore.com>
6468 * sem_ch10.adb: Minor comment update.
6470 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6472 * einfo.adb: Update the node field usage to reflect the renaming of
6473 Return_Flag to Return_ Flag_Or_Transient_Decl.
6474 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
6475 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
6476 (Write_Field15_Name): Change Return_Flag to
6477 Return_Flag_Or_Transient_Decl.
6478 * einfo.ads: Rename node field Return_Flag to
6479 Return_Flag_Or_Transient_Decl. Update the associated comment and all
6480 occurrences in entities.
6481 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
6482 associated Inline pragma.
6483 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
6484 associated Inline pragma.
6485 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
6487 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
6488 Return_Flag and Set_Return_Flag.
6489 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
6490 objects generated for controlled transients declared inside an
6491 Exception_With_Actions. Update the calls to Return_Flag.
6492 (Process_Object_Declaration): Add code to add a null guard for hook
6493 objects generated for controlled transients declared inside an
6494 Exception_With_Actions. Update related comment.
6495 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
6496 objects generated for controlled transients declared inside an
6497 Exception_With_Actions. Update the calls to Return_Flag.
6498 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
6500 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6502 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
6503 positional aggregate.
6505 2011-08-04 Vincent Celier <celier@adacore.com>
6507 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
6508 SLOC only for pragmas.
6510 2011-08-04 Emmanuel Briot <briot@adacore.com>
6512 * projects.texi: Minor typo fix.
6514 2011-08-04 Emmanuel Briot <briot@adacore.com>
6516 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
6517 on case-sensitive file systems.
6519 2011-08-04 Thomas Quinot <quinot@adacore.com>
6521 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
6522 nested in a disabled pragma.
6523 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
6524 enclosing pragma, if any, for X decisions.
6526 2011-08-04 Thomas Quinot <quinot@adacore.com>
6528 * sem_prag.adb: Minor reformatting.
6530 2011-08-04 Vincent Celier <celier@adacore.com>
6532 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
6533 allowed in no run time mode.
6535 2011-08-04 Vincent Celier <celier@adacore.com>
6537 * make.adb (Check): When -gnatc is used, check for the source file
6538 inside the ALI file with a canonical case file name.
6540 2011-08-04 Emmanuel Briot <briot@adacore.com>
6542 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
6543 overriding the separator.
6545 2011-08-04 Robert Dewar <dewar@adacore.com>
6547 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
6548 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
6550 2011-08-04 Robert Dewar <dewar@adacore.com>
6552 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
6554 2011-08-04 Yannick Moy <moy@adacore.com>
6556 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
6557 'Result only appears in postcondition of function.
6559 2011-08-04 Thomas Quinot <quinot@adacore.com>
6561 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
6562 external tag, include the value of the external tag in the exception
6565 2011-08-04 Yannick Moy <moy@adacore.com>
6567 * sem_attr.adb (Result): modify error message for misplaced 'Result
6569 2011-08-04 Sergey Rybin <rybin@adacore.com>
6571 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
6572 clear that the second argument must be an identifier.
6574 2011-08-04 Thomas Quinot <quinot@adacore.com>
6576 * exp_ch9.adb (Build_Barrier_Function): When compiling with
6577 -fpreserve-control-flow, insert an IF statement on the barrier
6578 condition to ensure that a conditional branch instruction is generated.
6580 2011-08-04 Emmanuel Briot <briot@adacore.com>
6582 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
6583 (Processing_Flags.Ignore_Missing_With): new flag.
6585 2011-08-04 Emmanuel Briot <briot@adacore.com>
6587 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
6588 Source_List_File on case-insensitive systems where the file is actually
6589 on a case-sensitive file system (NFS,...).
6591 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6593 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
6594 function return contains a controlled [extension] aggregate and the
6595 return statement is not part of a handled sequence of statements, wrap
6596 the return in a block. This ensures that all controlled temporaries
6597 generated during aggregate resolution will be picked up by the
6598 finalization machinery.
6600 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6602 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
6603 components, freeze type before resolution, to ensure that default
6604 initializations are present for all components.
6605 * sem_res.adb (Resolve_Actuals): the designated object of an
6606 accces-to-constant type is a legal actual in a call to an
6607 initialization procedure.
6609 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6611 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
6612 N_Unchecked_Type_Conversion to the possible containers of a renamed
6615 2011-08-04 Yannick Moy <moy@adacore.com>
6617 * par-ch13.adb (Aspect_Specifications_Present): recognize
6618 "with Identifier'Class =>" as an aspect, so that a meaningful warning
6619 is issued in Strict mode.
6620 * par.adb: Fix typos in comments.
6622 2011-08-04 Yannick Moy <moy@adacore.com>
6624 * sem_attr.adb (Result): modify error message to take into account Post
6625 aspect when compiling Ada 2012 (or newer) code.
6627 2011-08-04 Nicolas Roche <roche@adacore.com>
6629 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
6630 remove need for GCC exceptions.
6632 2011-08-04 Vincent Celier <celier@adacore.com>
6634 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
6635 project, not the source file name.
6636 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
6637 excluded, continue looking. This excluded source will only be returned
6638 if there is no other source with the same base name that is not locally
6641 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6643 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
6644 private and one of the operands is a real literal, use a qualified
6645 expression rather than a conversion which is not meaningful to the
6648 2011-08-04 Yannick Moy <moy@adacore.com>
6650 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
6651 corresponding aspect X'Class are allowed, proceed with analysis of the
6652 aspect instead of skipping it.
6654 2011-08-04 Tristan Gingold <gingold@adacore.com>
6656 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
6657 This will allow to have an Ada implementation for the subprogram.
6659 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6661 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
6662 completion and aspects are present, apply them to the entity for the
6663 type which is currently the partial view, but which is the one that
6665 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
6666 applies to a partial view, indicate that the full view has predicates
6667 and delayed aspects.
6668 (Replace_Type_Reference): Handle properly predicates that apply to the
6669 full view of a private completion.
6671 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6673 * layout.adb (Layout_Type): For composite types, do not set Esize.
6674 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
6676 (Size_Known): Look at the RM size of components instead of the Esize.
6677 (Freeze_Record_Type): Look at the RM size instead of the Esize to
6678 issue warning and activate Implicit_Packing.
6679 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
6680 if the Esize is not known.
6681 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
6682 for elementary types only.
6683 (Analyze_Record_Representation_Clause): Look at the RM size instead
6684 of the Esize to issue errors.
6685 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
6687 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
6689 Look at the RM size instead of the Esize for types if the latter is
6691 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
6693 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6695 * sem_type.adb: proper handling of equality not involving anonymous
6698 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6700 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
6701 Vis_Decls. When creating a library-level finalizer for a package spec,
6702 both the declaration and body of the finalizer are inserted either in
6703 the visible or private declarations of the package spec.
6705 2011-08-04 Javier Miranda <miranda@adacore.com>
6707 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
6708 use of the full-view of a type when invoking Is_Ancestor.
6709 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
6710 the full-view of private parents is requested, then use also the
6711 full-view of the parent of the first derivation.
6713 2011-08-04 Tristan Gingold <gingold@adacore.com>
6715 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
6716 instead of the locally imported procedure.
6717 * s-taprop-mingw.adb (Enter_Task): Ditto.
6718 * s-valrea.adb (Scan_Real): Ditto.
6719 * s-imgrea.adb (Set_Image_Real): Ditto.
6720 * s-flocon.ads: Make the package pure.
6722 2011-08-04 Thomas Quinot <quinot@adacore.com>
6724 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
6725 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
6726 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
6727 New subprogram, moved here from...
6728 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
6729 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
6730 rewriting of the last argument into a procedure call statement here...
6731 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
6734 2011-08-04 Thomas Quinot <quinot@adacore.com>
6736 * par_sco.adb: Minor reformatting.
6738 2011-08-04 Robert Dewar <dewar@adacore.com>
6740 * erroutc.adb: Minor reformatting.
6742 2011-08-04 Thomas Quinot <quinot@adacore.com>
6744 * par_sco.adb: Comment update.
6746 2011-08-04 Tristan Gingold <gingold@adacore.com>
6748 * s-flocon.ads: New file.
6749 * g-flocon.ads: Now a renaming of s-flocon.
6750 * Makefile.rtl: Add s-flocon.o
6752 2011-08-04 Javier Miranda <miranda@adacore.com>
6754 * exp_strm.adb (Build_Array_Input_Function): if the array type is
6755 constrained, do not attempt to build a subtype of it.
6757 2011-08-04 Yannick Moy <moy@adacore.com>
6759 * errout.ads Change comments: remove 'R'M as an example where quotes
6760 are needed; add ALFA as another case where quotes are not needed
6761 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
6762 case where quotes are not needed.
6763 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
6764 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
6765 Remove all occurrences of 'A'L'F'A
6767 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6769 * sem_ch13.adb: check legality of invariant pragma.
6771 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6773 * bindgen.adb: Add comments.
6775 2011-08-04 Yannick Moy <moy@adacore.com>
6777 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
6779 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
6780 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
6782 2011-08-04 Robert Dewar <dewar@adacore.com>
6784 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
6785 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
6786 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
6788 2011-08-04 Thomas Quinot <quinot@adacore.com>
6790 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
6792 2011-08-04 Thomas Quinot <quinot@adacore.com>
6795 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
6798 2011-08-04 Robert Dewar <dewar@adacore.com>
6800 * einfo.ads, exp_ch4.adb: Minor reformatting.
6802 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6804 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
6806 2011-08-04 Ed Schonberg <schonberg@adacore.com>
6808 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
6809 type in all cases to compute list of primitive operations, because full
6810 view may be an itype that is not attached to the list of declarations.
6812 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6814 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
6815 library has already been finalized.
6816 (Gen_Adafinal_C): Likewise.
6817 (Gen_Adainit_Ada): Generate an early return if the library has
6818 already been elaborated.
6819 (Gen_Adainit_C): Likewise.
6820 (Gen_Output_File_Ada): Generate an elaboration flag.
6821 (Gen_Output_File_C): Likewise.
6823 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6825 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
6826 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
6827 built in the first place.
6828 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
6829 for CodePeer because Finalize_Address was not built to begin with.
6830 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
6832 2011-08-04 Pascal Obry <obry@adacore.com>
6834 * adaint.c (__gnat_tmp_name): Use current process id to create temp
6835 filenames, this ensures unicity of filenames across processes.
6837 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6839 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
6840 Raise_Controlled to Raise_From_Controlled_Operation. Update the
6841 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
6842 Add False as the actual to From_Abort in the generated call to
6843 Raise_From_Controlled_Operation.
6845 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6847 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
6848 so that the ali file name can be retrieved from outside of this package.
6849 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
6850 doing nothing in the general case, but used to update the object file
6851 timestamp if directly generated by the backend.
6852 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
6853 to a later time than the ali file one.
6855 2011-08-04 Yannick Moy <moy@adacore.com>
6857 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
6858 entities whose body contains an Annotate pragma which forces formal
6860 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6861 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
6862 Mark_Non_ALFA_Subprogram to pass in a message and node.
6863 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
6864 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
6865 surrounding subprogram.
6866 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
6867 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
6868 as not in ALFA is annotated with Formal_Proof being On, then an error
6869 is issued based on the additional parameters for message and node.
6870 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
6871 * gcc-interface/Make-lang.in: Update dependencies.
6873 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6875 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
6876 Finalize_Address when CodePeer is enabled.
6878 2011-08-04 Pascal Obry <obry@adacore.com>
6880 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
6881 the latter returns a pointer to a static buffer which is deallocated
6882 at the end of the routine.
6884 2011-08-04 Yannick Moy <moy@adacore.com>
6886 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
6887 after index creation; mark unconstrained base array type generated as
6888 being in/not in ALFA as well
6889 (Make_Index): mark subtype created as in/not in ALFA
6890 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
6891 over a loop as in/not in ALFA, depending on its type and form of loop
6894 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6896 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
6897 directly to False on .NET and JVM.
6899 2011-08-04 Yannick Moy <moy@adacore.com>
6901 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
6902 constraint that subtype must come from source code to be in ALFA, so
6903 that anonymous subtypes can be in ALFA too.
6905 2011-08-04 Yannick Moy <moy@adacore.com>
6907 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
6908 reference for ALFA mode.
6909 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
6910 procedure public so as to use it from formal verification back-end.
6912 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
6914 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
6915 invalid checks of the Parameter, making Remove_Switch not working
6918 2011-08-04 Arnaud Charlet <charlet@adacore.com>
6920 * targparm.ads: Update header: no run-time exception is needed on this
6923 2011-08-04 Vincent Celier <celier@adacore.com>
6925 * a-fihema.adb: Use System.IO instead of GNAT.IO
6927 2011-08-04 Thomas Quinot <quinot@adacore.com>
6929 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
6930 are forbidden in Compiler_Unit mode.
6932 2011-08-04 Robert Dewar <dewar@adacore.com>
6934 * sem_util.adb: Minor reformatting.
6936 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6938 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
6939 library-level finalizers.
6940 (Gen_Finalize_Library_C): Update the import string for library-level
6942 (Gen_Finalize_Library_Defs_C): Update the definition name of a
6943 library-level finalizer.
6944 * exp_ch7.adb: Remove with and use clauses for Stringt.
6945 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
6946 Spec_Decl. Add local variable Body_Id. The names of library-level
6947 finalizers are now manually fully qualified and are no longer external.
6948 A single name is now capable of servicing .NET, JVM and non-VM targets.
6949 Pragma Export is no longer required to provide visibility for the name.
6950 (Create_Finalizer_String): Removed.
6951 (New_Finalizer_Name): New routine which mimics New_..._Name.
6953 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6955 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
6956 elaboration counter to Standard_Short_Integer.
6957 * sem_util.adb (Build_Elaboration_Entity): Likewise.
6958 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
6959 (Gen_Elab_Externals_C): Likewise.
6961 2011-08-04 Ed Falis <falis@adacore.com>
6963 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
6964 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
6965 system-vxworks-mips.ads, system-vxworks-x86.ads
6966 (Always_Compatible_Rep): set to False for all VxWorks targets.
6968 2011-08-04 Robert Dewar <dewar@adacore.com>
6970 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
6971 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
6972 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
6973 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
6974 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
6975 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
6976 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
6977 Minor reformatting and code reorganization.
6979 2011-08-04 Emmanuel Briot <briot@adacore.com>
6981 * projects.texi: Added doc for aggregate projects.
6983 2011-08-04 Emmanuel Briot <briot@adacore.com>
6985 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
6986 Add support for overriding the Project_Path in aggregate projects.
6988 2011-08-04 Robert Dewar <dewar@adacore.com>
6990 * a-cofove.ads: Minor reformatting.
6992 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6994 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
6995 on the generated code.
6996 (Build_Finalize_Statements): Update the comment on the generated code.
6997 (Build_Initialize_Statements): Update the comment on the generated code.
6998 (Build_Object_Declarations): Add local variable Result. The object
6999 declarations are now built in sequence.
7000 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
7003 2011-08-04 Robert Dewar <dewar@adacore.com>
7005 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
7007 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7009 * einfo.ads (Elaboration_Entity): Document new definition and use.
7010 (Elaboration_Entity_Required): Adjust to above change.
7011 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
7012 * exp_ch12.adb: And with and use for Snames.
7013 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
7014 * exp_util.adb (Set_Elaboration_Flag): Likewise.
7015 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
7016 <Check_Unit_Name>: Deal with N_Expanded_Name.
7017 <Attribute_Elaborated>: Extend to all unit names.
7018 * sem_elab.adb: And with and use for Uintp.
7019 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
7020 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
7021 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
7022 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
7023 from Gen_Adainit_Ada.
7024 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
7025 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
7026 case, do not call System.Standard_Library.Adafinal; instead call
7027 finalize_library if needed.
7028 (Gen_Adafinal_C): Likewise.
7029 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
7030 non-main program case.
7031 (Gen_Adainit_C): Generate a couple of external declarations here.
7032 In the main program case, set SSL.Finalize_Library_Objects.
7033 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
7034 (Gen_Elab_Calls_C): Likewise.
7035 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
7036 (Gen_Finalize_Library_C): Likewise. Generate a full function.
7037 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
7039 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
7040 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
7042 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
7043 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
7044 of external declarations. Call Gen_Finalize_Library_C.
7046 2011-08-04 Emmanuel Briot <briot@adacore.com>
7048 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
7049 Compute_Compilation_Phases): new subprogram.
7050 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
7051 The number of mains as well as the various compilation phases that
7052 need to be run are now project tree specific, since various
7053 aggregated trees might have different requirements. In particular,
7054 they do not all require bind or link phases.
7056 2011-08-04 Emmanuel Briot <briot@adacore.com>
7058 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
7059 (Project_Tree_Appdata): New type.
7060 It is now possible to associate application-specific data to a project
7061 tree. In particular, this is used in the gprbuild builder to avoid a
7062 number of global tables and htables, especially now that there can be
7063 several project trees loaded at once because of aggregate projects.
7064 (Debug_Name): new procedure.
7065 * projects.texi: Clarify syntax of "**" for Source_Dirs
7067 2011-08-03 Emmanuel Briot <briot@adacore.com>
7069 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
7070 the "roots" for a main.
7071 (Fill_From_Project): add support for aggregate projects. Main units
7072 in aggregated projects are now automatically added in the list of
7073 files to build (although this fails later on in gprbuild, because
7074 these files are not using the root proejct tree, so this needs
7076 * gcc-interface/Make-lang.in: Update dependencies.
7078 2011-08-03 Yannick Moy <moy@adacore.com>
7080 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
7081 conditional expression in ALFA.
7082 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
7083 expressions as not in ALFA.
7085 2011-08-03 Robert Dewar <dewar@adacore.com>
7087 * a-cofove.adb: Minor reformatting.
7089 2011-08-03 Emmanuel Briot <briot@adacore.com>
7091 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
7092 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
7094 These packages are more logically placed in the Queue package, since
7095 they manipulate the queue. It is also likely that they can be adapted
7096 for gnatmake, thus sharing more code.
7097 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
7098 that we could move the above.
7100 2011-08-03 Emmanuel Briot <briot@adacore.com>
7102 * errutil.adb (Finalize): clean up the list of error messages on exit.
7103 Calling this subprogram multiple times will no longer show duplicate
7104 error messages on stderr.
7106 2011-08-03 Emmanuel Briot <briot@adacore.com>
7108 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
7109 Getopt_Switches when we have already define a command line
7112 2011-08-03 Yannick Moy <moy@adacore.com>
7114 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
7115 in ALFA. Instead, they are considered as assertions to prove.
7116 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
7117 nodes as not in ALFA. Instead, include conditional expressions in ALFA
7118 if they have no ELSE part, or if they occur in pre- and postconditions,
7119 where the Condition cannot have side-effects in ALFA
7120 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
7121 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
7122 Instead, include type conversion between scalar types in ALFA.
7123 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
7124 if-and-only-if its type is in ALFA.
7126 2011-08-03 Thomas Quinot <quinot@adacore.com>
7128 * scos.adb, get_scos.adb, put_scos.adb
7129 New code letter for decisions: G (entry guard)
7131 (Traverse_Subprogram_Body): Rename to...
7132 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
7133 (Traverse_Protected_Body): New subprogram
7134 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
7135 protected bodies and entry bodies.
7137 2011-08-03 Yannick Moy <moy@adacore.com>
7139 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
7140 entities with get/set subprograms, which is set on procedure entities
7141 generated by the compiler for a postcondition.
7142 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
7143 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
7144 entity for a declaration
7145 (Get_Unique_Entity_For_Decl): new function returning an entity which
7146 represents a declaration, so that matching spec and body have the same
7149 2011-08-03 Robert Dewar <dewar@adacore.com>
7151 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
7152 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
7154 2011-08-03 Yannick Moy <moy@adacore.com>
7156 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
7157 library-level because retriction No_Implicit_Dynamic_Code in the
7158 front-end prevents its definition as a local subprogram
7159 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
7160 for reuse in other contexts
7161 (Traverse_Declarations_Or_Statements,
7162 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
7163 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
7164 procedures take a callback parameter to be called on all declarations
7166 (Traverse_All_Compilation_Units): new generic function to traverse a
7167 compilation unit and call a callback parameter on all declarations
7169 2011-08-03 Javier Miranda <miranda@adacore.com>
7171 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
7172 in Java since they are always enclosed in a namespace that
7173 differentiates them, and overloaded entities are supported by the VM.
7175 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7177 * checks.adb (Determine_Range): If a computed bound of an operation is
7178 outside the range of the base type of the expression, and overflow
7179 checks are enabled, the result is unknown and cannot be used for any
7180 subsequent constant folding.
7181 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
7182 unknown, so is the result of the comparison.
7184 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7186 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
7187 From_Abort. When finalization was triggered by an abort, propagate
7188 Standard'Abort_Signal rather than Program_Error.
7189 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
7191 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
7192 From_Abort. When finalization was triggered by an abort, propagate
7193 Standard'Abort_Signal rather than Program_Error.
7194 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
7196 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
7197 Abort_Id. Update the calls to Build_Object_Declarations and
7198 Build_Raise_Statement to include Abort_Id.
7199 (Build_Adjust_Statements): New local variable Abort_Id. Update the
7200 calls to Build_Object_Declarations and Build_Raise_Statement to include
7202 (Build_Finalize_Statements): New local variable Abort_Id. Update the
7203 calls to Build_Object_Declarations and Build_Raise_Statement to include
7205 (Build_Components): Create an entity for Abort_Id when exceptions are
7206 allowed on the target.
7207 (Build_Finalizer): New local variable Abort_Id.
7208 (Build_Initialize_Statements): New local variable Abort_Id. Update the
7209 calls to Build_Object_Declarations and Build_Raise_Statement to include
7211 (Build_Object_Declarations): Add new formal Abort_Id. Create the
7212 declaration of flag Abort_Id to preserve the original abort status
7213 before finalization code is executed.
7214 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
7215 runtime routine Raise_From_Controlled_Operation.
7216 (Create_Finalizer): Update the call to Build_Raise_Statement to include
7217 Abort_Id. Update the call to Build_Object_Declarations to include
7218 Abort_Id. Update the layout of the finalizer body.
7219 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
7220 (Process_Transient_Objects): New local variable Abort_Id. Remove the
7221 clunky code to create all flags and objects related to
7222 exception propagation and replace it with a call to
7223 Build_Object_Declarations. Update the call to Build_Raise_Statement to
7225 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
7226 Add new formal Abort_Id and associated comment on its use.
7227 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
7229 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
7230 Remove the clunky code to create all flags and objects related to
7231 exception propagation and replace it with a call to
7232 Build_Object_Declarations. Update the call to Build_Raise_Statement.
7234 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7236 * s-tassta.adb: Fix minor typos.
7238 2011-08-03 Robert Dewar <dewar@adacore.com>
7240 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
7241 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
7243 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7245 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
7246 to packages. This ensures that the finalizer body will not end up
7247 inside the freeze node.
7248 (Process_Declarations): Add code to detect whether a freeze node has a
7249 nested finalization collection.
7251 2011-08-03 Pascal Obry <obry@adacore.com>
7253 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
7254 (Current_Session): Return a not null access to Session_Type.
7255 (Default_Session): Likewise.
7257 2011-08-03 Robert Dewar <dewar@adacore.com>
7259 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
7260 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
7262 2011-08-03 Pascal Obry <obry@adacore.com>
7264 * g-awk.ads: Minor comment fix.
7266 2011-08-03 Sergey Rybin <rybin@adacore.com>
7268 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
7269 the tree structure related to discriminant constraints.
7270 Original_Discriminant cannot be used any more for computing the
7271 defining name for the reference to a discriminant.
7273 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7275 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
7276 function is not visibly tagged, this is not a dispatching call and
7277 therfore is not Tag_Indeterminate, even if the function is marked as
7278 dispatching on result.
7280 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7282 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
7283 (Expand_N_Free_Statement): Add a guard to protect against run-times
7284 which do not support controlled types.
7285 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
7286 against run-times which do not support controlled types.
7287 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
7288 against run-times which do not support controlled types.
7289 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
7290 against run-times which do not support controlled types.
7291 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
7292 protect against run-times which do not support controlled types.
7294 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7296 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
7297 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
7299 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7301 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
7302 modified in the source, to prevent spurious warnings when compiling
7305 2011-08-03 Thomas Quinot <quinot@adacore.com>
7307 * a-except-2005.adb: Minor reformatting.
7309 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7311 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
7312 is a renaming declaration in the private part of a package, do not emit
7313 a warning that the with_clause could be moved because the renaming may
7314 be used in the body or in a child unit.
7316 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7318 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
7319 Propagate the Comes_From_Source attribute from the original return
7320 object to the renaming.
7322 2011-08-03 Jose Ruiz <ruiz@adacore.com>
7324 * exp_ch7.adb (Build_Raise_Statement): Do not call
7325 Raise_From_Controlled_Operation when this routine is not present in
7326 the run-time library.
7327 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
7328 libraries (Ravenscar), tasks are non-terminating, and protected objects
7329 and tasks can only appear at library level, so we do not want
7330 finalization of protected objects nor tasks.
7331 * exp_intr.adb: Minor clarification in comment.
7332 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
7333 Gen_Output_File_C): Remove references to finalization of library-level
7334 objects when using restricted run-time libraries.
7336 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7338 * sem_ch3.adb (Build_Discriminant_Constraints): Set
7339 Original_Discriminant only if the parent type is a generic formal.
7341 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7343 * exp_ch13.adb: Add with and use clause for Targparm;
7344 (Expand_N_Free_Statement): Prevent the generation of a custom
7345 Deallocate on .NET/JVM targets since this requires pools and address
7347 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
7348 .NET/JVM targets, attach the newly allocated object to the access
7349 type's finalization collection. Do not generate a call to
7350 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
7351 exist in the runtime.
7352 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
7353 create a custom Allocate for object that do not require initialization.
7354 Attach a newly allocated object to the access type's finalization
7355 collection on .NET/JVM.
7356 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
7357 assignment of controlled types on .NET/JVM. The two hidden pointers
7358 Prev and Next and stored and later restored after the assignment takes
7360 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
7361 kludge for .NET/JVM to recognize a particular piece of code coming from
7362 Heap_Management and change the call to Finalize into Deep_Finalize.
7363 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
7364 finalization collections on .NET/JVM only for types derived from
7365 Controlled. Separate the association of storage pools with a collection
7366 and only allow it on non-.NET/JVM targets.
7367 (Make_Attach_Call): New routine.
7368 (Make_Detach_Call): New routine.
7369 (Process_Object_Declarations): Suppress the generation of
7370 build-in-place return object clean up code on .NET/JVM since it uses
7372 * exp_ch7.ads (Make_Attach_Call): New routine.
7373 (Make_Detach_Call): New routine.
7374 * exp_intr.adb Add with and use clause for Targparm.
7375 (Expand_Unc_Deallocation): Detach a controlled object from a collection
7376 on .NET/JVM targets.
7377 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
7378 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
7379 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
7380 names used in finalization.
7382 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7384 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
7385 (Attach, Detach): Lock the current task when chaining an object onto a
7388 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7390 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
7391 Rewritten to create the message strings when the exception is not
7392 raised by an abort during finalization.
7393 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
7394 Raise_From_Controlled_Operation and update its associated comment.
7395 * a-fihema.ads, a-fihema.adb: New GNAT unit.
7396 Ada.Finalization.Heap_Management provides key functionality
7397 associated with controlled objects on the heap, their creation,
7398 finalization and reclamation. Type Finalization_Collection is
7399 effectively a wrapper which sits ontop of a storage pool and performs
7400 all necessary bookkeeping for all the objects it contains. Each
7401 access-to-controlled or access-to-class-wide type receives a collection
7402 as part of its expansion. The compiler generates buffer code and
7403 invokes Allocate / Deallocate to create and destroy allocated
7405 * a-finali.adb ("="): Removed.
7406 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
7407 fields Prev and Next.
7408 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
7409 A library unit with at least one controlled object on the library level
7410 has a special finalizer which is invoked by the binder. To signal this,
7411 ali files carry field PF.
7412 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
7413 associated comment on field usage.
7414 * a-tags.adb (Get_RC_Offset): Removed.
7415 (Needs_Finalization): New routine.
7416 * a-tags.ads: Update the structure of the GNAT dispatch tables.
7417 Dispatch tables now carry field Needs_Finalization which provides
7418 runtime indication whether a type is controlled or has controlled
7419 components or both. Remove field RC_Offset.
7420 (Get_RC_Offset): Removed along with its associated pragma Export.
7421 Since tagged types with controlled components no longer carry hidden
7422 field _controller, the special mechanism to retrieve its location is no
7424 (Needs_Finalization): New routine.
7425 * atree.ads, atree.adb (Elist24): New routine.
7426 (Set_Elist24): New routine.
7427 * atree.h: Add a define clause for Elist24.
7428 * bindgen.adb New library-level variable Lib_Final_Built.
7429 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
7430 presence of a VM target, the routine generates calls to the proper
7431 library finalization routine.
7432 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
7433 targets. Set the correct library finalization routine depending on
7434 whether the library has controlled objects or this is a VM compilation.
7435 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
7436 to library-level finalizers of compiled units in reverse order of
7437 elaboration. It also produces exception management code and reraises a
7438 potential exception after all units have been finalized.
7439 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
7440 library-level finalizers of compiled units in reverse order of
7442 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
7443 definitions of all library-level finalizers available to the compilation
7444 (Gen_Main_Ada): Directly call Adafinal which now contails all target
7446 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
7447 System.Standard_Library.Adafinal directly. If the library needs
7448 finalization actions, create the sequence of finalization calls.
7449 (Gen_Output_File_Ada): Alphabetize local variables and constants.
7450 Generate a with clause for System.Soft_Links when compiling for a VM.
7451 Remove the code which imports System.Standard_Library.Adafinal as
7452 Do_Finalize. Generate the library finalization routine.
7453 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
7454 If the library needs finalization actions, create all the definitions
7455 of library- level finalizers.
7456 (Has_Finalizer): New routine. Determines whether at least one compiled
7457 unit has a library-level finalizer.
7458 Add type Qualification_Mode.
7459 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
7460 * einfo.adb: New usage of field 15 as Return_Flag.
7461 Remove Finalization_Chain_Entity from the usages of field 19.
7462 Remove Associated_Final_Chain from the usages of field 23.
7463 New usage of field 23 as Associated_Collection.
7464 New usage of field 24 as Finalizer.
7465 New usage of flag 252 as Is_Processed_Transient.
7466 (Associated_Final_Chain): Removed.
7467 (Associated_Collection): New routine.
7468 (Finalization_Chain_Entity): Removed.
7469 (Finalizer): New routine.
7470 (Is_Finalizer): New routine.
7471 (Is_Processed_Transient): New routine.
7472 (Return_Flag): New routine.
7473 (Set_Associated_Final_Chain): Removed.
7474 (Set_Associated_Collection): New routine.
7475 (Set_Finalization_Chain_Entity): Removed.
7476 (Set_Finalizer): New routine.
7477 (Set_Is_Processed_Transient): New routine.
7478 (Set_Return_Flag): New routine.
7479 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
7481 (Write_Field8_Name): Alphabetize the output.
7482 (Write_Field11_Name): Alphabetize the output.
7483 (Write_Field12_Name): Alphabetize the output.
7484 (Write_Field13_Name): Alphabetize the output.
7485 (Write_Field14_Name): Alphabetize the output.
7486 (Write_Field15_Name): Alphabetize the output.
7487 (Write_Field16_Name): Alphabetize the output.
7488 (Write_Field17_Name): Alphabetize the output.
7489 (Write_Field18_Name): Alphabetize the output.
7490 (Write_Field19_Name): Alphabetize the output. Remove the output of
7491 Finalization_Chain_Entity.
7492 (Write_Field20_Name): Alphabetize the output.
7493 (Write_Field21_Name): Alphabetize the output.
7494 (Write_Field22_Name): Alphabetize the output.
7495 (Write_Field23_Name): Alphabetize the output. Remove the output of
7496 Associated_Final_Chain. Add output for Associated_Collection.
7497 (Write_Field24_Name): Alphabetize the output.
7498 (Write_Field25_Name): Add output for Finalizer.
7499 (Write_Field26_Name): Alphabetize the output.
7500 (Write_Field27_Name): Alphabetize the output.
7501 (Write_Field28_Name): Alphabetize the output.
7502 * einfo.ads: Add new field description for Associated_Collection and
7504 Remove Associated_Final_Chain and its uses in nodes.
7505 Remove Finalization_Chain_Entity and its uses in nodes.
7506 Add new field description for Finalizer and its uses in nodes.
7507 Add new synthesized attribute Is_Finalizer.
7508 Add new flag description for Is_Processed_Transient and its uses in
7510 Add new field description for Return_Flag and its uses in nodes.
7511 (Associated_Final_Chain): Removed along with its pragma Inline.
7512 (Associated_Collection): New routine and pragma Inline.
7513 (Finalization_Chain_Entity): Removed along with its pragma Inline.
7514 (Finalizer): New routine and pragma Inline.
7515 (Is_Finalizer): New routine and pragma Inline.
7516 (Is_Processed_Transient): New routine and pragma Inline.
7517 (Return_Flag): New routine and pragma Inline.
7518 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
7519 (Set_Associated_Collection): New routine and pragma Inline.
7520 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
7521 (Set_Finalizer): New routine and pragma Inline.
7522 (Set_Is_Processed_Transient): New routine and pragma Inline.
7523 (Set_Return_Flag): New routine and pragma Inline.
7524 * exp_aggr.adb: Alphabetize subprograms.
7525 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
7526 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
7527 associated comments. Remove local variables External_Final_List and
7529 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
7530 Ancestor. Remove the retrieval of finalization lists. Update the call to
7532 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
7533 lists. Update the call to Late_Expansion.
7534 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
7535 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
7536 (Gen_Assign): Remove the retrieval of the finalization list used to
7537 build the assignment. Update the calls to Make_Init_Call and
7539 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
7540 Remove the mechanism to determine attachment levels and finalization
7541 list retrieval. Remove the processing for coextensions.
7542 (Init_Controller): Removed. Controllers no longer exist.
7543 (Late_Expansion): Remove formals Flist and Obj along with their
7544 associated comments. Update the calls to Build_Record_Aggr_Code and
7545 Build_Array_Aggr_Code.
7546 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
7547 (Expand_N_Freeze_Entity): Add special processing for finalizers which
7548 appear in entry bodies, protected subprograms and task bodies.
7549 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
7550 * exp_ch3.adb (Add_Final_Chain): Removed.
7551 (Build_Array_Init_Proc): Alphabetize local variables.
7552 (Build_Assignment): Alphabetize local variables. Update the call to
7554 (Build_Class_Wide_Master): Rename local variables to better reflect
7556 (Build_Discriminant_Assignments): Code reformatting.
7557 (Build_Init_Call_Thru): Code reformatting.
7558 (Build_Init_Procedure): Code reformatting. Generate a special version
7559 of Deep_Finalize which is capable of finalizing all initialized
7560 components and ignore the rest.
7561 (Build_Init_Statements): Rename local variables to better reflect their
7563 Reimplement the mechanism to include the creation and update of an index
7564 variable called a "counter". It is used as a bookmark for tracing
7565 initialized and non-initialized components.
7566 (Build_Initialization_Call): Remove local variable Controller_Typ.
7567 Alphabetize all local variables. Remove the initialization of the
7568 record controller and update the call to Make_Init_Call.
7569 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
7570 New local variable Counter.
7571 (Constrain_Array): Alphabetize.
7572 (Expand_Freeze_Array_Type): Create a collection instead of a
7574 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
7575 Finalize_Address which is used in conjunction with allocated controlled
7577 (Expand_N_Object_Declaration): Remove the creation of a finalization
7578 list for anonymous access types. Update the calls to Make_Init_Call and
7580 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
7581 retrieval of finalization lists. Remove the expansion of the record
7582 controller. Create TSS primitive Finalize_Address used in conjunction
7583 with controlled objects on the heap. Create finalization collections
7584 for access-to-controlled record components.
7585 (Expand_Record_Controller): Removed.
7586 (Freeze_Type): Remove the freezing of record controllers. Freezing of
7587 class-wide types now requires additional processing. Create
7588 finalization collections for access-to-controlled types.
7589 (Increment_Counter): New routine.
7590 (Make_Counter): New routine.
7591 (Make_Eq_If): Remove the mention of Name_uController.
7592 (Make_Predefined_Primitive_Specs): There is no longer need to skip
7593 types coming from System.Finalization_Root.
7594 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
7595 (Predefined_Primitive_Bodies): There is no longer need to skip types
7596 coming from System.Finalization_Root.
7597 (Stream_Operation_OK): Do not generate stream routines for
7598 type Ada.Finalization.Heap_Management.Finalization_Collection.
7599 * exp_ch3.ads: Alphabetize subprograms.
7600 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
7601 Add with and use clause for Lib.
7602 (Complete_Coextension_Finalization): Removed.
7603 (Complete_Controlled_Allocation): New routine. Create a finalization
7604 collection for anonymous access-to-controlled types. Create a custom
7605 Allocate which interfaces with the back end and the machinery in
7607 (Expand_Allocator_Expression): Add necessary calls to
7608 Complete_Controlled_Allocation. Remove the retrieval of finalization
7609 lists. Update the calls to Make_Adjust_Call. Generate a call to
7610 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
7611 the associated collection.
7612 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
7613 Code clean up. Remove the retrieval of finalization lists and
7615 Update the call to Make_Init_Call. Generate a call to
7616 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
7617 the associated collection.
7618 (Get_Allocator_Final_List): Removed. Finalization lists are not
7620 (Suitable_Element): Remove the mention of Name_uController.
7621 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
7622 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
7623 the left hand side, carry out the assignment and adjust the left hand
7625 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
7626 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
7627 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
7628 BIP_Collection and BIPcollection.
7629 (Build_Heap_Allocator): New routine used to allocate the return object
7630 of a build-in-place function onto a collection.
7631 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
7632 (Expand_Call): Do not replace direct calls to Deep routines with their
7634 (Expand_N_Extended_Return_Statement): Give all variables shorter names
7635 and update their occurrences. Add a special return flag to monitor the
7636 [ab]normal execution of the function. The flag is set right before the
7638 Rewrite the mechanism used to allocate a build-in-place return object
7639 on the heap or on a storage pool.
7640 (Is_Direct_Deep_Call): New routine.
7641 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
7642 build-in-place function call instead of a final list. Build a call to
7643 Set_Finalize_Address_Ptr to decorate the associated collection.
7644 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
7645 order to name the build-in-place function call's result for later
7646 finalization. Add a collection to a build-in-place function call
7647 instead of a final list.
7648 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
7649 build-in-place function call instead of a final list. Remove the code
7650 which moves one final list and transforms it into the actual in a
7651 nested build-in-place call.
7652 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
7653 build-in-place function call instead of a final list.
7654 (Move_Final_List): Removed.
7655 (Needs_BIP_Collection): New routine.
7656 (Needs_BIP_Final_List): Removed.
7657 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
7658 enumeration type BIP_Formal_Kind.
7659 Update the related comment.
7660 (Needs_BIP_Collection): New routine.
7661 (Needs_BIP_Final_List): Removed.
7662 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
7663 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
7664 majority of subprograms in this unit. Add Name_Finalize_Address to
7665 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
7666 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
7667 statements for an array type.
7668 (Build_Adjust_Statements): Create the adjust statements for a record
7670 (Build_Cleanup_Statements): New routine. A procedure which given any
7671 construct containing asynchronous calls, references to _master, or is a
7672 task body, a task allocation or a protected body produces the necessary
7673 runtime calls to clean up these constructs.
7674 (Build_Exception_Handler): New routine.
7675 (Build_Final_List): Removed.
7676 (Build_Finalization_Collection): New routine. A core procedure which
7677 creates a collection to service heap allocated controlled objects
7678 associated with an access-to-controlled type.
7679 (Build_Finalize_Statements): Create the finalization statements for a
7681 (Build_Finalizer): New routine. A core procedure which given any
7682 construct with declarations and/or statements detects all objects which
7683 need any type of clean up (controlled objects, protected objects) and
7684 generates all necessary code to clean up the said objects in the proper
7686 (Build_Finalizer_Call): New routine.
7687 (Build_Initialize_Statements): Create the initialization statements for
7688 an array type. The generated routine contains code to finalize partially
7690 (Build_Object_Declarations): New routine.
7691 (Build_Raise_Statement): New routine.
7692 (Clean_Simple_Protected_Objects): Removed.
7693 (Controller_Component): Removed.
7694 (Enclosing_Function): New routine.
7695 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
7696 either declarations or statements or both.
7697 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
7698 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
7700 (Find_Final_List): Removed.
7701 (Global_Flist_Ref): Removed.
7702 (In_Finalization_Root): Removed.
7703 (Insert_Actions_In_Scope_Around): Determine the range of the transient
7704 scope in terms of tree nodes. Process all transient variables within
7706 (Make_Adjust_Call): Rewritten. There is no longer an attach call
7707 generated after the adjust.
7708 (Make_Attach_Call): Removed.
7709 (Make_Call): New routine.
7710 (Make_Clean): Removed.
7711 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
7713 (Make_Deep_Proc): Rewritten to generate the new profile signature used
7715 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
7717 (Make_Final_Call): Modified to simply create a call to either
7718 Deep_Finalize or Finalize.
7719 (Make_Finalize_Address_Body): New routine.
7720 (Make_Finalize_Address_Stmts): New routine. A function which produces
7721 TSS primitive Finalize_Address used in conjunction with heap allocated
7723 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
7724 (Make_Init_Call): Rewritten. There is no longer an attach call
7725 generated after initialization.
7726 (Make_Local_Deep_Finalize): New routine.
7727 (Make_Set_Finalize_Address_Ptr_Call): New routine.
7728 (Make_Transient_Block): Remove the finalization list retrieval and
7730 (Needs_Finalization): Moved to Exp_Util.
7731 (Parent_Field_Type): New routine.
7732 (Preprocess_Components): New routine.
7733 (Process_Transient_Objects): New routine.
7734 (Wrap_HSS_In_Block): New routine.
7735 (Wrap_Transient_Declaration): Remove finalization list management and
7736 controller insertion.
7737 (Wrap_Transient_Expression): Code reformatting.
7738 (Wrap_Transient_Statement): Code reformatting.
7739 * exp_ch7.ads (Build_Final_List): Removed.
7740 (Build_Finalization_Collection): New routine.
7741 (Build_Raise_Statement): New routine.
7742 (Controller_Component): Removed.
7743 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
7744 (Find_Final_List): Removed.
7745 (In_Finalization_Root): Removed.
7746 (Is_Simple_Protected_Type): Update related comment.
7747 (Make_Adjust_Call): New parameter profile and associated comments.
7748 (Make_Attach_Call): Removed.
7749 (Make_Final_Call): New parameter profile and associated comments.
7750 (Make_Finalize_Address_Body): New routine.
7751 (Make_Init_Call): New parameter profile and associated comments.
7752 (Make_Local_Deep_Finalize): New routine.
7753 (Make_Set_Finalize_Address_Ptr_Call): New routine.
7754 (Needs_Finalization): Moved to Exp_Util.
7755 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
7756 (Expand_N_Protected_Body): Remove the handling of finalization lists.
7757 (Find_Protection_Type): Moved to Exp_Util.
7758 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
7759 (Make_DT): Update sequence of dispatch table initialization. Remove the
7760 initialization of field RC_Offset. Add initialization of field Needs_
7762 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
7763 Reimplement how an object is first finalized, then deallocated.
7764 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
7766 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
7767 Register TSS_Finalize_Address with type TSS_Names.
7768 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
7769 procedure provides the interface between an allocation / deallocation
7770 and the support machinery in Ada.Finalization.Heap_Management.
7771 (Find_Init_Call): Code reformatting.
7772 (Find_Init_Call_In_List): Code reformatting.
7773 (Find_Protection_Type): Moved from Exp_Ch9.
7774 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
7775 (Has_Controlled_Coextensions): Removed.
7776 (Has_Controlled_Objects): New routine.
7777 (In_Library_Level_Package_Body): New routine.
7778 (Insert_Action_After): New routine.
7779 (Is_Finalizable_Transient): New routine. This predicate determines
7780 whether an object declaration is one of the many variants of controlled
7782 (Is_Null_Access_BIP_Func_Call): New routine.
7783 (Is_Non_BIP_Func_Call): New routine.
7784 (Is_Related_To_Func_Return): New routine.
7785 (Needs_Finalization): Moved from Exp_Ch7.
7786 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
7787 (Find_Protection_Type): Moved from Exp_Ch9.
7788 (Has_Controlled_Coextensions): Removed.
7789 (Has_Controlled_Objects): New routine.
7790 (In_Library_Level_Package_Body): New routine.
7791 (Insert_Action_After): New routine.
7792 (Is_Finalizable_Transient): New routine.
7793 (Is_Null_Access_BIP_Func_Call): New routine.
7794 (Is_Non_BIP_Func_Call): New routine.
7795 (Is_Related_To_Func_Return): New routine.
7796 (Needs_Finalization): Moved from Exp_ch7.
7797 * expander.adb (Expand): Add a case for N_Free_Statement.
7798 * freeze.adb (Freeze_All): Replace the generation of a finalization
7799 list with a collection for access-to-controlled types.
7800 (Freeze_Entity): Code reformatting.
7801 (Freeze_Record_Type): Remove the freezing of a record controller
7803 (Freeze_Subprogram): Code reformatting.
7804 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
7806 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
7807 has a library-level finalizer.
7808 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
7809 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
7810 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
7811 files. Add a-fihema to the list of object files.
7813 Alphabetize the associations in type Is_Parameterless_Attribute.
7814 * rtsfind.ads: Ada.Finalization_List.Controller and
7815 System.Finalization_Implementation are no longer a GNAT unit.
7816 Update the range of type Ada_Finalization_Child. Remove the following
7817 recoverable entities:
7819 RE_Attach_To_Final_List
7823 RE_Finalizable_Ptr_Ptr
7824 RE_Global_Final_List
7825 RE_Limited_Record_Controller
7828 RE_Record_Controller
7829 RE_Simple_List_Controller
7831 Add the following recoverable entities:
7833 RE_Add_Offset_To_Address
7837 RE_Exception_Identity
7838 RE_Finalization_Collection
7839 RE_Finalization_Collection_Ptr
7840 RE_Needs_Finalization
7841 RE_Save_Library_Occurrence
7842 RE_Set_Finalize_Address_Ptr
7843 RE_Set_Storage_Pool_Ptr
7845 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
7847 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
7848 (First_Stored_Discriminant): Remove the mention of Name_uController.
7849 * sem_aux.ads: Comment reformatting.
7850 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
7851 to redecorate an already existing class-wide type.
7852 (Decorate_Tagged_Type): New parameter profile and associated comment.
7853 Create a "shadow class-wide type" for a shadow entity.
7854 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
7855 of the final chain along with the associated comment.
7856 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
7857 Full_Desig and set it to the full view of the designated type.
7858 Initialize the finalization collection to empty.
7859 (Build_Derived_Record_Type): Alphabetize local variables. Code
7861 (Collect_Fixed_Components): Remove the mention of Name_uController.
7862 (Create_Constrained_Components): Remove the mention of Name_uController.
7863 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
7864 class-wide type of a shadow entity.
7865 (Process_Full_View): Update the machinery which marks type
7866 Limited_Controlled's entity as limited.
7867 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
7868 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
7869 list, instead make a collection build-in-place formal.
7870 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
7871 a designated type in order to establish a match between the renaming
7872 and the renamed entity.
7873 (Find_Selected_Component): Add guard to prevent spurious exceptions
7874 from being raised on .NET/JVM.
7875 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
7876 to the list of primitive that need special processing. Update arrays
7877 C_Names and D_Names.
7878 (Replace_Types): Handle class-wide types.
7879 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
7880 different parameter profile, look at the first formal.
7881 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
7882 use clauses for Exp_Util.
7883 * sem_res.adb: Remove with and use clauses for Elists.
7884 (Propagate_Coextensions): Removed.
7885 (Resolve_Allocator): Do not propagate the list of coextensions from one
7886 allocator to another.
7887 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
7888 Deaccessed_T to Desig_Typ.
7889 (Enter_Name): Remove the mention of Name_uController.
7890 (Gather_Components): Remove the mention of Name_uController.
7891 (Incomplete_Or_Private_View): New routine.
7892 (Is_Coextension_Root): Removed.
7893 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
7894 * sem_util.ads (Incomplete_Or_Private_View): New routine.
7895 (Is_Coextension_Root): Removed.
7896 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
7897 Controlled types are now derived from a null tagged record. Remove
7898 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
7899 * sinfo.adb (Coextensions): Removed.
7900 (Set_Coextensions): Removed.
7901 * sinfo.ads: Remove Coextensions from the explanation of node fields
7902 and its uses in nodes.
7903 Update the field usage of N_Allocator.
7904 (Coextensions): Removed along with its pragma Inline.
7905 (Set_Coextensions): Removed along with its pragma Inline.
7906 * snames.ads-tmpl: Remove names
7911 Name_uLocal_Final_List
7912 Name_Finalization_Root
7919 Name_Finalize_Address
7920 * s-pooglo.adb (Allocate): Add overriding indicator.
7921 (Deallocate): Add overriding indicator.
7922 (Storage_Size): Add overriding indicator.
7923 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
7924 than Finalize_Global_List.
7925 (Null_Finalize_Global_List): Removed.
7926 (Save_Library_Occurrence): New routine.
7927 * s-soflin.ads: Remove variable Finalize_Global_List along with its
7928 initialization. Add variable Finalize_Library_Objects along with its
7929 pragma Export. Add variables Library_Exception and
7930 Library_Exception_Set along with their pragma Export.
7931 (Null_Finalize_Global_List): Removed.
7932 (Save_Library_Occurrence): New routine.
7933 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
7934 rather than Finalize_Global_List.
7935 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
7936 of the constructed node.
7938 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7940 * link.c: Include "auto-host.h" before system headers.
7942 2011-08-03 Vincent Celier <celier@adacore.com>
7944 * make.adb (Gnatmake): Add to table Library_Projs only library projects
7945 that are not extended. Do not check if a library project that is
7946 extended should be regenerated. Do not add to table Library_Paths the
7947 libraries that are in extended projects. Link only with libraries that
7948 are in libray projects that are not extended.
7949 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
7950 for a library project that is extended.
7952 2011-08-03 Gary Dismukes <dismukes@adacore.com>
7954 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
7955 conforming subprogram renamings that appear to be completions if they
7956 are not fully conformant.
7957 Such renamings are homographs but not completions.
7958 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
7959 names in a subprogram renaming that appears in an instance.
7961 2011-08-03 Ed Schonberg <schonberg@adacore.com>
7963 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
7964 not immutably limited, build actual subtype from expression to provide
7965 proper bounds to caller.
7967 2011-08-03 Gary Dismukes <dismukes@adacore.com>
7969 * sem_ch8.adb: Minor comment correction.
7971 2011-08-03 Thomas Quinot <quinot@adacore.com>
7973 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
7974 returning a limited array, use an extended return statement.
7976 2011-08-03 Vincent Celier <celier@adacore.com>
7978 * make.adb (Initialize): If --subdirs= is used, but no project file is
7979 specified, attempt to create the specify subdir if it does not already
7980 exist and use it as the object directory as if -D had been specified.
7982 2011-08-03 Arnaud Charlet <charlet@adacore.com>
7984 * s-tpopsp-vms.adb: New file.
7985 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
7986 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
7988 2011-08-03 Emmanuel Briot <briot@adacore.com>
7990 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
7993 2011-08-03 Yannick Moy <moy@adacore.com>
7995 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
7996 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
7997 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
7998 detect that an array has static bounds.
8000 2011-08-03 Thomas Quinot <quinot@adacore.com>
8002 * exp_dist.adb: Minor reformatting.
8004 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8006 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
8007 (ATCB_Key): Removed, not always used.
8009 2011-08-03 Emmanuel Briot <briot@adacore.com>
8011 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
8012 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
8013 most remaining global variables.
8015 2011-08-03 Robert Dewar <dewar@adacore.com>
8017 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
8018 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
8021 2011-08-03 Javier Miranda <miranda@adacore.com>
8023 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
8024 that must be passed by copy in VM targets.
8026 2011-08-03 Emmanuel Briot <briot@adacore.com>
8028 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
8029 duplicates a similar htable now in the project tree.
8031 2011-08-03 Claire Dross <dross@adacore.com>
8033 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
8034 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
8035 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
8036 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
8037 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
8038 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
8039 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
8042 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8044 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
8045 (ATCB_Key): Removed, not always used.
8046 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
8048 * s-tpopsp-tls.adb: New file.
8049 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
8050 x86/x64/ia64/powerpc/sparc Linux.
8052 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8054 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
8055 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
8057 2011-08-03 Thomas Quinot <quinot@adacore.com>
8059 * rtsfind.ads, exp_dist.adb, exp_dist.ads
8060 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
8061 Fix type selection for mapping integer types to PolyORB types.
8063 2011-08-03 Bob Duff <duff@adacore.com>
8065 * sem_ch7.adb: Minor comment clarification.
8067 2011-08-03 Bob Duff <duff@adacore.com>
8069 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
8070 an error analyzing a choice, skip further processing. Further
8071 processing could cause a crash or cascade errors.
8073 2011-08-03 Emmanuel Briot <briot@adacore.com>
8075 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
8076 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
8077 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
8078 prj-env.ads (Shared_Project_Tree_Data): new type
8079 An aggregate project and its aggregated trees need to share the common
8080 data structures used for lists of strings, packages,... This makes the
8081 code simpler since otherwise we have to pass the root tree (also used
8082 for the configuration file data) in addition to the current project
8083 tree. This also avoids ambiguities as to which tree should be used.
8084 And finally this saves a bit of memory.
8085 (For_Every_Project_Imported): new parameter Tree.
8086 Since aggregated projects are using a different tree, we need to let
8087 the caller know which tree to use to manipulate the returned project.
8089 2011-08-03 Robert Dewar <dewar@adacore.com>
8091 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
8092 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
8093 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
8094 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
8096 2011-08-03 Javier Miranda <miranda@adacore.com>
8098 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
8099 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
8101 2011-08-03 Bob Duff <duff@adacore.com>
8103 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
8106 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
8108 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
8109 g-sehash.ads: Fix typo. Update header.
8111 2011-08-03 Thomas Quinot <quinot@adacore.com>
8113 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
8116 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8118 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
8119 prefixes of private types along with records, since the selector may be
8121 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
8122 private types along with records, since the selector may be a
8125 2011-08-03 Emmanuel Briot <briot@adacore.com>
8127 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
8129 2011-08-03 Javier Miranda <miranda@adacore.com>
8131 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
8132 Tagged_Type_Expansion.
8134 2011-08-03 Yannick Moy <moy@adacore.com>
8136 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
8137 violation when the argument of concatenation is the name of a
8140 2011-08-03 Emmanuel Briot <briot@adacore.com>
8142 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
8143 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
8144 (Process_Declarative_Items): new parameter Child_Env.
8146 2011-08-03 Yannick Moy <moy@adacore.com>
8148 * alfa.ads: Update format of ALFA section in ALI file in order to
8149 add a mapping from bodies to specs when both are present.
8150 (ALFA_Scope_Record): Add components for spec file/scope.
8151 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
8153 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
8154 collected, fill in the spec information when relevant.
8155 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
8158 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8160 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
8161 code unit to decide whether to add internally generated subprograms.
8163 2011-08-03 Javier Miranda <miranda@adacore.com>
8165 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
8166 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
8167 be handled by copy in VM targets.
8169 2011-08-03 Emmanuel Briot <briot@adacore.com>
8171 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
8172 code with Makeutl.Get_Switches.
8173 * prj-tree.adb: Update comment.
8175 2011-08-03 Thomas Quinot <quinot@adacore.com>
8177 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
8178 subprogram with a limited formal that does not support external
8181 2011-08-03 Yannick Moy <moy@adacore.com>
8183 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
8185 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
8186 not from current unit in two phases, because it is not possible to
8187 change the table while iterating over its content.
8188 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
8190 2011-08-03 Sergey Rybin <rybin@adacore.com>
8192 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
8193 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
8195 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8197 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
8198 and the component type is composite, this is ambiguous for predefined
8199 concatenation, but if the node is not overloaded and the entity is a use
8200 -defined function its profile can be used to resolve that aggregate.
8202 2011-08-03 Robert Dewar <dewar@adacore.com>
8204 * exp_ch4.adb: Minor code cleanup.
8206 2011-08-03 Thomas Quinot <quinot@adacore.com>
8208 * exp_dist.adb: Do not generate distribution stubs if serious errors
8209 have been diagnosed.
8211 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8213 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
8214 the first formal of a primitive operation, go to the base type to
8215 handle properly an access to a derived type with constrained
8217 * sem_type.adb (Disambiguate): an immediately visible operator hides a
8218 user-defined function that is only use-visible.
8220 2011-08-03 Robert Dewar <dewar@adacore.com>
8222 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
8223 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
8224 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
8225 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
8226 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
8227 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
8228 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
8229 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
8231 2011-08-03 Robert Dewar <dewar@adacore.com>
8233 * repinfo.adb (List_Mechanism): Add handling of
8234 Convention_Ada_Pass_By_XXX.
8235 * sem_mech.adb (Set_Mechanism): Ditto.
8236 * sem_prag.adb (Process_Convention): Add entries for
8237 Convention_Ada_Pass_By_XXX.
8238 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
8240 2011-08-03 Pascal Obry <obry@adacore.com>
8242 * makeutl.adb: Minor reformatting.
8244 2011-08-03 Vincent Celier <celier@adacore.com>
8247 (Get_File_Name) If the file cannot be found when there are no config
8248 pragmas file and May_Fail is True, return No_File instead of the file
8249 name, to be consistent.
8251 2011-08-03 Pascal Obry <obry@adacore.com>
8253 * adaint.c (__gnat_is_executable_file_attr): Avoid access
8256 2011-08-03 Javier Miranda <miranda@adacore.com>
8259 (Same_Representation): In VM targets the representation of arrays with
8260 aliased components differs from arrays with non-aliased components.
8262 2011-08-03 Emmanuel Briot <briot@adacore.com>
8264 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
8265 not systematically lower case attribute indexes that contain no "."
8266 Fix definition of several Naming attributes, which take
8267 a unit name as index and therefore should be case insensitive.
8268 Minor refactoring (reduce length of variable names).
8270 2011-08-03 Emmanuel Briot <briot@adacore.com>
8272 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
8274 2011-08-03 Emmanuel Briot <briot@adacore.com>
8276 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
8277 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
8278 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
8279 prj-tree.ads (Prj.Tree.Environment): new type.
8281 2011-08-03 Emmanuel Briot <briot@adacore.com>
8283 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
8284 prj-tree.adb, prj-tree.ads (Environment): new type.
8286 2011-08-03 Emmanuel Briot <briot@adacore.com>
8288 * prj-tree.ads: Remove unused variable.
8290 2011-08-03 Yannick Moy <moy@adacore.com>
8292 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
8293 issuing messages related to SPARK restriction violation.
8295 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8297 * sem_ch6.adb: guard against error nodes in return statements.
8299 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8301 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
8302 a warning can only appear on a configuration file, so emit warning
8303 without further checks.
8305 2011-08-03 Arnaud Charlet <charlet@adacore.com>
8307 * s-interr.ads: add overriding keyword.
8309 2011-08-03 Geert Bosch <bosch@adacore.com>
8311 * exp_attr.adb: Fix minor typo.
8313 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8315 * par-ch4.adb: improve error recovery.
8317 2011-08-03 Emmanuel Briot <briot@adacore.com>
8319 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
8320 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
8323 2011-08-03 Emmanuel Briot <briot@adacore.com>
8325 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
8326 "external" as an attribute name in aggregate projects.
8328 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8330 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
8331 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
8332 from 0, so we need to adjust.
8334 2011-08-03 Emmanuel Briot <briot@adacore.com>
8336 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
8337 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
8339 2011-08-03 Yannick Moy <moy@adacore.com>
8341 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
8342 restriction on overloaded entity if the entity is not an operator.
8344 2011-08-03 Yannick Moy <moy@adacore.com>
8346 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
8347 restrict.ads: Rename remaining Check_Formal_Restriction* into
8348 Check_SPARK_Restriction*.
8350 2011-08-03 Emmanuel Briot <briot@adacore.com>
8352 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
8353 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
8355 (Project_Empty): removed
8356 (Empty_Project): new parameter Qualifier
8357 This is used to have fields specific to aggregate projects, cleaner
8358 New field to store the list of aggregated projects.
8359 (Check_Aggregate_Project): removed
8360 (Process_Aggregated_Projects, Free): new subprograms.
8362 2011-08-03 Olivier Hainque <hainque@adacore.com>
8364 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
8366 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8368 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
8369 explicit dereference of an unconstrained type, create a constrained
8370 subtype for it, as is done for function calls that return an
8373 2011-08-03 Thomas Quinot <quinot@adacore.com>
8375 * g-pehage.adb (Finalize): Avoid possible double-free.
8377 2011-08-03 Steve Baird <baird@adacore.com>
8379 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
8380 Elab_Spec/Body attrs in CodePeer_Mode.
8382 2011-08-03 Javier Miranda <miranda@adacore.com>
8384 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
8385 low bound is not known at compile time but they have no others choice.
8386 Done because in this case the bounds can be obtained directly from the
8389 2011-08-03 Ed Falis <falis@adacore.com>
8391 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
8392 on VxWorks SMP. Remove unusable constant ANY_CPU.
8394 2011-08-03 Emmanuel Briot <briot@adacore.com>
8396 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
8397 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
8398 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
8399 Prj.Env.Initialize_Empty): new subprograms
8400 (Get_Env, Find_Project): remove parameter Target_Name.
8402 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8404 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
8405 as a condition for the delayed call to Derived_Subprograms done for the
8406 case of the rewriting of a derived type that constrains the
8407 discriminants of its parent type.
8408 Avoids redundant subprogram derivations for private subtype derivations.
8410 2011-08-03 Javier Miranda <miranda@adacore.com>
8412 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
8413 Build_Record_Aggr_Code.
8414 (Build_Record_Aggr_Code): Add missing support to initialize hidden
8415 discriminants in extension aggregates.
8417 2011-08-03 Emmanuel Briot <briot@adacore.com>
8419 * prj-pp.adb (Print): also output project qualifiers, since in
8420 particular "aggregate" is mandatory in an aggregate project.
8422 2011-08-03 Emmanuel Briot <briot@adacore.com>
8424 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
8425 (Debug_Output): new function.
8427 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8429 * gnat_ugn.texi: Document -Wstack-usage.
8430 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
8432 2011-08-03 Thomas Quinot <quinot@adacore.com>
8434 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
8435 have keyword LIMITED.
8437 2011-08-03 Yannick Moy <moy@adacore.com>
8439 * alfa.adb, alfa.ads, alfa_test.adb: New files.
8440 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
8441 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
8442 section (does not happen in compiler, only if code directly calls
8444 * get_alfa.adb, get_alfa.ads: New files.
8445 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
8447 * lib-xref-alfa.adb: New file.
8448 * lib-xref.adb, lib-xref.ads
8449 (Xref_Entry): redefine information needed in cross-references for ALFA.
8450 Push ALFA treatments in separated local package.
8451 (Enclosing_Subpragram_Or_Package): treat specially subprogram
8452 identifiers. Return entity of package body instead of spec. Return
8453 Empty for a scope with no location.
8454 (Generate_Reference): adapt to new components for ALFA information.
8455 Remove the need for D references on definitions.
8456 (Is_Local_Reference): moved to ALFA local package
8457 (Output_References): extract subfunction as Extract_Source_Name
8458 (Output_Local_References): remove procedure, replaced by filtering of
8459 cross-references in package ALFA and printing in Put_ALFA.
8460 (Write_Entity_Name): remove procedure
8461 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
8462 print exact name of entity as it appears in source file
8463 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
8464 * put_alfa.adb, put_alfa.ads: New files.
8465 * xref_lib.adb (Search_Xref): protect read of cross-references against
8466 reading other sections of the ALI file, in gnatxref
8467 (Search): protect read of cross-references against reading other
8468 sections of the ALI file, in gnatfind.
8469 * gcc-interface/Make-lang.in: Update dependencies.
8471 2011-08-03 Thomas Quinot <quinot@adacore.com>
8473 * sem_ch3.adb: Minor reformatting.
8475 2011-08-03 Jose Ruiz <ruiz@adacore.com>
8477 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
8478 raising an exception.
8480 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8482 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
8483 type, always use 1 as the lower bound or string, even if lower bound of
8484 context is not static, to handle properly null strings in a non-static
8487 2011-08-03 Bob Duff <duff@adacore.com>
8489 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
8490 always legal on the right-hand side of an assignment statement; there
8491 is always an applicable index constraint in this case. Therefore, the
8492 check for Pkind = N_Assignment_Statement is now unconditional -- it
8493 doesn't depend on whether Is_Constrained (Typ).
8495 2011-08-03 Robert Dewar <dewar@adacore.com>
8497 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
8499 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8501 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
8502 for an itype created within a generic unit.
8504 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8506 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
8507 suppresses all inlining.
8509 2011-08-03 Robert Dewar <dewar@adacore.com>
8511 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
8512 exp_aggr.adb: Minor reformatting.
8514 2011-08-03 Thomas Quinot <quinot@adacore.com>
8516 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
8517 tagged assignment when discriminant checks are suppressed. This is
8518 useless and extremely costly in terms of static stack usage.
8520 2011-08-03 Bob Duff <duff@adacore.com>
8522 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
8523 of generics, because this leads to the wrong entity in the wrong scope,
8524 causing (e.g.) pragma Export_Procedure to get an error if the entity is
8526 (Process_Interface_Name): Follow Alias for instances of generics, to
8527 correct for the above change.
8529 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8531 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
8532 is an integer literal it is always safe to replace the reference. In
8533 addition, if the reference appears in the generated code for an object
8534 declaration it is necessary to copy because otherwise the reference
8535 might be to the uninitilized value of the discriminant of the object
8538 2011-08-03 Pascal Obry <obry@adacore.com>
8540 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
8541 ACL used, in this case we want to check for ending .exe, not .exe
8542 anywhere in the path.
8544 2011-08-03 Sergey Rybin <rybin@adacore.com>
8546 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
8547 the tree structure (semantic decoration of references to record
8550 2011-08-03 Gary Dismukes <dismukes@adacore.com>
8552 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
8553 choices of a named array aggregate, bail out when any choices are
8554 marked as Errors_Posted.
8556 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8558 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
8559 in which entity is frozen, to handle properly loop variables in
8562 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8564 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
8565 subtype is not static, compute the upper bound using attributes, to
8566 handle properly index types that are not integer types.
8568 2011-08-03 Bob Duff <duff@adacore.com>
8570 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
8571 Update copyright notice.
8573 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8575 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
8576 Original_Discriminant if within an instance.
8577 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
8579 2011-08-03 Thomas Quinot <quinot@adacore.com>
8581 * einfo.ads: Minor reformatting.
8583 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8585 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
8586 composite type with an unfrozen subcomponent, in the profile of a
8587 primitive operation.
8589 2011-08-03 Robert Dewar <dewar@adacore.com>
8591 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
8593 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8595 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
8596 unconstrained type with discriminants is initialized with an aggregate,
8597 use the constrained subtype of the aggregate as the type of the object,
8598 because it is immutable, and this allows the back-end to generate no
8599 code for the object declaration.
8601 2011-08-03 Robert Dewar <dewar@adacore.com>
8603 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
8604 comparison operand is variable, and turns out to be zero or negative.
8606 2011-08-03 Javier Miranda <miranda@adacore.com>
8609 (Expand_Dispatching_Constructor_Call): Disable expansion of
8610 code required for native targets. Done to avoid generating
8611 references to unavailable runtime entities in VM targets.
8613 (Expand_N_Object_Declaration): Add missing support to handle
8614 the explicit initialization of class-wide interface objects.
8617 2011-08-03 Matthew Heaney <heaney@adacore.com>
8619 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
8621 2011-08-03 Matthew Heaney <heaney@adacore.com>
8623 * a-cbdlli.adb (Splice): move source items from first to last
8625 2011-08-03 Yannick Moy <moy@adacore.com>
8627 * sem_util.ads: comment added.
8629 2011-08-03 Javier Miranda <miranda@adacore.com>
8632 (Expand_Record_Aggregate): In VM targets disable the expansion into
8633 assignments of aggregates whose type is not known at compile time.
8635 2011-08-03 Ed Schonberg <schonberg@adacore.com>
8637 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
8638 protected entries and task entries, to build the proper renaming
8639 declaration for entry formals, used in debugging.
8640 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
8641 parameters in the same way.
8643 2011-08-02 Robert Dewar <dewar@adacore.com>
8645 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
8646 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
8647 code reorganization.
8649 2011-08-02 Robert Dewar <dewar@adacore.com>
8651 * debug.adb: Debug flag d.P to suppress length comparison optimization
8652 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
8653 comparison of Length by comparing First/Last instead.
8655 2011-08-02 Matthew Heaney <heaney@adacore.com>
8657 * a-cobove.ads: Code clean up.
8659 2011-08-02 Vincent Celier <celier@adacore.com>
8661 * adaint.c (file_names_case_sensitive_cache): New static int.
8662 (__gnat_get_file_names_case_sensitive): Cache the return value in
8663 file_names_case_sensitive_cache at the first invocation, to avoid
8664 multiple calls to getenv.
8666 2011-08-02 Bob Duff <duff@adacore.com>
8668 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
8670 2011-08-02 Yannick Moy <moy@adacore.com>
8672 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
8673 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
8674 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
8675 indicate that we are in a precondition or postcondition. This is used in
8676 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
8677 decide whether to flag the spec or body of the current subprogram as
8680 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
8682 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
8684 * a-extiin.ads: New file.
8686 2011-08-02 Bob Duff <duff@adacore.com>
8688 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
8689 now raises Name_Error instead of Use_Error in certain cases. The other
8690 parts of this AI were already implemented properly.
8692 2011-08-02 Vincent Celier <celier@adacore.com>
8694 * link.c: Only import "auto-host.h" when building the gnattools.
8696 2011-08-02 Yannick Moy <moy@adacore.com>
8698 * sem_util.adb: Inter-unit inlining does not work for a subprogram
8699 which calls a local subprogram, so extract subprogram
8700 from Mark_Non_ALFA_Subprogram_Body.
8702 2011-08-02 Javier Miranda <miranda@adacore.com>
8705 (Extract_Dispatching_Call): If the type of the dispatching object is an
8706 access type then return an explicit dereference in the Object out-mode
8709 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8711 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
8712 compatibility checks for all indexes of an array subtype, not just the
8713 first. Reset Has_Dynamic_Range_Check on the subtype before each
8714 potential check to ensure that Insert_Range_Checks will not elide any
8715 of the dynamic checks.
8717 2011-08-02 Yannick Moy <moy@adacore.com>
8719 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
8720 SPARK restriction at parsing time.
8721 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
8722 directive only if the SPARK restriction is set for this unit.
8724 2011-08-02 Yannick Moy <moy@adacore.com>
8726 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
8727 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
8728 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
8729 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
8730 Mark_Non_ALFA_Subprogram_Body.
8731 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
8734 2011-08-02 Yannick Moy <moy@adacore.com>
8736 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
8739 2011-08-02 Robert Dewar <dewar@adacore.com>
8741 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
8742 exp_ch3.adb: Minor reformatting.
8744 2011-08-02 Emmanuel Briot <briot@adacore.com>
8746 * adaint.c (__gnat_locate_exec_on_path): only returns executable
8747 files, not any regular file.
8748 (__gnat_locate_file_with_predicate): new subprogram.
8750 2011-08-02 Yannick Moy <moy@adacore.com>
8752 * sinfo.adb, sinfo.ads: Restrict the use of flags
8753 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
8754 nodes, plus N_Subtype_Declaration for the 2nd one.
8756 2011-08-02 Sergey Rybin <rybin@adacore.com>
8758 * gnat_rm.texi: Ramification of pragma Eliminate documentation
8759 - fix bugs in the description of Source_Trace;
8760 - get rid of UNIT_NAME;
8762 2011-08-02 Javier Miranda <miranda@adacore.com>
8765 (Build_Dispatching_Requeue): Adding support for VM targets
8766 since we cannot directly reference the Tag entity.
8767 * exp_sel.adb (Build_K): Adding support for VM targets.
8768 (Build_S_Assignment): Adding support for VM targets.
8770 (Default_Prim_Op_Position): In VM targets do not restrict availability
8771 of predefined interface primitives to compiling in Ada 2005 mode.
8772 (Is_Predefined_Interface_Primitive): In VM targets this service is not
8773 restricted to compiling in Ada 2005 mode.
8774 (Make_VM_TSD): Generate code that declares and initializes the OSD
8775 record. Needed to support dispatching calls through synchronized
8778 (Make_Predefined_Primitive_Specs): Enable generation of predefined
8779 primitives associated with synchronized interfaces.
8780 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
8781 primitives associated with synchronized interfaces.
8783 2011-08-02 Yannick Moy <moy@adacore.com>
8785 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
8786 statements hidden in SPARK if preceded by the HIDE directive
8787 (Parse_Exception_Handlers): mark each exception handler in a sequence of
8788 exception handlers as hidden in SPARK if preceded by the HIDE directive
8789 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
8790 if starting with the HIDE directive
8791 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
8792 starting with the HIDE directive; mark the declarations in a private
8793 part as hidden in SPARK if the private part starts with the HIDE
8795 * restrict.adb, restrict.ads
8796 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
8797 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
8798 argument node belongs to a part which is hidden in SPARK
8799 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
8800 parts in SPARK; protect the possibly costly call to
8801 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
8802 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
8803 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
8804 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
8806 (Scan): recognize special comment starting with '#' and followed by
8807 SPARK keyword "hide" as a HIDE directive.
8809 2011-08-02 Yannick Moy <moy@adacore.com>
8811 * types.ads, erroutc.ads: Minor reformatting.
8813 2011-08-02 Vincent Celier <celier@adacore.com>
8815 * link.c: Add response file support for cross platforms.
8817 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8819 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
8820 in an association, set parent field of copy before partial analysis.
8821 * sem_res.adb (Resolve_Slice): create reference to itype only when
8822 expansion is enabled.
8824 2011-08-02 Yannick Moy <moy@adacore.com>
8826 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
8827 for new flag denoting which subprogram bodies are in ALFA
8828 * restrict.adb, sem_ch7.adb: Update comment
8829 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8830 sem_ch9.adb, sem_res.adb: Add calls to
8831 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
8832 * sem_ch6.adb (Analyze_Function_Return): add calls to
8833 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
8834 middle of the body, and extended return.
8835 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
8836 False when missing return.
8837 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
8838 to True for subprograms whose spec is in ALFA. Remove later on the flag
8839 on the entity used for a subprogram body when there exists a separate
8841 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
8842 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
8843 False, otherwise do nothing.
8845 2011-08-02 Robert Dewar <dewar@adacore.com>
8847 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8849 2011-08-02 Yannick Moy <moy@adacore.com>
8851 * sem_ch4.ads: minor formatting.
8853 2011-08-02 Yannick Moy <moy@adacore.com>
8855 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
8856 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
8857 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
8858 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
8859 opt.ads: cleanup of SPARK mode
8861 2011-08-02 Yannick Moy <moy@adacore.com>
8863 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
8865 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
8866 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
8868 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
8869 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
8870 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
8871 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
8873 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
8875 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
8876 functions whose return type is not in ALFA.
8877 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
8879 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
8880 parameter's type is not in ALFA.
8881 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
8884 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8886 * sem_ch6 (Analyze_Expression_Function): treat the function as
8887 Inline_Always, and introduce a subprogram declaration for it when it is
8889 * inline.adb (Add_Inlined_Body): recognize bodies that come from
8890 expression functions, so that the back-end can determine whether they
8891 can in fact be inlined.
8892 * sem_util.adb (Is_Expression_Function): predicate to determine whether
8893 a function body comes from an expression function.
8895 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8897 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
8898 null exclusions to test Can_Never_Be_Null on the anonymous access types
8899 of the formals rather than testing the formals themselves. Exclude this
8900 check in cases where the Old_Formal is marked as a controlling formal,
8901 to avoid issuing spurious errors for bodies completing dispatching
8902 operations (due to the flag not getting set on controlling access
8903 formals in body specs).
8904 (Find_Corresponding_Spec): When checking full and subtype conformance of
8905 subprogram bodies in instances, pass Designated and E in that order, for
8906 consistency with the expected order of the formals (New_Id followed by
8909 2011-08-02 Robert Dewar <dewar@adacore.com>
8911 * sem_ch8.adb: Minor reformatting.
8913 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8915 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
8916 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
8917 primitive operations of class-wide actuals.
8919 2011-08-02 Javier Miranda <miranda@adacore.com>
8921 * exp_atag.ads, exp_atag.adb
8922 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
8923 since its value is implicitly passed in argument Typ.
8924 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
8925 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
8926 Build_Common_Dispatching_Select_Statements.
8928 2011-08-02 Robert Dewar <dewar@adacore.com>
8930 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
8931 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
8934 2011-08-02 Robert Dewar <dewar@adacore.com>
8936 * sem_res.adb: Minor reformatting.
8937 * sem_prag.adb: Minor reformatting.
8939 2011-08-02 Javier Miranda <miranda@adacore.com>
8941 * exp_atag.adb, exp_atags.ads
8942 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
8943 by the tagged type Entity. Required to use this routine in the VM
8944 targets since we do not have available the Tag entity in the VM
8947 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
8948 Ada.Tags has not been previously loaded.
8950 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
8951 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
8953 (Enclosing_Dynamic_Scope): Add missing support to handle the full
8954 view of enclosing scopes. Required to handle enclosing scopes that
8955 are synchronized types whose full view is a task type.
8957 (Build_VM_TSDs): Minor code improvement to avoid generating and
8958 analyzing lists with empty nodes.
8959 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
8960 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
8961 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
8962 (Make_Disp_Timed_Select_Body): Add support for VM targets.
8963 (Make_Select_Specific_Data_Table): Add support for VM targets.
8964 (Make_VM_TSD): Generate code to initialize the SSD structure of
8967 2011-08-02 Yannick Moy <moy@adacore.com>
8969 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
8970 cross-references section in ALI.
8971 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
8972 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
8974 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
8975 subprogram or package entity of a node
8976 (Is_Local_Reference_Type): new function returns True for references
8977 selected in local cross-references.
8978 (Lt): function extracted from Lt in Output_References
8979 (Write_Entity_Name): function extracted from Output_References
8980 (Generate_Definition): generate reference with type 'D' for definition
8981 of objects (object declaration and parameter specification), with
8982 appropriate locations and units, for use in local cross-references.
8983 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
8984 references of type 'I' for initialization in object definition.
8985 (Output_References): move part of function Lt and procedure
8986 Write_Entity_Name outside of the body. Ignore references of types 'D'
8987 and 'I' introduced for local cross-references.
8988 (Output_Local_References): new procedure to output the local
8989 cross-references sections.
8990 (Lref_Entity_Status): new array defining whether an entity is a local
8991 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
8992 with 'I' type when initialization expression is present.
8993 * get_scos.adb, get_scos.ads: Correct comments and typos
8995 2011-08-02 Javier Miranda <miranda@adacore.com>
8997 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
8999 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9001 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9004 2011-08-02 Vincent Celier <celier@adacore.com>
9006 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9007 (No_Space_Img): New function
9008 (Find_Excluded_Sources): When reading from a file, record the file name
9009 and the line number for each excluded source.
9010 (Mark_Excluded_Sources): When reporting an error, if the excluded
9011 sources were read from a file, include file name and line number in
9014 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9016 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9018 2011-08-02 Robert Dewar <dewar@adacore.com>
9020 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9022 2011-08-02 Javier Miranda <miranda@adacore.com>
9024 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9025 generation of TSDs to the DOTNET compiler.
9026 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9027 generation of TSDs to the DOTNET compiler.
9029 2011-08-02 Javier Miranda <miranda@adacore.com>
9031 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9032 record of all the tagged types declared inside library level package
9033 declarations, library level package bodies or library level subprograms.
9034 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9035 associated with a given tagged type.
9036 (Build_VM_TSDs): New subprogram.
9037 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9038 compilation units that are subprograms.
9039 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9040 compilation units that are package bodies.
9041 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9042 units that are a package declaration or a package instantiation.
9043 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9044 reorganization to improve the error generated by the frontend when the
9045 function Ada.Tags.Secondary_Tag is not available.
9046 * rtsfind.ads (RE_Register_TSD): New runtime entity.
9047 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9049 2011-08-02 Javier Miranda <miranda@adacore.com>
9051 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9053 2011-08-02 Robert Dewar <dewar@adacore.com>
9055 * s-imenne.ads: Minor reformatting.
9057 2011-08-02 Robert Dewar <dewar@adacore.com>
9059 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9060 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9061 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9063 2011-08-02 Robert Dewar <dewar@adacore.com>
9065 * einfo.ads (Materialize_Entity): Document this is only for renamings
9066 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
9067 required debug information in the case where we transform the object
9068 declaration into a renaming declaration.
9069 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
9071 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
9074 2011-08-02 Robert Dewar <dewar@adacore.com>
9076 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
9077 Suppress_Init_Procs.
9078 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
9079 Suppress_Initialization/Initialization_Suppressed.
9080 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9081 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9082 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9083 * sem_prag.adb: New processing for pragma Suppress_Initialization.
9085 2011-08-02 Robert Dewar <dewar@adacore.com>
9087 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9090 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9092 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9093 only have inheritable classwide pre/postconditions.
9095 2011-08-02 Javier Miranda <miranda@adacore.com>
9097 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9098 * rtsfind.ads (RE_Check_TSD): New runtime entity.
9099 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9100 checks if the external tag of a type is the same as the external tag
9101 of some other declaration.
9103 2011-08-02 Thomas Quinot <quinot@adacore.com>
9105 * s-taskin.ads: Minor reformatting.
9107 2011-08-02 Emmanuel Briot <briot@adacore.com>
9109 * g-comlin.adb (Display_Help): swap the order in which it prints the
9110 short help and the general usage.
9112 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9114 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9115 the aspect declarations and attach them to the generic copy for
9116 subsequent analysis.
9117 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9118 declarations of the generic tree to the new subprogram declarations.
9119 * sem_attr.adb (Check_Precondition_Postcondition): recognize
9120 conditions that apply to a subprogram instance.
9122 2011-08-02 Robert Dewar <dewar@adacore.com>
9124 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9126 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9128 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9129 private type with a tagged full view is not derived in the immediate
9130 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9132 2011-08-02 Robert Dewar <dewar@adacore.com>
9134 * exp_ch4.adb: Minor reformatting.
9136 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9138 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
9139 Ada2012 iterator, the loop will be rewritten during expansion into a
9140 while loop with a cursor and an element declaration. Do not analyze the
9141 body in this case, because if the container is for indefinite types the
9142 actual subtype of the elements will only be determined when the cursor
9143 declaration is analyzed.
9145 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9147 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9148 size/alignment related attributes in CodePeer_Mode.
9150 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9152 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
9153 Prepend_Element, since this can result in the operation getting the
9154 wrong slot in the full type's dispatch table if the full type has
9155 inherited operations. The incomplete type's operation will get added
9156 to the proper position in the full type's primitives
9157 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
9158 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
9159 dispatching operations, since there are cases where nonprimitive
9160 subprograms can get added to the list of incomplete dependents (such
9161 as subprograms in nested packages).
9162 * sem_ch6.adb (Process_Formals): First, remove test for being in a
9163 private part when determining whether to add a primitive with a
9164 parameter of a tagged incomplete type to the Private_Dependents list.
9165 Such primitives can also occur in the visible part, and should not have
9166 been excluded from being private dependents.
9167 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
9168 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
9169 list of a Taft-amendment incomplete type is a primitive before issuing
9170 an error that the full type must appear in the same unit. There are
9171 cases where nonprimitives can be in the list (such as subprograms in
9173 * sem_disp.adb (Derives_From): Use correct condition for checking that
9174 a formal's type is derived from the type of the corresponding formal in
9175 the parent subprogram (the condition was completely wrong). Add
9176 checking that was missing for controlling result types being derived
9177 from the result type of the parent operation.
9179 2011-08-02 Yannick Moy <moy@adacore.com>
9181 * errout.adb (First_Node): minor renaming
9182 * restrict.adb (Check_Formal_Restriction): put restriction warning on
9185 2011-08-02 Yannick Moy <moy@adacore.com>
9187 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
9188 before accessing operands.
9189 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
9190 decide whether an initialization expression respects SPARK rules, as
9191 the plain node is the expanded one. This allows for more valid warnings
9193 * gnat_rm.texi: Minor update.
9195 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9197 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
9200 2011-08-02 Robert Dewar <dewar@adacore.com>
9202 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
9204 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9206 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
9207 loop statements and the element renaming declaration with a block when
9208 the element type is controlled.
9210 2011-08-02 Yannick Moy <moy@adacore.com>
9212 * sinfo.ads: Minor formatting.
9214 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9216 * sem_aggr.adb (Add_Association): if the association has a box and no
9217 expression, use the Sloc of the aggregate itself for the new
9219 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
9222 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9224 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
9225 When a container is provided via a function call, generate a renaming
9226 of the function result. This avoids the creation of a transient scope
9227 and the premature finalization of the container.
9228 * exp_ch7.adb (Is_Container_Cursor): Removed.
9229 (Wrap_Transient_Declaration): Remove the supression of the finalization
9230 of the list controller when the declaration denotes a container cursor,
9233 2011-08-02 Yannick Moy <moy@adacore.com>
9235 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
9236 node is from source, instead of the original node being from source.
9238 (Resolve_Array_Aggregate): refine the check for a static expression, to
9239 recognize also static ranges
9240 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9241 Array_Type_Declaration): postpone the test for the type being a subtype
9242 mark after the type has been resolved, so that component-selection and
9243 expanded-name are discriminated.
9244 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9245 to distinguish the case of an iteration scheme, so that an error is
9246 issed on a non-static range in SPARK except in an iteration scheme.
9247 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9248 In_Iter_Schm = True.
9249 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9250 user-defined operators so that they are allowed in renaming
9252 (Find_Selected_Component): refine the check for prefixing of operators
9253 so that they are allowed in renaming. Move the checks for restrictions
9254 on selector name after analysis discriminated between
9255 component-selection and expanded-name.
9256 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9257 concatenation argument of string type if it is static.
9258 * sem_util.adb, sem_util.ads
9259 (Check_Later_Vs_Basic_Declarations): add a new function
9260 Is_Later_Declarative_Item to decice which declarations are allowed as
9261 later items, in the two different modes Ada 83 and SPARK. In the SPARK
9262 mode, add that renamings are considered as later items.
9263 (Enclosing_Package): new function to return the enclosing package
9264 (Enter_Name): correct the rule for homonyms in SPARK
9265 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9266 from source (result of expansion) to avoid issuing wrong warnings.
9268 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9270 * errout.adb: On anything but an expression First_Node returns its
9273 2011-08-02 Pascal Obry <obry@adacore.com>
9275 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9277 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9279 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9280 Set the associated loop as the related expression of internally
9282 * exp_ch7.adb (Is_Container_Cursor): New routine.
9283 (Wrap_Transient_Declaration): Supress the finalization of the list
9284 controller when the declaration denotes a container cursor.
9286 2011-08-02 Yannick Moy <moy@adacore.com>
9288 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9290 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9291 expression is a simple expression. This check cannot be performed in
9292 the semantics, so just drop it.
9293 (P_Index_Or_Discriminant_Constraint): move check that the index or
9294 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9295 semantics. Other cases were previously checked in the semantics.
9296 * par-ch4.adb (P_Name): move checks that a selector name is not
9297 character literal or an operator symbol to Find_Selected_Component in
9299 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9300 declarations are not placed after later declarations in a separate
9301 procedure in Sem_Util (possibly not the best choice?), to be used both
9302 during parsing, for Ada 83 mode, and during semantic analysis, for
9304 * par-endh.adb (Check_End): move check that end label is not missing
9305 to Process_End_Label in the semantics
9306 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
9307 the special case for SPARK restriction
9308 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
9309 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
9310 parameter Force to issue the error message even on internal node (used
9311 for generated end label). Call Check_Restriction to check when an error
9312 must be issued. In SPARK mode, issue an error message even if the
9313 restriction is not set.
9314 (Check_Restriction): new procedure with an additional out parameter to
9315 inform the caller that a message has been issued
9316 * sem_aggr.adb: Minor modification of message
9317 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
9318 instead of issuing an error message directly
9319 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
9320 declarations are not placed after later declarations, by calling
9321 Check_Later_Vs_Basic_Declarations
9322 (Analyze_Subtype_Declaration): move here the check that an index or
9323 discriminant constraint must be a subtype mark. Change the check that
9324 a subtype of String must start at one so that it works on subtype marks.
9325 * sem_ch4.adb (Analyze_Call): move here the check that a named
9326 association cannot follow a positional one in a call
9327 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9328 instead of issuing an error message directly
9329 * sem_ch8.adb (Find_Selected_Component): move here the check that a
9330 selector name is not a character literal or an operator symbol. Move
9331 here the check that the prefix of an expanded name cannot be a
9332 subprogram or a loop statement.
9333 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9334 procedure called from parsing and semantics to check that basic
9335 declarations are not placed after later declarations
9336 (Process_End_Label): move here the check that end label is not missing
9338 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9340 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9341 representation clause in codepeer mode, since it confuses CodePeer and
9342 does not bring useful info.
9344 2011-08-02 Ed Falis <falis@adacore.com>
9346 * init.c: initialize fp hw on MILS.
9348 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9350 * errout.adb (First_Node): for bodies, return the node itself (small
9351 optimization). For other nodes, do not check source_unit if the node
9352 comes from Standard.
9354 2011-08-02 Robert Dewar <dewar@adacore.com>
9356 * exp_ch3.adb: Minor comment additions.
9357 * sem_ch13.adb: Minor reformatting.
9359 2011-08-02 Pascal Obry <obry@adacore.com>
9361 * make.adb, makeutl.adb: Removes some superfluous directory separator.
9363 2011-08-02 Robert Dewar <dewar@adacore.com>
9365 * sem_attr.adb: Minor reformatting.
9367 2011-08-02 Robert Dewar <dewar@adacore.com>
9369 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
9370 (Has_Default_Component_Value): Removed
9371 * einfo.ads Comment updates
9372 (Has_Default_Aspect): Replaces Has_Default_Value
9373 (Has_Default_Component_Value): Removed
9375 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
9377 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
9378 (Get_Simple_Init_Val): Handle Default_Value aspect
9379 (Needs_Simple_Initialization): Handle Default_Value aspect
9380 * exp_ch3.ads: Needs_Simple_Initialization
9381 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
9382 * par-prag.adb (Pragma_Default[_Component]Value) Removed
9384 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
9385 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
9386 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
9388 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9390 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
9391 package containing iteration primitives.
9392 exp_ch5.adb (Expand_Iterator_Loop): ditto.
9394 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9396 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
9397 "of", pre-analyze expression in case it is a function call with
9398 finalization actions that must be placed ahead of the loop.
9399 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
9400 on an Ada2012 iterator, insert them ahead of the rewritten loop.
9402 2011-08-02 Geert Bosch <bosch@adacore.com>
9404 * cstand.adb (Create_Float_Types): Only consider C's long double for
9405 Long_Long_Float, in addition to double.
9407 2011-08-02 Robert Dewar <dewar@adacore.com>
9409 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
9410 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
9411 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
9414 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9416 * sem_attr.adb: handle properly 'Result when it is a prefix of an
9419 2011-08-02 Javier Miranda <miranda@adacore.com>
9421 * einfo.ads, einfo.adb
9422 (Original_Access_Type): Move this attribute to Node26 since there was
9423 an undocumented use of Node21 in E_Access_Subprogram_Type entities
9424 which causes conflicts and breaks the generation of the .NET compiler.
9425 (Interface_Name): Add missing documentation on JGNAT only uses of
9428 2011-08-02 Geert Bosch <bosch@adacore.com>
9430 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
9431 (Find_Back_End_Float_Type): Likewise
9432 (Create_Back_End_Float_Types): Likewise
9433 (Create_Float_Types): Likewise
9434 (Register_Float_Type): Likewise
9435 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
9436 Nlist and split out type selection in new local Find_Base_Type function.
9437 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
9439 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
9441 2011-08-02 Robert Dewar <dewar@adacore.com>
9443 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
9445 * opt.ads: Minor comment change.
9446 * sem_ch12.adb: Minor code reorganization.
9448 2011-08-02 Gary Dismukes <dismukes@adacore.com>
9450 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
9451 subtype's list of rep items to the list on the full subtype in the case
9452 where the lists are the same.
9454 2011-08-02 Geert Bosch <bosch@adacore.com>
9456 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
9457 using the one from System.Strings, which also deallocates all strings.
9459 2011-08-02 Geert Bosch <bosch@adacore.com>
9461 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
9463 * gcc-interface/Make-lang.in: Update dependencies.
9465 2011-08-02 Olivier Hainque <hainque@adacore.com>
9467 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
9470 2011-08-02 Javier Miranda <miranda@adacore.com>
9472 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
9473 associated with anonymous access to subprograms.
9475 2011-08-02 Geert Bosch <bosch@adacore.com>
9478 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
9479 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
9480 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
9481 (Add_Symbol_Definition): Move to switch-c.adb
9482 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
9483 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
9484 (Add_Symbol_Definition): Move to switch-c.adb.
9485 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
9487 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9489 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
9490 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
9492 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
9493 (Add_Symbol_Definition): Moved from Prepcomp.
9494 * switch-c.ads: Update copyright notice. Use String_List instead of
9495 Argument_List, removing dependency on System.OS_Lib.
9497 2011-08-02 Yannick Moy <moy@adacore.com>
9499 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
9500 mode on initialization expression which does not respect SPARK
9502 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
9503 if the tree referenced by its argument represents an initialization
9504 expression in SPARK, suitable for initializing an object in an object
9507 2011-08-02 Javier Miranda <miranda@adacore.com>
9509 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
9510 internally generated access to subprogram with its associated protected
9512 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
9514 2011-08-02 Geert Bosch <bosch@adacore.com>
9516 * cstand.adb (Register_Float_Type): Print information about type to
9517 register, if the Debug_Flag_Dot_B is set.
9518 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
9519 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
9520 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
9521 with a requested precision of more than Max_Digits digits and no more
9522 than Max_Base_Digits digits, if a range specification is present and the
9523 Predefined_Float_Types list has a suitable type to derive from.
9524 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
9525 case of type completion with pragma Import
9527 (Process_Import_Predefined_Type): Processing to complete a type
9528 with pragma Import. Currently supports floating point types only.
9529 (Set_Convention_From_Pragma): Do nothing without underlying type.
9530 (Process_Convention): Guard against absence of underlying type,
9531 which may happen when importing incomplete types.
9532 (Process_Import_Or_Interface): Handle case of importing predefined
9533 types. Tweak error message.
9535 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9537 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
9538 functions to previous change. Reorganize code slightly.
9540 2011-08-02 Geert Bosch <bosch@adacore.com>
9542 * back_end.ads (Register_Type_Proc): New call back procedure type for
9543 allowing the back end to provide information about available types.
9544 (Register_Back_End_Types): New procedure to register back end types.
9545 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
9547 * cstand.adb (Back_End_Float_Types): New list for floating point types
9548 supported by the back end.
9549 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
9550 (Copy_Float_Type): New procedure to make new copies of predefined types.
9551 (Register_Float_Type): New call back procedure to populate the BEFT list
9552 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
9553 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
9554 (Create_Float_Types): New procedure to create entities for floating
9555 point types predefined in Standard, and put these and any remaining
9556 BEFTs on the Predefined_Float_Types list.
9557 * stand.ads (Predefined_Float_Types): New list for predefined floating
9558 point types that do not have declarations in package Standard.
9560 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9562 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
9563 entity node for the unit containing the parameter.
9564 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
9565 (Add_Inlined_Subprogram): Likewise.
9566 * gcc-interface/Make-lang.in: Update dependencies.
9568 2011-08-02 Thomas Quinot <quinot@adacore.com>
9570 * s-stusta.adb (Print): Make sure Pos is always initialized to a
9573 2011-08-02 Geert Bosch <bosch@adacore.com>
9575 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
9577 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9579 * sem_type.adb (Covers): Move trivial case to the top and reuse the
9580 computed value of Base_Type.
9582 2011-08-02 Yannick Moy <moy@adacore.com>
9584 * restrict.adb (Check_Restriction): issue an error for any use of
9585 class-wide, even if the No_Dispatch restriction is not set.
9586 * sem_aggr.adb: Correct typos in comments and messages in formal mode
9587 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
9588 when completing a private extension, the type named in the private part
9589 is not the same as that named in the visible part.
9590 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
9591 of an inherited primitive operations of a tagged type or type extension
9592 that returns the tagged type.
9593 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
9594 function which returns True for an implicit operation inherited by the
9595 derived type declaration for the argument type.
9596 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
9599 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9601 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
9602 Process_Bounds, to perform analysis with expansion of a range or an
9603 expression that is the iteration scheme for a loop.
9604 (Analyze_Iterator_Specification): If domain of iteration is given by a
9605 function call with a controlled result, as is the case if call returns
9606 a predefined container, ensure that finalization actions are properly
9608 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
9610 2011-08-02 Javier Miranda <miranda@adacore.com>
9612 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
9613 * gcc-interface/Make-lang.in: Update dependencies.
9615 2011-08-02 Javier Miranda <miranda@adacore.com>
9617 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
9618 determine if the analysis is performed using N or Original_Node (N).
9619 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
9620 functionality of routine Is_Variable avoids code duplication.
9621 * checks.adb (Determine_Range): Handle temporaries generated by
9622 Remove_Side_Effects.
9624 2011-08-02 Javier Miranda <miranda@adacore.com>
9626 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
9627 expansion of the condition. Required since the previous analysis was
9628 done with expansion disabled (see Resolve_Quantified_Expression) and
9629 hence checks were not inserted and record comparisons have not been
9632 2011-08-02 Ed Falis <falis@adacore.com>
9634 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
9637 2011-08-02 Bob Duff <duff@adacore.com>
9639 * opt.ads: Minor comment fix.
9641 2011-08-02 Bob Duff <duff@adacore.com>
9643 * sem_ch12.adb (Analyze_Package_Instantiation,
9644 Analyze_Subprogram_Instantiation): Turn off style checking while
9645 analyzing an instance. Whatever style checks that apply to the generic
9646 unit should apply, so it makes no sense to apply them in an instance.
9647 This was causing trouble when compiling an instance of a runtime
9648 unit that violates the -gnatyO switch.
9649 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
9650 one of the two case statements, causing spurious errors.
9652 2011-08-02 Robert Dewar <dewar@adacore.com>
9654 * uname.adb: Minor reformatting.
9655 * gnatcmd.adb: Minor reformatting.
9656 * exp_attr.adb: Minor reformatting.
9658 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9660 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
9661 No_Dispatching_Calls, do not look for the Assign primitive, because
9662 predefined primitives are not created in this case.
9664 2011-08-02 Bob Duff <duff@adacore.com>
9666 * stylesw.ads: Minor comment fixes.
9668 2011-08-02 Robert Dewar <dewar@adacore.com>
9670 * freeze.adb (Add_To_Result): New procedure.
9672 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9674 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
9675 time, if the specific run-time routines for handling streams of strings
9676 are not available, use the default mechanism.
9678 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9680 * s-regpat.ads: Fix typo.
9682 2011-08-02 Vincent Celier <celier@adacore.com>
9684 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
9685 not null, call it to create the in memory config project file without
9686 parsing an existing default config project file.
9688 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9690 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
9692 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9694 * sem_elim.adb: an abstract subprogram does not need an eliminate
9695 pragma for its descendant to be eliminable.
9697 2011-08-02 Ed Falis <falis@adacore.com>
9699 * init.c: revert to handling before previous checkin for VxWorks
9700 * s-intman-vxworks.adb: delete unnecessary declarations related to
9701 using Ada interrupt facilities for handling signals.
9702 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
9703 * s-intman-vxworks.ads: Import __gnat_install_handler as
9704 Initialize_Interrupts.
9705 * s-taprop-vxworks.adb: Delete Signal_Mask.
9706 (Abort_Handler): change construction of mask to unblock exception
9709 2011-08-02 Jerome Guitton <guitton@adacore.com>
9711 * a-except-2005.adb (Raise_From_Signal_Handler): Call
9712 Debug_Raise_Exception before propagation starts.
9714 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9716 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
9717 to Restriction_Check_Required.
9718 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
9719 * sem_res.adb (Resolve_Call): Likewise.
9720 * sem_attr.adb (Check_Stream_Attribute): Likewise.
9722 2011-08-02 Bob Duff <duff@adacore.com>
9724 * stylesw.ads: Update comment.
9725 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
9726 * errout.ads: Remove obsolete comment.
9728 2011-08-02 Javier Miranda <miranda@adacore.com>
9730 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
9731 (Set_Is_Safe_To_Reevaluate): new procedure.
9732 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
9733 assignment is allowed on safe-to-reevaluate variables.
9734 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
9735 temporary created to remove side effects in expressions that use
9736 the secondary stack as safe-to-reevaluate.
9737 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
9738 variables that are not true constants.
9740 2011-08-02 Robert Dewar <dewar@adacore.com>
9742 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
9743 sem_res.adb, sem_ch6.adb: Minor reformatting.
9745 2011-08-02 Jerome Guitton <guitton@adacore.com>
9747 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
9749 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9751 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
9752 not set Overridden_Operation if subprogram is an initialization
9755 2011-08-02 Yannick Moy <moy@adacore.com>
9757 * par-ch6.adb: Correct obsolete name in comments
9758 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
9759 which takes two message arguments (existing function takes one), with
9760 second message used for continuation.
9761 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
9762 block statements that originate from a source block statement, not
9763 generated block statements
9764 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
9765 symmetry with procedure case
9766 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
9767 function to issue an error in formal mode if a package specification
9768 contains more than one tagged type or type extension.
9769 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
9770 parameters matching formals of tagged types are objects (or ancestor
9771 type conversions of objects), not general expressions. Issue an error
9772 on view conversions that are not involving ancestor conversion of an
9774 (Resolve_Type_Conversion): in formal mode, issue an error on the
9775 operand of an ancestor type conversion which is not an object
9776 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
9777 procedure so that it works also for actuals of function calls
9778 (Is_Actual_Tagged_Parameter): new function which determines if its
9779 argument is an actual parameter of a formal of tagged type in a
9781 (Is_SPARK_Object_Reference): new function which determines if the tree
9782 referenced by its argument represents an object in SPARK
9784 2011-08-02 Robert Dewar <dewar@adacore.com>
9786 * sem_ch3.adb: Minor reformatting
9787 Minor comment addition
9788 Minor error msg text change
9790 2011-08-02 Javier Miranda <miranda@adacore.com>
9792 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
9793 function. Used to be more precise when we generate a variable plus one
9794 assignment to remove side effects in the evaluation of the Bound
9796 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
9797 of the bound expression to force its re-analysis and thus expand the
9798 associated transient scope (if required). Code cleanup replacing the
9799 previous code that declared the constant entity by an invocation to
9800 routine Force_Evaluation which centralizes this work in the frontend.
9802 2011-08-02 Robert Dewar <dewar@adacore.com>
9804 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
9805 (Base_Type): Now uses improved Is_Base_Type function
9806 * einfo.ads (Base_Type): Inline this function
9808 2011-08-02 Robert Dewar <dewar@adacore.com>
9810 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
9811 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
9813 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9815 * gcc-interface/Make-lang.in: Update dependencies.
9816 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
9819 2011-08-02 Yannick Moy <moy@adacore.com>
9821 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
9822 non-simple expression used in delta constraint
9823 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
9824 index constraint which is not a subtype mark
9825 * par.adb: With and use Restrict
9826 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
9827 mode on component type which is not a subtype mark and default
9828 expression on component
9829 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
9830 of string which does not have a lower index bound equal to 1
9831 (Array_Type_Declaration): issue an error in formal mode on index or
9832 component type which is not a subtype mark, and on aliased keyword on
9834 (Derived_Type_Declaration): issue an error in formal mode on interface,
9835 limited or abstract type
9836 (Record_Type_Declaration): issue an error in formal mode on interface
9837 (Record_Type_Definition): issue an error in formal mode on tagged types
9838 and type extensions not declared in the specification of a library unit
9839 package; on null non-tagged record; on variant part
9841 2011-08-02 Vincent Celier <celier@adacore.com>
9843 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
9844 not declared for qualified library project when Library_Name is not
9845 declared, but Library_Dir is.
9847 2011-08-02 Robert Dewar <dewar@adacore.com>
9849 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
9850 pragmas (affects aspects [Component_]Default_Value
9851 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
9852 component type for the resolution
9854 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
9856 * einfo.adb (Base_Type): Tune implementation for speed.
9858 2011-08-02 Robert Dewar <dewar@adacore.com>
9860 * freeze.adb: Minor reformatting.
9862 2011-08-02 Thomas Quinot <quinot@adacore.com>
9864 * scos.ads: Update comments.
9866 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9868 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
9869 base type, because the parent may be a subtype of a private type whose
9870 convention is established in a private part.
9872 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9874 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
9875 statement in a block when the expansion of the return expression has
9876 created a finalization chain.
9877 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
9878 with the parent node.
9879 Add N_Extended_Return_Statement to handle the case where a transient
9880 object declaration appears in the Return_Object_Declarations list of
9881 an extended return statement.
9883 2011-08-02 Matthew Gingell <gingell@adacore.com>
9885 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
9886 unused parameter 'name'.
9888 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9890 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
9891 inherited operation, check whether its alias, which is the source
9892 operastion that it renames, has been marked eliminated.
9894 2011-08-02 Javier Miranda <miranda@adacore.com>
9896 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
9897 in-mode parameter whose type is an access type since it can be used to
9898 modify its designated object. Enforce code that handles as safe an
9899 access type that is not access-to-constant but it is the result of a
9900 previous removal of side-effects.
9901 (Remove_Side_Effects): Minor code reorganization of cases which require
9902 no action. Done to incorporate documentation on new cases uncovered
9903 working in this ticket: no action needed if this routine was invoked
9904 too early and the nodes are not yet decorated.
9905 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
9906 to routine Remove_Side_Effects by calls to Force_Evaluation since they
9907 were issued with actuals that are implicitly provided by
9910 2011-08-02 Robert Dewar <dewar@adacore.com>
9912 * sem_ch3.adb, sem_res.adb: Minor reformatting.
9914 2011-08-02 Yannick Moy <moy@adacore.com>
9916 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
9917 to issue an error in formal mode on attribute not supported in this mode
9918 (Analyze_Attribute): issue errors on standard attributes not supported
9920 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
9921 comment, and issue error in formal mode on modulus which is not a power
9923 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
9925 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
9927 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
9928 operator on modular type (except 'not').
9930 2011-08-02 Robert Dewar <dewar@adacore.com>
9932 * gnat_rm.texi: Minor reformatting.
9934 2011-08-02 Arnaud Charlet <charlet@adacore.com>
9936 * s-osinte-linux.ads: Minor comment update and reformatting.
9937 * i-cexten.ads: Make this unit pure, as for its parent.
9938 Will allow its usage in more contexts if needed.
9940 2011-08-02 Robert Dewar <dewar@adacore.com>
9942 * s-utf_32.ads: Minor comment fix.
9944 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9946 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
9947 operation of a tagged synchronized type, handle the case where the
9948 controlling argument is overloaded.
9950 2011-08-02 Yannick Moy <moy@adacore.com>
9952 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
9953 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
9954 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
9955 SPARK mode and formal verification mode on processing SPARK restriction
9956 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
9957 requiring consistency checking.
9959 2011-08-02 Robert Dewar <dewar@adacore.com>
9961 * sem_res.adb: Minor reformatting.
9963 2011-08-02 Robert Dewar <dewar@adacore.com>
9965 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9966 a-cforse.ads: Remove unneeded with of Ada.Containers
9967 Remove commented out pragma Inline's
9968 Move specifications of new subprograms to the actual specs
9970 2011-08-02 Yannick Moy <moy@adacore.com>
9972 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9973 a-cforse.ads: Update comments.
9975 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9977 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
9979 2011-08-02 Robert Dewar <dewar@adacore.com>
9981 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9982 a-cforse.ads, a-cofove.ads: Minor reformatting.
9984 2011-08-02 Claire Dross <dross@adacore.com>
9986 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9987 a-cofove.ads: Add comments.
9989 2011-08-02 Yannick Moy <moy@adacore.com>
9991 * gnat_rm.texi: Document formal containers.
9993 2011-08-02 Emmanuel Briot <briot@adacore.com>
9995 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
9998 2011-08-02 Robert Dewar <dewar@adacore.com>
10000 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10003 2011-08-02 Robert Dewar <dewar@adacore.com>
10005 * aspects.adb: New aspects Default_Value and Default_Component_Value
10006 New format of Aspect_Names table checks for omitted entries
10007 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10008 handling of boolean aspects for derived types.
10009 New aspects Default_Value and Default_Component_Value
10010 New format of Aspect_Names table checks for omitted entries
10011 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10012 (Has_Default_Value): New flag
10013 (Has_Default_Component_Value): New flag
10014 (Has_Default_Value): New flag
10015 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10017 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10018 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10019 Default_Value and Default_Component_Value
10020 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10021 New aspects Default_Value and Default_Component_Value
10022 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10023 * sprint.adb: Print N_Aspect_Specification node when called from gdb
10025 2011-08-02 Vincent Celier <celier@adacore.com>
10027 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10028 inherit library kind.
10030 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10032 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10033 Minor reformatting.
10035 2011-08-02 Robert Dewar <dewar@adacore.com>
10037 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10039 2011-08-02 Yannick Moy <moy@adacore.com>
10041 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10043 2011-08-02 Robert Dewar <dewar@adacore.com>
10045 * impunit.adb: Add comment.
10047 2011-08-02 Yannick Moy <moy@adacore.com>
10049 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10050 qualification of aggregates in formal mode
10051 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10053 (Resolve_Aggregate): complete the test that an aggregate is adequately
10054 qualified in formal mode
10056 2011-08-02 Pascal Obry <obry@adacore.com>
10058 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10059 * mlib-prj.adb: Supress warning when compiling binder generated file.
10060 (Build_Library): Supress all warnings when compiling the binder
10063 2011-08-02 Yannick Moy <moy@adacore.com>
10065 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
10067 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
10068 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
10069 Add with/use clauses to make Check_Formal_Restriction visible
10071 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10073 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
10074 in-parameters when type of the generic formal is private in the generic
10075 spec and non-private in the body.
10077 2011-08-02 Claire Dross <dross@adacore.com>
10079 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
10080 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10081 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10082 * impunit.adb, Makefile.rtl: Take new files into account.
10084 2011-08-02 Robert Dewar <dewar@adacore.com>
10086 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10087 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10089 2011-08-02 Yannick Moy <moy@adacore.com>
10091 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10093 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10094 matching static array bounds, taking into account the special case of
10096 * sem_ch3.adb: Typo in comment.
10098 2011-08-02 Yannick Moy <moy@adacore.com>
10100 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10101 which issues an error in formal mode if its argument node is originally
10103 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10104 has a discriminant specification so that it does not include the case
10106 (Derived_Type_Declaration): move here the test that a derived type has a
10107 discriminant specification
10108 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10109 first element of a component association before accessing its choices
10110 (presence of component association is not enough)
10111 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10112 declaration is a library item before accessing the next element in a
10113 list, as library items are not member of lists
10114 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10115 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10116 Check_Formal_Restriction whenever possible.
10118 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10120 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10121 reference when needed.
10123 2011-08-02 Bob Duff <duff@adacore.com>
10125 * gnat_ugn.texi: Fix typo.
10127 2011-08-02 Vincent Celier <celier@adacore.com>
10129 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10130 archive file name. Do not use the full path name of archives for Open
10133 2011-08-02 Robert Dewar <dewar@adacore.com>
10135 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10136 Analyze_Aspect_Specifications
10138 (Analyze_Aspect_Specifications): New handling for boolean aspects
10139 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10140 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10141 sequence for Analyze_Aspect_Specifications
10142 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10143 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10145 2011-08-02 Robert Dewar <dewar@adacore.com>
10147 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10148 aspects, since these no longer exist.
10150 2011-08-02 Robert Dewar <dewar@adacore.com>
10152 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
10153 semicolon, do not try to see if there are aspects following it.
10154 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
10157 2011-08-02 Robert Dewar <dewar@adacore.com>
10159 * sem_ch8.adb, aspects.ads: Minor reformatting.
10161 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10163 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
10164 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
10166 (Analyze_Aspect_Specifications): ...here. Call above procedure.
10168 2011-08-02 Yannick Moy <moy@adacore.com>
10170 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
10171 mode on subprogram declaration outside of package specification, unless
10172 it is followed by a pragma Import
10173 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
10174 Access_Type_Declaration): issue error in formal mode on access type
10175 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
10177 (Analyze_Object_Declaration): issue error in formal mode on object
10178 declaration which does not respect SPARK restrictions
10179 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
10180 declaration which does not respect SPARK restrictions
10181 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
10182 error in formal mode on digits or delta constraint
10183 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
10184 decimal fixed point type
10185 (Derived_Type_Declaration): issue error in formal mode on derived type
10186 other than type extensions of tagged record types
10187 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
10188 with check on access definition
10189 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
10190 mode on protected definition.
10191 (Analyze_Task_Definition): issue error in formal mode on task definition
10193 2011-08-02 Robert Dewar <dewar@adacore.com>
10195 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
10197 2011-08-02 Javier Miranda <miranda@adacore.com>
10199 * sem_ch6.adb (Can_Override_Operator): New function.
10200 (Verify_Overriding_Indicator): Add missing code to check overriding
10201 indicator in operators. Fixes regression.
10202 (Check_Overriding_Indicator): Minor reformating after replacing the
10203 code that evaluates if the subprogram can override an operator by
10204 invocations to the above new function.
10206 (Write_Field26_Name): Add missing code to ensure that, following
10207 the documentation in einfo.ads, this field is not shown as attribute
10208 "Static_Initialization" on non-dispatching functions.
10210 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10212 * sem_res.adb (Resolve_Call): A call to
10213 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
10214 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
10215 i.e., when the second parameter is of type Time_Span.
10217 2011-08-02 Vincent Celier <celier@adacore.com>
10219 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
10220 with an archive instead of -L<library dir> -l<library name>.
10222 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10224 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
10225 mark the base types In_Use in addition to making the operations
10228 2011-08-02 Ed Falis <falis@adacore.com>
10230 * init.c: add and setup __gnat_signal_mask for the exception signals
10231 * s-inmaop-vxworks.adb: new file.
10232 * s-intman-vxworks.adb: remove unnecessary initializations and
10234 * s-intman-vxworks.ads: remove unnecessary variable
10235 * s-taprop-vxworks.adb: simplify signal initialization
10237 2011-08-02 Robert Dewar <dewar@adacore.com>
10239 * sem_ch8.adb: Minor code reorganization, comment updates.
10241 2011-08-02 Robert Dewar <dewar@adacore.com>
10243 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10244 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10246 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10247 (Matching_Static_Array_Bounds): Moved here from Sem_Res
10249 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10251 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10252 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10253 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10254 use_type_clauses, to handle more efficiently use_type and use_all_type
10256 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10257 Ada2012 Use_All_Type clause.
10258 (Use_Class_Wide_Operations): new procedure.
10260 2011-08-02 Robert Dewar <dewar@adacore.com>
10262 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10263 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10264 expression to expression function.
10266 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10268 * sem_ch4.adb: transform simple Ada2012 membership into equality only
10269 if types are compatible.
10271 2011-08-02 Yannick Moy <moy@adacore.com>
10273 * sem_res.adb (Matching_Static_Array_Bounds): new function which
10274 returns True if its argument array types have same dimension and same
10275 static bounds at each index.
10276 (Resolve_Actuals): issue an error in formal mode on actuals passed as
10277 OUT or IN OUT paramaters which are not view conversions in SPARK.
10278 (Resolve_Arithmetic_Op): issue an error in formal mode on
10279 multiplication or division with operands of fixed point types which are
10280 not qualified or explicitly converted.
10281 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10282 Boolean or array type (except String) operands.
10283 (Resolve_Equality_Op): issue an error in formal mode on equality
10284 operators for array types other than String with non-matching static
10286 (Resolve_Logical_Op): issue an error in formal mode on logical operators
10287 for array types with non-matching static bounds. Factorize the code in
10288 Matching_Static_Array_Bounds.
10289 (Resolve_Qualified_Expression): issue an error in formal mode on
10290 qualified expressions for array types with non-matching static bounds.
10291 (Resolve_Type_Conversion): issue an error in formal mode on type
10292 conversion for array types with non-matching static bounds
10294 2011-08-02 Robert Dewar <dewar@adacore.com>
10296 * par-ch10.adb: Minor code reorganization (use Nkind_In).
10298 2011-08-02 Ed Schonberg <schonberg@adacore.com>
10300 * par-ch9.adb: save location of entry for proper error message.
10302 2011-08-02 Javier Miranda <miranda@adacore.com>
10304 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
10305 (Use_Full_View) which permits this routine to climb through the
10306 ancestors using the full-view of private parents.
10307 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
10308 Use_Full_View to true in calls to Is_Ancestor.
10309 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
10310 true in call to Is_Ancestor.
10311 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
10312 Use_Full_View to true in call to Is_Ancestor.
10313 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
10314 call to Is_Ancestor.
10315 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
10316 Use_Full_View to true in calls to Is_Ancestor.
10317 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
10318 Make_Select_Specific_Data_Table, Register_Primitive,
10319 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
10320 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
10321 to true in call to Is_Ancestor.
10322 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10323 Use_Full_View to true in calls to Is_Ancestor.
10325 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10326 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10328 2011-08-02 Robert Dewar <dewar@adacore.com>
10330 * gnat_rm.texi: Minor reformatting.
10331 * sem_prag.adb: Minor reformatting.
10333 2011-08-02 Tristan Gingold <gingold@adacore.com>
10335 * vms_data.ads: Add VMS qualifier for -gnateP.
10337 2011-08-02 Robert Dewar <dewar@adacore.com>
10339 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10340 * par-ch7.adb (P_Package): Proper placement of aspects for package
10341 decl/instantiation.
10342 * par-endh.adb (Check_End): Ad Is_Sloc parameter
10343 (End_Statements): Add Is_Sloc parameterr
10344 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10345 (Check_End): Ad Is_Sloc parameter
10346 (End_Statements): Add Is_Sloc parameterr
10348 2011-08-02 Vincent Celier <celier@adacore.com>
10350 * ug_words: Add VMS qualifier equivalent to -gnateP:
10351 /SYMBOL_PREPROCESSING.
10353 2011-08-02 Jose Ruiz <ruiz@adacore.com>
10355 * gnat-style.texi: For hexadecimal numeric literals the typical
10356 grouping of digits is 4 to represent 2 bytes.
10357 A procedure spec which is split into several lines is indented two
10360 2011-08-02 Yannick Moy <moy@adacore.com>
10362 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
10363 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
10364 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
10366 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
10367 choice in array aggregate
10368 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
10370 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
10371 positional and named aggregate for record, or others in record
10372 aggregate, or multiple choice in record aggregate
10373 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
10374 array operands to logical operations AND, OR and XOR do not have the
10375 same static lower and higher bounds
10376 * sem_ch5.adb, sinfo.ads: Correct typos in comments
10378 2011-08-01 Robert Dewar <dewar@adacore.com>
10380 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
10381 Replaces Last_Source_Node_In_Sequence.
10382 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
10383 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
10384 parens and blank in string (this was inconsistently implemented).
10386 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
10387 blank in string (this was inconsistently implemented).
10389 (Set_Global_Switches): Set formal mode switches appropriately
10390 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
10392 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
10393 call Set_Error_Msg_Lang to set "spark" as language name.
10394 * par.adb: Remove unnecessary call to set formal language for errout
10395 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
10396 appropriately and call Set_Error_Msg_Lang to set "spark" as language
10398 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
10399 calls to it, moved after resolution so that types are known
10400 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
10401 result of concatenation is not of type String
10402 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
10403 concatenation is not properly restricted
10404 * gnat_rm.texi: Add doc on pragma Spark_95.
10405 * gcc-interface/Makefile.in: Remove obsolete target pairs for
10406 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
10407 * gcc-interface/Make-lang.in: Update dependencies.
10409 2011-08-01 Javier Miranda <miranda@adacore.com>
10411 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
10412 condition that detects if the overridden operation must replace an
10415 2011-08-01 Javier Miranda <miranda@adacore.com>
10417 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
10418 code declarations inserted by Insert_Actions in each alternative of the
10419 N_Case_Expression node.
10421 2011-08-01 Robert Dewar <dewar@adacore.com>
10423 * sem_ch6.adb: Minor code reorganization.
10424 * sem_util.adb: Minor reformatting.
10426 2011-08-01 Pascal Obry <obry@adacore.com>
10428 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
10429 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
10431 2011-08-01 Yannick Moy <moy@adacore.com>
10433 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
10434 literal or operator symbol which is prefixed
10435 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
10436 mode on access attributes.
10437 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
10438 that concatenation operands are properly restricted in formal mode
10439 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
10440 Analyze_Concatenation_Operand. Issue an error in formal mode if the
10441 result of the concatenation has a type different from String.
10442 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
10443 Analyze_Quantified_Expression, Analyze_Slice,
10444 Analyze_Null): issue an error in formal mode on unsupported constructs
10446 (Analyze_Block_Statement): only issue error on source block statement
10447 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
10448 function which returns the last node in a list of nodes for which
10449 Comes_From_Source returns True, if any
10450 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
10451 Last_Source_Node_In_Sequence
10452 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
10453 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
10454 mode on unsupported constructs
10455 * sem_ch9.adb Do not return after issuing error in formal mode, as the
10456 rest of the actions may be needed later on since the error is marked as
10458 * sinfo.ads: Typos in comments.
10460 2011-08-01 Pascal Obry <obry@adacore.com>
10462 * projects.texi: Minor editing.
10464 2011-08-01 Yannick Moy <moy@adacore.com>
10466 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
10467 insertion character ~~
10468 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
10469 (Set_Error_Msg_Lang): new procedure which fixes the language for use
10470 with insertion character ~~
10471 (Set_Msg_Text): treat insertion character ~~
10472 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
10473 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
10474 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
10475 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
10476 errors related to the formal language restriction not serious
10477 (insertion character |).
10478 * par.adb (Par): set formal language for error messages if needed
10479 * sem_ch6.adb (Check_Missing_Return): take into account possible
10480 generated statements at the end of the function
10481 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
10482 enumeration value to define a new pragma SPARK_95
10483 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
10484 SPARK_Version): new type and variables to store the SPARK version
10486 (SPARK_Mode): return True when SPARK_Version is set
10487 * par-prag.adb: Correct indentation
10488 (Prag): take Pragma_SPARK_95 into account
10489 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
10492 2011-08-01 Robert Dewar <dewar@adacore.com>
10494 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
10495 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
10496 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
10498 2011-08-01 Pascal Obry <obry@adacore.com>
10500 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
10501 Target_Name to Get_Path call.
10502 (Parse_Single_Project): Likewise.
10503 (Post_Parse_Context_Clause): Likewise.
10504 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
10505 Call Initialise_Project_Path with the proper Target_Name.
10506 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
10508 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
10509 with the proper Target_Name.
10510 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
10511 Part.Parse routine.
10512 (Parse_Project_And_Apply_Config): Likewise.
10513 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
10514 This is fine as this part of the code is supporting only native
10516 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
10517 is fine as this part of the code is supporting only native compilation.
10519 2011-08-01 Yannick Moy <moy@adacore.com>
10521 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
10522 of homonym, unless the homonym is one of the cases allowed in SPARK
10523 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
10524 package declaration occurring after a body.
10526 2011-08-01 Robert Dewar <dewar@adacore.com>
10528 * checks.adb, exp_ch4.adb: Minor reformatting.
10530 2011-08-01 Javier Miranda <miranda@adacore.com>
10532 * einfo.ads (Access_Disp_Table): Fix documentation.
10533 (Dispatch_Table_Wrappers): Fix documentation.
10535 2011-08-01 Pascal Obry <obry@adacore.com>
10537 * prj-env.adb, prj-env.ads: Minor reformatting.
10539 2011-08-01 Yannick Moy <moy@adacore.com>
10541 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
10542 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10543 procedures out of these packages.
10544 * errout.ads, errout.adb
10545 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
10546 procedures in of this package
10547 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
10548 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
10549 on misplaced later vs initial declarations, like in Ada 83
10550 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
10551 formal mode on attribute of private type whose full type declaration
10553 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
10554 package declaration inside a package specification
10555 (Analyze_Full_Type_Declaration): issue error in formal mode on
10556 controlled type or discriminant type
10557 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
10558 user-defined operator means that it should come from the source
10559 (New_Overloaded_Entity): issue error in formal mode on overloaded
10561 * sem_ch6.ads, sem_ch13.ads: typos in comments.
10563 2011-08-01 Thomas Quinot <quinot@adacore.com>
10565 * atree.adb: Minor reformatting.
10566 * checks.adb: Minor reformatting.
10568 2011-08-01 Vincent Celier <celier@adacore.com>
10570 * s-parame-vms-ia64.ads: Fix typo in comment
10572 * s-parame-vms-restrict.ads: Removed, unused.
10574 2011-08-01 Javier Miranda <miranda@adacore.com>
10577 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
10579 (Constrain_Index): Remove side effects in the evaluation of the bounds.
10580 * sem_ch3.ads, sem_ch3.adb
10581 (Is_Constant_Bound): New extended version of the subprogram that was
10582 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
10583 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
10584 * sem_aux.ads (Constant_Value): Fix typo in comment.
10585 * checks.adb (Generate_Index_Checks): New implementation which, for
10586 array objects with constant bounds, generates the runtime check
10587 referencing the bounds of the array type. For other cases this routine
10588 provides its previous behavior obtaining such values from the array
10590 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
10592 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
10593 we cannot have semantic interpretations of the new node.
10595 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10597 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
10600 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10602 * sem_ch8.adb: Minor code editing.
10603 * s-vxwext.adb: Remove trailing space.
10604 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
10605 consistency with other files.
10607 2011-08-01 Thomas Quinot <quinot@adacore.com>
10609 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
10611 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10613 * par-ch10.adb: reject parameterized expressions as compilation unit.
10614 * sem_ch4.adb: handle properly conditional expression with overloaded
10615 then_clause and no else_clause.
10617 2011-08-01 Tristan Gingold <gingold@adacore.com>
10619 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
10620 like done by System.Aux_DEC.
10621 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
10623 2011-08-01 Yannick Moy <moy@adacore.com>
10625 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
10626 missing label at end of declaration (subprogram or package)
10627 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
10628 of positional and named parameter association
10629 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
10630 Error_Msg_SP which adds a prefix to the error message giving the name
10631 of the formal language analyzed
10632 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
10633 access result type in subprogram, unconstrained array as result type,.
10634 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
10636 * sem_ch8.adb: Code clean up.
10638 2011-08-01 Javier Miranda <miranda@adacore.com>
10640 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
10641 * einfo.ads (Access_Disp_Table): Fix documentation.
10642 (Dispatch_Table_Wrappers): Fix documentation.
10643 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
10644 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
10645 to enforce the documentation of this attribute.
10646 (Set_Is_Interface): Cleanup the assertion.
10647 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
10648 the Underlying_Type entity before reading attribute Access_Disp_Table.
10649 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
10650 Locate the Underlying_Type before reading attribute Access_Disp_Table.
10651 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
10652 the Underlying_Type entity before reading attribute Access_Disp_Table.
10653 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
10654 Locate the Underlying_Type entity before reading attribute
10657 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10659 * s-poosiz.ads: Additional overriding indicators.
10661 2011-08-01 Yannick Moy <moy@adacore.com>
10663 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
10665 (Analyze_Iteration_Scheme): issue error in formal mode when loop
10666 parameter specification does not include a subtype mark.
10667 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
10668 formal mode on abstract subprogram.
10669 (Analyze_Subprogram_Specification): issue error in formal mode on
10670 user-defined operator.
10671 (Process_Formals): issue error in formal mode on access parameter and
10672 default expression.
10673 * sem_ch9.adb (Analyze_Abort_Statement,
10674 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
10675 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
10676 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
10677 Analyze_Requeue, Analyze_Selective_Accept,
10678 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
10679 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
10680 issue error in formal mode on user-defined raise statement.
10682 2011-08-01 Thomas Quinot <quinot@adacore.com>
10684 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
10685 declaration being hidden when overriding an implicit inherited
10687 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
10688 (-gnats), do not complain about a source file that contains only a
10691 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10693 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
10694 variable if already set.
10696 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10698 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
10699 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
10700 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
10701 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
10702 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
10703 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
10704 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
10705 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
10706 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
10707 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
10708 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
10709 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
10710 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
10711 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
10712 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
10713 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
10714 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
10715 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
10716 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
10717 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
10718 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
10719 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
10720 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
10721 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
10722 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
10723 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
10724 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
10725 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
10726 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
10727 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
10728 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
10729 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
10730 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
10731 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
10732 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
10733 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
10734 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
10735 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
10736 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
10737 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
10738 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
10739 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
10740 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
10741 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
10742 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
10743 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
10744 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
10745 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
10746 s-osinte-mingw.ads: Update to GPLv3 run-time license.
10747 Use GNAT instead of GNARL.
10749 2011-08-01 Bob Duff <duff@adacore.com>
10751 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
10752 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
10753 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
10756 2011-08-01 Yannick Moy <moy@adacore.com>
10758 * debug.adb (d.D) reverve flag for the SPARK mode
10759 (d.E) reverve flag for SPARK generation mode
10760 (d.F) reverve flag for Why generation mode
10761 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
10762 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
10763 functions which return True when the corresponding modes are set
10764 (Formal_Language): return "spark" or "alfa" when in formal verification
10766 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
10767 Error_Msg to prefix the error message with a tag giving the formal
10769 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
10770 message with a tag giving the formal language
10771 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
10773 (Analyze_Case_Statement): issue error in formal mode on case statement
10774 with a single "others" case alternative
10775 (Analyze_Exit_Statement): issue errors in formal mode on exit
10776 statements which do not respect SPARK restrictions
10777 (Analyze_Goto_Statement): issue error in formal mode on goto statement
10778 (Check_Unreachable_Code): always issue an error (not a warning) in
10779 formal mode on unreachable code (concerns both code after an infinite
10780 loop and after an unconditional jump, both not allowed in SPARK)
10781 * sem_ch6.adb (Analyze_Return_Statement): add call to
10782 Set_Return_Present for a procedure containing a return statement
10783 (already done for functions in Analyze_Function_Return)
10784 (Analyze_Function_Return): issue error in formal mode on extended
10785 return or if return is not last statement in function
10786 (Check_Missing_Return): issue error in formal mode if function does
10787 not end with return or if procedure contains a return
10788 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
10789 function to detect if there is an inner scope of its parameter S which
10792 2011-08-01 Thomas Quinot <quinot@adacore.com>
10794 * sem_ch6.ads: Minor reformatting.
10796 2011-08-01 Javier Miranda <miranda@adacore.com>
10798 * sem_util.adb (Abstract_Interface_List): Complete condition when
10799 processing private type declarations to avoid reading unavailable
10801 (Is_Synchronized_Tagged_Type): Complete condition when processing
10802 private extension declaration nodes to avoid reading unavailable
10805 2011-08-01 Thomas Quinot <quinot@adacore.com>
10807 * sem_ch3.adb: Minor reformatting.
10809 2011-08-01 Thomas Quinot <quinot@adacore.com>
10811 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
10812 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
10813 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
10814 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
10815 for VMS, instead parametrize the common implementation with
10816 System.Parameters declarations.
10818 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
10820 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
10822 2011-08-01 Tristan Gingold <gingold@adacore.com>
10824 * seh_init.c: Fix SEH handler installation on win64.
10826 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10828 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
10829 double analysis of an anonymous access to subprogram, because it can
10830 lead to improper sharing of profiles and a back-end crash.
10832 2011-08-01 Robert Dewar <dewar@adacore.com>
10834 * make.adb, sem_ch4.adb: Minor reformatting.
10835 * gcc-interface/Make-lang.in: Update dependencies.
10836 * sem_util.adb, exp_ch5.adb: Minor reformatting.
10838 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10840 * gnat_rm.texi: Fix definition of Long_Integer.
10842 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10844 * exp_aggr.adb: check limit size of static aggregate unconditionally,
10845 to prevent storage exhaustion.
10846 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
10847 finalized is a function body, insert the cleanup code before the final
10848 return statement, to prevent spurious warnings.
10849 * s-pooglo.ads: add overriding indicator.
10851 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10853 * sem_ch4.adb (Operator_Check): improve error message when both a
10854 with_clause and a use_clause are needed to make operator usage legal.
10855 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
10856 determine whether a compilation unit is visible within an other,
10857 either through a with_clause in the current unit, or a with_clause in
10858 its library unit or one one of its parents.
10860 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10862 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
10863 over an arbitrary expression of an array or container type.
10864 * lib-xref.adb: clarify comment.
10866 2011-08-01 Bob Duff <duff@adacore.com>
10868 * einfo.ads: Minor reformatting.
10869 * debug.adb: Minor comment improvement.
10871 2011-08-01 Javier Miranda <miranda@adacore.com>
10873 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
10874 consider hidden subprograms as valid candidates.
10876 2011-08-01 Arnaud Charlet <charlet@adacore.com>
10878 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
10880 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
10882 * gnat_ugn.texi: Fix typo.
10884 2011-08-01 Robert Dewar <dewar@adacore.com>
10886 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
10887 lib-xref.adb: Minor reformatting
10889 2011-08-01 Gary Dismukes <dismukes@adacore.com>
10891 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
10892 when to generate a call to Move_Final_List.
10893 (Has_Controlled_Parts): Remove this function.
10895 2011-08-01 Geert Bosch <bosch@adacore.com>
10897 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
10898 "," in choice list.
10900 2011-08-01 Thomas Quinot <quinot@adacore.com>
10902 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
10903 explicit raise of a predefined exception as Comes_From_Source if the
10904 original N_Raise_Statement comes from source.
10906 2011-08-01 Robert Dewar <dewar@adacore.com>
10908 * sinfo.ads: Add comment.
10909 * sem_ch6.adb: Minor reformatting.
10911 2011-08-01 Robert Dewar <dewar@adacore.com>
10913 * freeze.adb (Freeze_Entity): Refine check for bad component size
10914 clause to avoid rejecting confirming clause when atomic/aliased present.
10916 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10918 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
10919 better determine whether an entity reference is a write.
10920 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
10922 * lib-xref.adb (Output_References): Do no suppress a read reference at
10923 the same location as an immediately preceeding modify-reference, to
10924 handle properly in-out actuals.
10926 2011-08-01 Tristan Gingold <gingold@adacore.com>
10928 * env.c (__gnat_setenv) [VMS]: Refine previous change.
10930 2011-08-01 Quentin Ochem <ochem@adacore.com>
10932 * i-cstrin.adb (New_String): Changed implementation, now uses only the
10933 heap to compute the result.
10935 2011-08-01 Robert Dewar <dewar@adacore.com>
10937 * atree.ads: Minor reformatting.
10939 2011-08-01 Emmanuel Briot <briot@adacore.com>
10941 * g-expect.adb (Get_Command_Output): Fix memory leak.
10943 2011-08-01 Geert Bosch <bosch@adacore.com>
10945 * cstand.adb (P_Float_Type): New procedure to print the definition of
10946 predefined fpt types.
10947 (P_Mixed_Name): New procedure to print a name using mixed case
10948 (Print_Standard): Use P_Float_Type for printing floating point types
10949 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
10950 precision IEEE float.
10952 2011-08-01 Thomas Quinot <quinot@adacore.com>
10954 * sem_ch3.adb: Minor reformatting.
10956 2011-08-01 Ed Schonberg <schonberg@adacore.com>
10958 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
10959 the completion of a generic function, insert the new body rather than
10960 rewriting the original.
10962 2011-08-01 Yannick Moy <moy@adacore.com>
10964 * sinfo.ads, errout.ads: Typos in comments.
10966 2011-08-01 Robert Dewar <dewar@adacore.com>
10968 * par-endh.adb: Minor reformatting.
10970 2011-08-01 Robert Dewar <dewar@adacore.com>
10972 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
10973 (Pre_Post_Aspects): New subtype.
10974 * par-ch12.adb (P_Generic): New syntax for aspects in packages
10975 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
10976 * par-ch7.adb (P_Package): Remove Decl parameter
10977 (P_Package): Handle new syntax for aspects (before IS)
10978 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
10980 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
10981 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
10982 (P_Package): Remove Decl parameter
10983 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
10985 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
10987 * sem_util.ads, sem_util.adb (Static_Boolean): New function
10988 * sinfo.ads: Document new syntax for aspects in packages etc.
10989 * sprint.adb: Handle new syntax of aspects before IS in package
10991 2011-08-01 Thomas Quinot <quinot@adacore.com>
10993 * atree.ads: Minor reformatting.
10994 * sem_prag.adb: Minor reformatting.
10996 2011-08-01 Robert Dewar <dewar@adacore.com>
10998 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
10999 case expr alternative.
11001 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11003 * sem_ch12.adb: Fix typo.
11005 2011-08-01 Geert Bosch <bosch@adacore.com>
11007 * sem_prag.adb (Check_No_Link_Name): New procedure.
11008 (Process_Import_Or_Interface): Use Check_No_Link_Name.
11009 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11010 instead of Standard_Long_Long_Float_Size global. Preparation for
11011 eventual removal of per type constants.
11012 * exp_util.ads (Get_Stream_Size): New function returning the stream
11013 size value of subtype E.
11014 * exp_util.adb (Get_Stream_Size): Implement new function.
11015 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11017 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11019 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11021 2011-08-01 Geert Bosch <bosch@adacore.com>
11023 * cstand.adb: Fix comments.
11024 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11025 count of arguments.
11027 2011-08-01 Robert Dewar <dewar@adacore.com>
11029 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11031 2011-08-01 Geert Bosch <bosch@adacore.com>
11033 * atree.ads: Fix comment.
11035 2011-08-01 Robert Dewar <dewar@adacore.com>
11037 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11038 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11039 * par.adb: Add with for Namet.Sp.
11040 * par-tchk.adb: Minor reformatting.
11042 2011-08-01 Vincent Celier <celier@adacore.com>
11044 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11045 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11046 of the init procedure of a SAL.
11047 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11050 2011-08-01 Thomas Quinot <quinot@adacore.com>
11052 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11055 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11057 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11059 2011-08-01 Thomas Quinot <quinot@adacore.com>
11061 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11062 conformant with its spec (return True only for types that have
11063 an overriding Initialize primitive operation that prevents them from
11064 having preelaborable initialization).
11065 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
11066 initialization for controlled types in Ada 2005 or later mode.
11068 2011-08-01 Robert Dewar <dewar@adacore.com>
11070 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
11072 (Same_Aspect): New function.
11073 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
11074 Type_Invariant, Precondition, Postcondition.
11075 * snames.ads-tmpl: Add Name_Type_Invariant.
11077 2011-08-01 Robert Dewar <dewar@adacore.com>
11079 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
11081 (Freeze_All_Ent): Fix error in handling inherited aspects.
11082 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11083 already analyzed, but don't skip entire processing of a declaration,
11084 that's wrong in some cases of declarations being rewritten.
11085 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11086 Don't delay for integer, string literals
11087 Treat predicates in usual manner for delay, remove special case code,
11089 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11090 (Build_Predicate_Function): Update saved expression in aspect
11091 (Build_Invariant_Procedure): Update saved expression in aspect
11092 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11093 of replacement of discriminant references if the reference is simple.
11095 2011-08-01 Robert Dewar <dewar@adacore.com>
11097 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11098 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11099 Static_Predicate and Dynamic_Predicate.
11100 (Build_Predicate_Function): Add processing for Static_Predicate
11101 and Dynamic_Predicate.
11102 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11103 (From_Static_Predicate): New flag
11104 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11106 2011-08-01 Robert Dewar <dewar@adacore.com>
11108 * usage.adb: Documentation cleanup for Ada version modes in usage.
11109 * expander.adb: Minor reformatting.
11111 2011-08-01 Robert Dewar <dewar@adacore.com>
11113 * atree.ads: Minor comment fix.
11114 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11115 a-witeio.ads, sem_prag.adb: Minor reformatting.
11117 2011-08-01 Doug Rupp <rupp@adacore.com>
11119 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11120 pointers. Use descrip.h header file for convenience. Add some
11123 2011-08-01 Robert Dewar <dewar@adacore.com>
11125 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11126 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11127 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11129 (Check_Aspect_At_End_Of_Declarations): New procedure
11130 (Analye_Aspect_Specification): Minor changes for above procedures
11131 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11132 specification node as well.
11134 2011-08-01 Pascal Obry <obry@adacore.com>
11136 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11137 Windows files. Use GetFilesAttributes() in this case to check for file
11138 existence instead of returning with an error code.
11140 2011-08-01 Vincent Celier <celier@adacore.com>
11142 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11143 High is above Source length.
11145 2011-08-01 Robert Dewar <dewar@adacore.com>
11147 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11149 2011-08-01 Robert Dewar <dewar@adacore.com>
11151 * aspects.ads (Boolean_Aspects): New subtype.
11152 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
11153 for derived types in cases where the parent type and derived type have
11155 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
11156 with aspects when parent type also has aspects.
11157 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
11158 boolean expression at this point).
11159 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
11160 accordance with final decision on the Ada 2012 feature.
11161 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
11163 2011-08-01 Matthew Heaney <heaney@adacore.com>
11165 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
11167 2011-08-01 Pascal Obry <obry@adacore.com>
11169 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
11170 Fix Replace_Slice when High is above current string size.
11171 (Replace_Slice): Fix DL computation when High is above current
11174 2011-08-01 Gary Dismukes <dismukes@adacore.com>
11176 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
11178 2011-08-01 Matthew Heaney <heaney@adacore.com>
11180 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
11183 2011-08-01 Pascal Obry <obry@adacore.com>
11185 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
11188 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11190 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
11191 access to protected subprograms in generic bodies.
11192 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
11193 protected type, indicate that the convention of the subprogram is
11194 Convention_Protected, because it may be used in subsequent declarations
11195 within the protected declaration.
11197 2011-08-01 Vincent Celier <celier@adacore.com>
11199 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
11200 and "final" procedures when the name of the library is "ada", to avoid
11201 duplicate symbols "adainit" and "adafinal" in executables.
11203 2011-08-01 Ed Schonberg <schonberg@adacore.com>
11205 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
11206 quantified expression that appears within a postcondition and uses the
11207 Ada2012 'Result attribute.
11209 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11211 * init.c (__gnat_error_handler): Cast reason to int.
11212 (__gnat_install_handler): Explain sa_sigaction use.
11214 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11216 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
11217 subprogram has copy-in copy-out parameters, try to promote the mode of
11218 the return type if it is passed in registers.
11220 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11222 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
11223 left operand as addressable.
11225 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11227 * gcc-interface/gigi.h (build_function_stub): Remove.
11228 (build_return_expr): Likewise.
11229 (convert_vms_descriptor): Declare.
11230 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
11231 (build_function_stub): Move to...
11232 * gcc-interface/utils2.c (build_return_expr): Move to...
11233 * gcc-interface/trans.c (build_function_stub): ...here.
11234 (build_return_expr): ...here.
11235 (Subprogram_Body_to_gnu): Add local variable for language_function.
11236 Disconnect the parameter attributes cache, if any, once done with it.
11237 Call end_subprog_body only after setting the end_locus.
11238 Build the stub associated with the function, if any, at the very end.
11239 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11240 variables and streamline control flow.
11242 2011-07-23 Arnaud Charlet <charlet@adacore.com>
11245 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11246 g-trasym-dwarf.adb.
11248 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11251 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11252 Assign to act.sa_sigaction.
11253 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11254 current->return_address to char * before arithmetic.
11256 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11258 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11259 Correct argument types.
11260 Extract code from reason.
11261 (__gnat_install_handler): Assign to act.sa_sigaction.
11263 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
11265 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11266 (GNAT1_OBJS): ...here.
11268 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
11271 * g-socthi-mingw.adb (Fill): Fix formatting.
11273 * gcc-interface/gigi.h: Move around comment.
11275 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
11278 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11280 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
11283 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11285 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
11287 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11288 range comparison if Pmode is SImode.
11290 2011-07-12 Laurent GUERBY <laurent@guerby.net>
11291 Eric Botcazou <ebotcazou@adacore.com>
11293 * adadecode.c: Wrap up in extern "C" block.
11294 * adadecode.h: Likewise.
11295 * adaint.c: Likewise. Remove 'const' keyword.
11296 * adaint.h: Likewise.
11297 * argv.c: Likewise.
11298 * atree.h: Likewise.
11300 * cstreams.c: Likewise.
11302 * exit.c: Likewise.
11304 * final.c: Likewise.
11305 * init.c: Likewise.
11306 * initialize.c: Likewise.
11307 * link.c: Likewise.
11308 * namet.h: Likewise.
11309 * nlists.h: Likewise.
11310 * raise.c: Likewise.
11311 * raise.h: Likewise.
11312 * repinfo.h: Likewise.
11313 * seh_init.c: Likewise.
11314 * targext.c: Likewise.
11315 * tracebak.c: Likewise.
11316 * uintp.h: Likewise.
11317 * urealp.h: Likewise.
11318 * xeinfo.adb: Wrap up generated C code in extern "C" block.
11319 * xsinfo.adb: Likewise.
11320 * xsnamest.adb: Likewise.
11321 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11322 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11323 * gcc-interface/misc.c: Likewise.
11324 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11325 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
11326 ada/targext.o here...
11327 (GNAT_ADA_OBJS): ...and not here.
11328 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11329 (GNATBIND_OBJS): Reorder.
11331 2011-07-07 Richard Henderson <rth@redhat.com>
11333 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11334 dwarf2out_frame_init.
11336 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
11338 * gcc-interface/misc.c (gnat_init): Tweak previous change.
11340 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11343 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11345 2011-07-06 Richard Guenther <rguenther@suse.de>
11347 * gcc-interface/misc.c (gnat_init): Merge calls to
11348 build_common_tree_nodes and build_common_tree_nodes_2.
11349 Re-initialize boolean_false_node.
11351 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
11352 Olivier Hainque <hainque@adacore.com>
11353 Nicolas Setton <setton@adacore.com>
11355 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
11356 the type according to the ARTIFICIAL_P parameter.
11357 (create_type_decl): Likewise.
11358 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
11360 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
11362 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
11363 (gnatbind): Likewise.
11365 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11367 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
11369 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11371 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
11372 local variable throughout. Remove useless call to Base_Type.
11373 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
11374 Take it also into account for the volatileness of the field. Set the
11375 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
11377 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11379 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
11380 on a dereference built for a by-ref object if it has an address clause.
11382 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
11384 * einfo.ads (Address_Taken): Document use for the second argument of
11385 Asm_Input and Asm_Output attributes.
11386 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
11387 argument is an entity name, then set Address_Taken on it.
11388 <Attribute_Asm_Output>: Likewise.
11389 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
11390 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
11391 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
11392 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
11394 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
11396 PR middle-end/46500
11397 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
11399 2011-06-14 Joseph Myers <joseph@codesourcery.com>
11401 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
11402 (ada/utils.o): Update dependencies.
11403 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
11404 ../../../libcpp/libcpp.a.
11405 * gcc-interface/utils.c: Include common/common-target.h.
11406 (process_attributes): Use targetm_common.have_named_sections.
11408 2011-06-07 Richard Guenther <rguenther@suse.de>
11410 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
11413 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11415 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
11416 TREE_THIS_NOTRAP flag.
11418 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11420 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
11423 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11425 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
11426 constants whose full view has discriminants specially.
11428 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
11430 * gcc-interface/utils.c: Include diagnostic.h.
11431 (gnat_write_global_declarations): Output debug information for all
11432 global type declarations before finalizing the compilation unit.
11433 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
11435 2011-05-25 Jakub Jelinek <jakub@redhat.com>
11437 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
11439 2011-05-25 Kai Tietz <ktietz@redhat.com>
11441 * adaint.c (__gnat_to_canonical_file_list_next): Use array
11442 initialization instead of const/none-const pointer assignment.
11444 2011-05-24 Joseph Myers <joseph@codesourcery.com>
11446 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
11447 $(EXTRA_GNAT1_OBJS).
11448 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
11449 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
11450 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
11451 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
11452 libcommon-target.a instead of prefix.o.
11454 2011-05-21 Joseph Myers <joseph@codesourcery.com>
11457 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
11459 2011-05-20 Joseph Myers <joseph@codesourcery.com>
11461 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
11462 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
11463 instead of version.o.
11465 2011-05-18 Kai Tietz <ktietz@redhat.com>
11467 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
11468 boolean_false_node instead of integer_zero_node.
11469 (convert_with_check): Likewise.
11470 * gcc-interface/decl.c (choices_to_gnu): Likewise.
11472 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
11474 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
11475 type of the parameter is an unconstrained array, convert the actual to
11476 the type of the formal in the In Out and Out cases as well.
11478 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11480 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
11481 call build_function_type_array or build_varargs_function_type_array
11483 (create_subprog_type): Don't call build_function_type; call
11484 build_function_type_vec instead.
11486 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
11488 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
11489 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
11490 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
11492 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
11494 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
11496 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
11497 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
11499 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11501 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
11503 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11505 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
11506 instead of accessing TYPE_ARG_TYPES directly.
11507 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
11509 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11512 * gcc-interface/gigi.h (get_variant_part): Declare.
11513 * gcc-interface/decl.c (get_variant_part): Make global.
11514 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
11515 types have the same constant size, are record types and T1 has a
11516 variant part while T2 doesn't.
11518 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
11520 * gcc-interface/utils.c (begin_subprog_body): Do not call
11522 (end_subprog_body): Likewise.
11524 2011-05-04 Richard Guenther <rguenther@suse.de>
11526 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
11528 (pos_to_constructor): Likewise.
11530 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
11531 Eric Botcazou <ebotcazou@adacore.com>
11533 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
11534 of build_function_type. Adjust calls to...
11535 (build_raise_check): ...this. Do not take a void_tree parameter.
11536 Call build_function_type_list instead of build_function_type.
11537 Fix head comment and swap couple of conditional blocks.
11539 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
11541 * gnatvsn.ads (Library_Version): Bump to 4.7.
11542 (Current_Year): Bump to 2011.
11544 2011-04-29 Michael Matz <matz@suse.de>
11546 * gcc-interface/misc.c (gnat_handle_option): Set
11547 warn_maybe_uninitialized.
11549 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
11551 * gnat_ugn.texi (Complexity Metrics Control): Update link to
11552 the Watson/McCabe paper.
11554 2011-04-23 Jim Meyering <meyering@redhat.com>
11556 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
11558 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
11560 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
11563 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
11565 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
11567 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
11568 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
11569 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
11570 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
11571 <all>: Do not set flags on the reused DECL node coming from an alias.
11572 Set DECL_IGNORED_P on the DECL node built for subprograms if they
11573 don't need debug info here...
11574 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
11575 (gigi): Adjust calls to create_subprog_decl.
11576 (build_raise_check): Likewise.
11577 (establish_gnat_vms_condition_handler): Likewise.
11578 (Compilation_Unit_to_gnu): Likewise.
11579 (gnat_to_gnu): Likewise.
11581 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
11583 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
11584 (NO_REORDER_ADAFLAGS): New variable.
11585 (EXTRA_GNATTOOLS): Always define.
11586 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
11587 Clean up and adjust list of files compiled with special options.
11588 * gcc-interface/Make-lang.in: Likewise.
11589 (ada/decl.o): Cosmetical change.
11590 (ada/misc.o): Remove dependency on $(PLUGIN_H).
11592 2011-04-20 Jim Meyering <meyering@redhat.com>
11594 * initialize.c (__gnat_initialize): Remove useless if-before-free.
11596 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
11598 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
11599 $(CFLAGS) on the link line.
11601 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
11603 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
11604 padded type built for the return type if it is unconstrained.
11606 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
11608 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
11610 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11612 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
11613 before calling TREE_CHAIN.
11614 * gcc-interface/misc.c (gnat_init_ts): New function.
11615 (LANG_HOOKS_INIT_TS): Define.
11617 2011-04-12 Martin Jambor <mjambor@suse.cz>
11619 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
11620 instead of cgraph_node.
11622 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
11624 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
11625 alignment on fields of the RETURN type built for the Copy-In Copy-Out
11628 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
11630 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
11631 of aggregate types that contain a placeholder.
11633 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11635 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
11637 (handle_type_generic_attribute): Likewise.
11639 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
11642 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
11644 2011-04-04 Kai Tietz <ktietz@redhat.com>
11647 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
11650 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11652 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
11653 type case, do not strip a padding type around the array type.
11655 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11657 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
11660 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11662 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
11663 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
11664 code for -feliminate-unused-debug-types.
11665 (gnat_post_options): Likewise.
11667 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11669 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11670 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
11673 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11675 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
11676 DECL_ARTIFICIAL flag on enumeration types.
11678 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11680 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
11681 fat pointer types artificial unconditionally.
11682 <E_Array_Subtype>: Attach the base array type as a parallel type if it
11685 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11687 * gcc-interface/gigi.h (get_dummy_type): Declare.
11688 (build_dummy_unc_pointer_types): Likewise.
11689 (finish_fat_pointer_type): Likewise.
11690 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
11691 fat pointer type has been built, complete it in place.
11692 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
11693 and thin pointers. Remove useless variable.
11694 (finish_fat_pointer_type): Make global and move to...
11695 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
11696 (get_dummy_type): New function.
11697 (build_dummy_unc_pointer_types): Likewise.
11698 (gnat_pushdecl): Propage the name to the anonymous variants only.
11699 (update_pointer_to): Only adjust the pointer types in the unconstrained
11702 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11704 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
11705 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
11706 if this is a Taft amendment type and the full declaration is available.
11707 * gcc-interface/trans.c (process_type): Likewise.
11708 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
11709 (process_freeze_entity): Likewise.
11710 * gcc-interface/utils.c (dummy_global): New static variable.
11711 (gnat_write_global_declarations): If there are types declared as used
11712 at the global level, insert them in the global hash table.
11714 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11716 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
11717 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
11718 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
11720 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
11721 flag of the type accordingly.
11722 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
11724 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
11726 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11727 finalizing types when updating the pointers to the designated type.
11728 <all>: Finalize the deferred types even if we didn't defer processing
11729 of incomplete types in this invocation.
11731 2011-04-01 Olivier Hainque <hainque@adacore.com>
11732 Nicolas Setton <setton@adacore.com>
11733 Eric Botcazou <ebotcazou@adacore.com>
11735 * gcc-interface/misc.c (gnat_descriptive_type): New function.
11736 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
11738 2011-03-28 Kai Tietz <ktietz@redhat.com>
11740 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
11742 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
11743 * system-mingw.ads (System): Change ZCX_By_Default default to True.
11745 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
11747 2011-03-28 Tristan Gingold <gingold@adacore.com>
11750 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
11751 Use ada output of gnatbind.
11752 (ada/b_gnatb.adb): Ditto.
11753 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
11754 (ada.mostlyclean, ada.stage1)
11755 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
11756 (ada.stagefeedback): Adjust.
11757 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
11758 Use ada output of gnatbind.
11759 (b_gnatm.adb): Ditto.
11760 (b_gnatl.o, b_gnatm.o): New rules.
11762 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11764 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11765 for the padded type built to support a specified size or alignment.
11767 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11769 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
11770 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
11771 unconditionally to the end of the unit when the designated type is
11773 <all>: Rename local variable. Attempt to un-defer types only and do it
11774 for limited_with'ed types as well.
11775 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
11776 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
11777 consistently and remove redundant call to finalize_from_with_types.
11779 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
11781 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
11782 subprograms without a previous spec declared in the same unit.
11783 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
11784 subprograms at the end of the unit instead of at the beginning.
11785 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
11786 isn't public for the special handling of non-inline functions nested
11787 inside inline external functions.
11789 2011-03-25 Jeff Law <law@redhat.com>
11791 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
11793 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11795 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
11796 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
11797 to compute Set_Size_Depends_On_Discriminant.
11798 (Layout_Type): Call it on array types in back-end layout mode.
11799 * sem_util.adb (Requires_Transient_Scope): Return true for array
11800 types only if the size depends on the value of discriminants.
11801 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
11802 type if the RHS is a call to a function that returns an unconstrained
11803 type with default discriminant.
11805 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
11807 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
11808 non-conversion to the nominal result type at the end.
11810 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11812 * gcc-interface/trans.c (create_temporary): New function taken from...
11813 (create_init_temporary): ...here. Call it.
11814 (call_to_gnu): Create the temporary for the return value early, if any.
11815 Create it for a function with copy-in/copy-out parameters if there is
11816 no target; in other cases of copy-in/copy-out, use another temporary.
11817 Push the new binding level lazily. Add and rename local variables.
11819 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11821 * gcc-interface/decl.c (validate_size): Improve comments and tweak
11823 (set_rm_size): Likewise.
11825 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
11827 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
11828 for the padded type built in order to support a specified alignment.
11829 Fix incorrect formatting.
11831 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11834 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
11836 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11838 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
11839 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
11840 to the end of the list. Adjust recursive call. Rename local variable.
11841 If REORDER is true, reorder components of the record type.
11842 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
11843 components_to_record and adjust the parameter list.
11845 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
11847 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
11848 disabled, use the variable for bounds of loop iteration scheme.
11850 2011-03-21 Kai Tietz <ktietz@redhat.com>
11853 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
11855 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11857 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
11858 out whether the expression is read-only. Short-circuit placeholder
11859 case and rename a couple of local variables.
11861 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
11863 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
11864 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
11865 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
11866 (convert): Deal with conversions from a smaller form type specially.
11868 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
11870 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
11871 its argument, except for the special -I- switch.
11873 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
11875 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
11878 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
11880 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
11882 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
11884 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
11886 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
11887 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
11888 instead of GNAT_FORMAL. Protect the expression against multiple uses.
11889 Do not generate the check directly, instead instantiate the template
11890 check present in the descriptor.
11891 (make_descriptor_field): Move around.
11892 (build_vms_descriptor32): Build a template check in the POINTER field.
11893 (build_vms_descriptor): Remove useless suffixes.
11894 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
11896 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
11899 * targext.c: Include target files if IN_RTS is defined.
11901 2011-01-26 Richard Guenther <rguenther@suse.de>
11904 * targext.c: Include config.h.
11905 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
11908 2011-01-04 Pascal Obry <obry@adacore.com>
11909 Eric Botcazou <ebotcazou@adacore.com>
11911 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
11913 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11915 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
11916 end-of-case on the end label and its associated gotos, if any.
11918 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11920 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
11921 expressions of the parameter cache within the statement group of
11922 the CICO mechanism.
11924 2011-01-04 Olivier Hainque <hainque@adacore.com>
11925 Eric Botcazou <ebotcazou@adacore.com>
11927 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
11928 (set_end_locus_from_node): New function.
11929 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
11930 make and the function end_locus.
11931 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
11932 for the elaboration subprogram.
11933 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
11934 set the end_locus of the expression as well.
11936 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
11939 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
11940 variables that are referenced in exception handlers volatile.
11944 Copyright (C) 2011 Free Software Foundation, Inc.
11946 Copying and distribution of this file, with or without modification,
11947 are permitted in any medium without royalty provided the copyright
11948 notice and this notice are preserved.
11950 * gnat_rm.texi: Ramification of pragma Eliminate documentation
11951 - fix bugs in the description of Source_Trace;
11952 - get rid of UNIT_NAME;
11954 2011-08-02 Javier Miranda <miranda@adacore.com>
11957 (Build_Dispatching_Requeue): Adding support for VM targets
11958 since we cannot directly reference the Tag entity.
11959 * exp_sel.adb (Build_K): Adding support for VM targets.
11960 (Build_S_Assignment): Adding support for VM targets.
11962 (Default_Prim_Op_Position): In VM targets do not restrict availability
11963 of predefined interface primitives to compiling in Ada 2005 mode.
11964 (Is_Predefined_Interface_Primitive): In VM targets this service is not
11965 restricted to compiling in Ada 2005 mode.
11966 (Make_VM_TSD): Generate code that declares and initializes the OSD
11967 record. Needed to support dispatching calls through synchronized
11970 (Make_Predefined_Primitive_Specs): Enable generation of predefined
11971 primitives associated with synchronized interfaces.
11972 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
11973 primitives associated with synchronized interfaces.
11975 2011-08-02 Yannick Moy <moy@adacore.com>
11977 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
11978 statements hidden in SPARK if preceded by the HIDE directive
11979 (Parse_Exception_Handlers): mark each exception handler in a sequence of
11980 exception handlers as hidden in SPARK if preceded by the HIDE directive
11981 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
11982 if starting with the HIDE directive
11983 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
11984 starting with the HIDE directive; mark the declarations in a private
11985 part as hidden in SPARK if the private part starts with the HIDE
11987 * restrict.adb, restrict.ads
11988 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
11989 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
11990 argument node belongs to a part which is hidden in SPARK
11991 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
11992 parts in SPARK; protect the possibly costly call to
11993 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
11994 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
11995 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
11996 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
11998 (Scan): recognize special comment starting with '#' and followed by
11999 SPARK keyword "hide" as a HIDE directive.
12001 2011-08-02 Yannick Moy <moy@adacore.com>
12003 * types.ads, erroutc.ads: Minor reformatting.
12005 2011-08-02 Vincent Celier <celier@adacore.com>
12007 * link.c: Add response file support for cross platforms.
12009 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12011 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
12012 in an association, set parent field of copy before partial analysis.
12013 * sem_res.adb (Resolve_Slice): create reference to itype only when
12014 expansion is enabled.
12016 2011-08-02 Yannick Moy <moy@adacore.com>
12018 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
12019 for new flag denoting which subprogram bodies are in ALFA
12020 * restrict.adb, sem_ch7.adb: Update comment
12021 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
12022 sem_ch9.adb, sem_res.adb: Add calls to
12023 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
12024 * sem_ch6.adb (Analyze_Function_Return): add calls to
12025 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
12026 middle of the body, and extended return.
12027 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
12028 False when missing return.
12029 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
12030 to True for subprograms whose spec is in ALFA. Remove later on the flag
12031 on the entity used for a subprogram body when there exists a separate
12033 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
12034 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
12035 False, otherwise do nothing.
12037 2011-08-02 Robert Dewar <dewar@adacore.com>
12039 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12041 2011-08-02 Yannick Moy <moy@adacore.com>
12043 * sem_ch4.ads: minor formatting.
12045 2011-08-02 Yannick Moy <moy@adacore.com>
12047 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
12048 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
12049 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
12050 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
12051 opt.ads: cleanup of SPARK mode
12053 2011-08-02 Yannick Moy <moy@adacore.com>
12055 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
12057 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
12058 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
12060 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
12061 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
12062 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
12063 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
12065 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
12067 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
12068 functions whose return type is not in ALFA.
12069 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
12071 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
12072 parameter's type is not in ALFA.
12073 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
12076 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12078 * sem_ch6 (Analyze_Expression_Function): treat the function as
12079 Inline_Always, and introduce a subprogram declaration for it when it is
12081 * inline.adb (Add_Inlined_Body): recognize bodies that come from
12082 expression functions, so that the back-end can determine whether they
12083 can in fact be inlined.
12084 * sem_util.adb (Is_Expression_Function): predicate to determine whether
12085 a function body comes from an expression function.
12087 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12089 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
12090 null exclusions to test Can_Never_Be_Null on the anonymous access types
12091 of the formals rather than testing the formals themselves. Exclude this
12092 check in cases where the Old_Formal is marked as a controlling formal,
12093 to avoid issuing spurious errors for bodies completing dispatching
12094 operations (due to the flag not getting set on controlling access
12095 formals in body specs).
12096 (Find_Corresponding_Spec): When checking full and subtype conformance of
12097 subprogram bodies in instances, pass Designated and E in that order, for
12098 consistency with the expected order of the formals (New_Id followed by
12101 2011-08-02 Robert Dewar <dewar@adacore.com>
12103 * sem_ch8.adb: Minor reformatting.
12105 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12107 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
12108 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
12109 primitive operations of class-wide actuals.
12111 2011-08-02 Javier Miranda <miranda@adacore.com>
12113 * exp_atag.ads, exp_atag.adb
12114 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
12115 since its value is implicitly passed in argument Typ.
12116 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
12117 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
12118 Build_Common_Dispatching_Select_Statements.
12120 2011-08-02 Robert Dewar <dewar@adacore.com>
12122 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
12123 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
12124 Minor reformatting.
12126 2011-08-02 Robert Dewar <dewar@adacore.com>
12128 * sem_res.adb: Minor reformatting.
12129 * sem_prag.adb: Minor reformatting.
12131 2011-08-02 Javier Miranda <miranda@adacore.com>
12133 * exp_atag.adb, exp_atags.ads
12134 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
12135 by the tagged type Entity. Required to use this routine in the VM
12136 targets since we do not have available the Tag entity in the VM
12139 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
12140 Ada.Tags has not been previously loaded.
12142 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
12143 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
12145 (Enclosing_Dynamic_Scope): Add missing support to handle the full
12146 view of enclosing scopes. Required to handle enclosing scopes that
12147 are synchronized types whose full view is a task type.
12149 (Build_VM_TSDs): Minor code improvement to avoid generating and
12150 analyzing lists with empty nodes.
12151 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
12152 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
12153 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
12154 (Make_Disp_Timed_Select_Body): Add support for VM targets.
12155 (Make_Select_Specific_Data_Table): Add support for VM targets.
12156 (Make_VM_TSD): Generate code to initialize the SSD structure of
12159 2011-08-02 Yannick Moy <moy@adacore.com>
12161 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
12162 cross-references section in ALI.
12163 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
12164 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
12166 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
12167 subprogram or package entity of a node
12168 (Is_Local_Reference_Type): new function returns True for references
12169 selected in local cross-references.
12170 (Lt): function extracted from Lt in Output_References
12171 (Write_Entity_Name): function extracted from Output_References
12172 (Generate_Definition): generate reference with type 'D' for definition
12173 of objects (object declaration and parameter specification), with
12174 appropriate locations and units, for use in local cross-references.
12175 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
12176 references of type 'I' for initialization in object definition.
12177 (Output_References): move part of function Lt and procedure
12178 Write_Entity_Name outside of the body. Ignore references of types 'D'
12179 and 'I' introduced for local cross-references.
12180 (Output_Local_References): new procedure to output the local
12181 cross-references sections.
12182 (Lref_Entity_Status): new array defining whether an entity is a local
12183 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
12184 with 'I' type when initialization expression is present.
12185 * get_scos.adb, get_scos.ads: Correct comments and typos
12187 2011-08-02 Javier Miranda <miranda@adacore.com>
12189 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
12191 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
12193 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
12196 2011-08-02 Vincent Celier <celier@adacore.com>
12198 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
12199 (No_Space_Img): New function
12200 (Find_Excluded_Sources): When reading from a file, record the file name
12201 and the line number for each excluded source.
12202 (Mark_Excluded_Sources): When reporting an error, if the excluded
12203 sources were read from a file, include file name and line number in
12206 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12208 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
12210 2011-08-02 Robert Dewar <dewar@adacore.com>
12212 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
12214 2011-08-02 Javier Miranda <miranda@adacore.com>
12216 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
12217 generation of TSDs to the DOTNET compiler.
12218 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
12219 generation of TSDs to the DOTNET compiler.
12221 2011-08-02 Javier Miranda <miranda@adacore.com>
12223 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
12224 record of all the tagged types declared inside library level package
12225 declarations, library level package bodies or library level subprograms.
12226 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
12227 associated with a given tagged type.
12228 (Build_VM_TSDs): New subprogram.
12229 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
12230 compilation units that are subprograms.
12231 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
12232 compilation units that are package bodies.
12233 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
12234 units that are a package declaration or a package instantiation.
12235 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
12236 reorganization to improve the error generated by the frontend when the
12237 function Ada.Tags.Secondary_Tag is not available.
12238 * rtsfind.ads (RE_Register_TSD): New runtime entity.
12239 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
12241 2011-08-02 Javier Miranda <miranda@adacore.com>
12243 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
12245 2011-08-02 Robert Dewar <dewar@adacore.com>
12247 * s-imenne.ads: Minor reformatting.
12249 2011-08-02 Robert Dewar <dewar@adacore.com>
12251 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
12252 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
12253 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
12255 2011-08-02 Robert Dewar <dewar@adacore.com>
12257 * einfo.ads (Materialize_Entity): Document this is only for renamings
12258 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
12259 required debug information in the case where we transform the object
12260 declaration into a renaming declaration.
12261 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
12263 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
12264 Materialize_Entity.
12266 2011-08-02 Robert Dewar <dewar@adacore.com>
12268 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
12269 Suppress_Init_Procs.
12270 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
12271 Suppress_Initialization/Initialization_Suppressed.
12272 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
12273 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
12274 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
12275 * sem_prag.adb: New processing for pragma Suppress_Initialization.
12277 2011-08-02 Robert Dewar <dewar@adacore.com>
12279 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
12280 Minor reformatting.
12282 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12284 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
12285 only have inheritable classwide pre/postconditions.
12287 2011-08-02 Javier Miranda <miranda@adacore.com>
12289 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
12290 * rtsfind.ads (RE_Check_TSD): New runtime entity.
12291 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
12292 checks if the external tag of a type is the same as the external tag
12293 of some other declaration.
12295 2011-08-02 Thomas Quinot <quinot@adacore.com>
12297 * s-taskin.ads: Minor reformatting.
12299 2011-08-02 Emmanuel Briot <briot@adacore.com>
12301 * g-comlin.adb (Display_Help): swap the order in which it prints the
12302 short help and the general usage.
12304 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12306 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
12307 the aspect declarations and attach them to the generic copy for
12308 subsequent analysis.
12309 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
12310 declarations of the generic tree to the new subprogram declarations.
12311 * sem_attr.adb (Check_Precondition_Postcondition): recognize
12312 conditions that apply to a subprogram instance.
12314 2011-08-02 Robert Dewar <dewar@adacore.com>
12316 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
12318 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12320 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
12321 private type with a tagged full view is not derived in the immediate
12322 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
12324 2011-08-02 Robert Dewar <dewar@adacore.com>
12326 * exp_ch4.adb: Minor reformatting.
12328 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12330 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
12331 Ada2012 iterator, the loop will be rewritten during expansion into a
12332 while loop with a cursor and an element declaration. Do not analyze the
12333 body in this case, because if the container is for indefinite types the
12334 actual subtype of the elements will only be determined when the cursor
12335 declaration is analyzed.
12337 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12339 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
12340 size/alignment related attributes in CodePeer_Mode.
12342 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12344 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
12345 Prepend_Element, since this can result in the operation getting the
12346 wrong slot in the full type's dispatch table if the full type has
12347 inherited operations. The incomplete type's operation will get added
12348 to the proper position in the full type's primitives
12349 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
12350 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
12351 dispatching operations, since there are cases where nonprimitive
12352 subprograms can get added to the list of incomplete dependents (such
12353 as subprograms in nested packages).
12354 * sem_ch6.adb (Process_Formals): First, remove test for being in a
12355 private part when determining whether to add a primitive with a
12356 parameter of a tagged incomplete type to the Private_Dependents list.
12357 Such primitives can also occur in the visible part, and should not have
12358 been excluded from being private dependents.
12359 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
12360 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
12361 list of a Taft-amendment incomplete type is a primitive before issuing
12362 an error that the full type must appear in the same unit. There are
12363 cases where nonprimitives can be in the list (such as subprograms in
12365 * sem_disp.adb (Derives_From): Use correct condition for checking that
12366 a formal's type is derived from the type of the corresponding formal in
12367 the parent subprogram (the condition was completely wrong). Add
12368 checking that was missing for controlling result types being derived
12369 from the result type of the parent operation.
12371 2011-08-02 Yannick Moy <moy@adacore.com>
12373 * errout.adb (First_Node): minor renaming
12374 * restrict.adb (Check_Formal_Restriction): put restriction warning on
12377 2011-08-02 Yannick Moy <moy@adacore.com>
12379 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
12380 before accessing operands.
12381 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
12382 decide whether an initialization expression respects SPARK rules, as
12383 the plain node is the expanded one. This allows for more valid warnings
12385 * gnat_rm.texi: Minor update.
12387 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12389 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
12392 2011-08-02 Robert Dewar <dewar@adacore.com>
12394 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
12396 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12398 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
12399 loop statements and the element renaming declaration with a block when
12400 the element type is controlled.
12402 2011-08-02 Yannick Moy <moy@adacore.com>
12404 * sinfo.ads: Minor formatting.
12406 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12408 * sem_aggr.adb (Add_Association): if the association has a box and no
12409 expression, use the Sloc of the aggregate itself for the new
12411 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
12414 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12416 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
12417 When a container is provided via a function call, generate a renaming
12418 of the function result. This avoids the creation of a transient scope
12419 and the premature finalization of the container.
12420 * exp_ch7.adb (Is_Container_Cursor): Removed.
12421 (Wrap_Transient_Declaration): Remove the supression of the finalization
12422 of the list controller when the declaration denotes a container cursor,
12425 2011-08-02 Yannick Moy <moy@adacore.com>
12427 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
12428 node is from source, instead of the original node being from source.
12430 (Resolve_Array_Aggregate): refine the check for a static expression, to
12431 recognize also static ranges
12432 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
12433 Array_Type_Declaration): postpone the test for the type being a subtype
12434 mark after the type has been resolved, so that component-selection and
12435 expanded-name are discriminated.
12436 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
12437 to distinguish the case of an iteration scheme, so that an error is
12438 issed on a non-static range in SPARK except in an iteration scheme.
12439 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
12440 In_Iter_Schm = True.
12441 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
12442 user-defined operators so that they are allowed in renaming
12444 (Find_Selected_Component): refine the check for prefixing of operators
12445 so that they are allowed in renaming. Move the checks for restrictions
12446 on selector name after analysis discriminated between
12447 component-selection and expanded-name.
12448 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
12449 concatenation argument of string type if it is static.
12450 * sem_util.adb, sem_util.ads
12451 (Check_Later_Vs_Basic_Declarations): add a new function
12452 Is_Later_Declarative_Item to decice which declarations are allowed as
12453 later items, in the two different modes Ada 83 and SPARK. In the SPARK
12454 mode, add that renamings are considered as later items.
12455 (Enclosing_Package): new function to return the enclosing package
12456 (Enter_Name): correct the rule for homonyms in SPARK
12457 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
12458 from source (result of expansion) to avoid issuing wrong warnings.
12460 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12462 * errout.adb: On anything but an expression First_Node returns its
12465 2011-08-02 Pascal Obry <obry@adacore.com>
12467 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
12469 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
12471 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
12472 Set the associated loop as the related expression of internally
12474 * exp_ch7.adb (Is_Container_Cursor): New routine.
12475 (Wrap_Transient_Declaration): Supress the finalization of the list
12476 controller when the declaration denotes a container cursor.
12478 2011-08-02 Yannick Moy <moy@adacore.com>
12480 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
12482 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
12483 expression is a simple expression. This check cannot be performed in
12484 the semantics, so just drop it.
12485 (P_Index_Or_Discriminant_Constraint): move check that the index or
12486 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
12487 semantics. Other cases were previously checked in the semantics.
12488 * par-ch4.adb (P_Name): move checks that a selector name is not
12489 character literal or an operator symbol to Find_Selected_Component in
12491 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
12492 declarations are not placed after later declarations in a separate
12493 procedure in Sem_Util (possibly not the best choice?), to be used both
12494 during parsing, for Ada 83 mode, and during semantic analysis, for
12496 * par-endh.adb (Check_End): move check that end label is not missing
12497 to Process_End_Label in the semantics
12498 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
12499 the special case for SPARK restriction
12500 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
12501 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
12502 parameter Force to issue the error message even on internal node (used
12503 for generated end label). Call Check_Restriction to check when an error
12504 must be issued. In SPARK mode, issue an error message even if the
12505 restriction is not set.
12506 (Check_Restriction): new procedure with an additional out parameter to
12507 inform the caller that a message has been issued
12508 * sem_aggr.adb: Minor modification of message
12509 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
12510 instead of issuing an error message directly
12511 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
12512 declarations are not placed after later declarations, by calling
12513 Check_Later_Vs_Basic_Declarations
12514 (Analyze_Subtype_Declaration): move here the check that an index or
12515 discriminant constraint must be a subtype mark. Change the check that
12516 a subtype of String must start at one so that it works on subtype marks.
12517 * sem_ch4.adb (Analyze_Call): move here the check that a named
12518 association cannot follow a positional one in a call
12519 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
12520 instead of issuing an error message directly
12521 * sem_ch8.adb (Find_Selected_Component): move here the check that a
12522 selector name is not a character literal or an operator symbol. Move
12523 here the check that the prefix of an expanded name cannot be a
12524 subprogram or a loop statement.
12525 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
12526 procedure called from parsing and semantics to check that basic
12527 declarations are not placed after later declarations
12528 (Process_End_Label): move here the check that end label is not missing
12530 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12532 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
12533 representation clause in codepeer mode, since it confuses CodePeer and
12534 does not bring useful info.
12536 2011-08-02 Ed Falis <falis@adacore.com>
12538 * init.c: initialize fp hw on MILS.
12540 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12542 * errout.adb (First_Node): for bodies, return the node itself (small
12543 optimization). For other nodes, do not check source_unit if the node
12544 comes from Standard.
12546 2011-08-02 Robert Dewar <dewar@adacore.com>
12548 * exp_ch3.adb: Minor comment additions.
12549 * sem_ch13.adb: Minor reformatting.
12551 2011-08-02 Pascal Obry <obry@adacore.com>
12553 * make.adb, makeutl.adb: Removes some superfluous directory separator.
12555 2011-08-02 Robert Dewar <dewar@adacore.com>
12557 * sem_attr.adb: Minor reformatting.
12559 2011-08-02 Robert Dewar <dewar@adacore.com>
12561 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
12562 (Has_Default_Component_Value): Removed
12563 * einfo.ads Comment updates
12564 (Has_Default_Aspect): Replaces Has_Default_Value
12565 (Has_Default_Component_Value): Removed
12567 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
12569 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
12570 (Get_Simple_Init_Val): Handle Default_Value aspect
12571 (Needs_Simple_Initialization): Handle Default_Value aspect
12572 * exp_ch3.ads: Needs_Simple_Initialization
12573 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
12574 * par-prag.adb (Pragma_Default[_Component]Value) Removed
12576 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
12577 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
12578 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
12580 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12582 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
12583 package containing iteration primitives.
12584 exp_ch5.adb (Expand_Iterator_Loop): ditto.
12586 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12588 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
12589 "of", pre-analyze expression in case it is a function call with
12590 finalization actions that must be placed ahead of the loop.
12591 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
12592 on an Ada2012 iterator, insert them ahead of the rewritten loop.
12594 2011-08-02 Geert Bosch <bosch@adacore.com>
12596 * cstand.adb (Create_Float_Types): Only consider C's long double for
12597 Long_Long_Float, in addition to double.
12599 2011-08-02 Robert Dewar <dewar@adacore.com>
12601 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
12602 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
12603 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
12604 Minor reformatting.
12606 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12608 * sem_attr.adb: handle properly 'Result when it is a prefix of an
12611 2011-08-02 Javier Miranda <miranda@adacore.com>
12613 * einfo.ads, einfo.adb
12614 (Original_Access_Type): Move this attribute to Node26 since there was
12615 an undocumented use of Node21 in E_Access_Subprogram_Type entities
12616 which causes conflicts and breaks the generation of the .NET compiler.
12617 (Interface_Name): Add missing documentation on JGNAT only uses of
12620 2011-08-02 Geert Bosch <bosch@adacore.com>
12622 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
12623 (Find_Back_End_Float_Type): Likewise
12624 (Create_Back_End_Float_Types): Likewise
12625 (Create_Float_Types): Likewise
12626 (Register_Float_Type): Likewise
12627 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
12628 Nlist and split out type selection in new local Find_Base_Type function.
12629 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
12631 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
12633 2011-08-02 Robert Dewar <dewar@adacore.com>
12635 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
12637 * opt.ads: Minor comment change.
12638 * sem_ch12.adb: Minor code reorganization.
12640 2011-08-02 Gary Dismukes <dismukes@adacore.com>
12642 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
12643 subtype's list of rep items to the list on the full subtype in the case
12644 where the lists are the same.
12646 2011-08-02 Geert Bosch <bosch@adacore.com>
12648 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
12649 using the one from System.Strings, which also deallocates all strings.
12651 2011-08-02 Geert Bosch <bosch@adacore.com>
12653 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
12655 * gcc-interface/Make-lang.in: Update dependencies.
12657 2011-08-02 Olivier Hainque <hainque@adacore.com>
12659 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
12662 2011-08-02 Javier Miranda <miranda@adacore.com>
12664 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
12665 associated with anonymous access to subprograms.
12667 2011-08-02 Geert Bosch <bosch@adacore.com>
12670 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
12671 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
12672 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
12673 (Add_Symbol_Definition): Move to switch-c.adb
12674 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
12675 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
12676 (Add_Symbol_Definition): Move to switch-c.adb.
12677 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
12679 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12680 Move to warnsw.adb.
12681 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
12682 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
12683 Move to warnsw.adb.
12684 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
12685 (Add_Symbol_Definition): Moved from Prepcomp.
12686 * switch-c.ads: Update copyright notice. Use String_List instead of
12687 Argument_List, removing dependency on System.OS_Lib.
12689 2011-08-02 Yannick Moy <moy@adacore.com>
12691 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
12692 mode on initialization expression which does not respect SPARK
12694 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
12695 if the tree referenced by its argument represents an initialization
12696 expression in SPARK, suitable for initializing an object in an object
12699 2011-08-02 Javier Miranda <miranda@adacore.com>
12701 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
12702 internally generated access to subprogram with its associated protected
12704 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
12706 2011-08-02 Geert Bosch <bosch@adacore.com>
12708 * cstand.adb (Register_Float_Type): Print information about type to
12709 register, if the Debug_Flag_Dot_B is set.
12710 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
12711 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
12712 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
12713 with a requested precision of more than Max_Digits digits and no more
12714 than Max_Base_Digits digits, if a range specification is present and the
12715 Predefined_Float_Types list has a suitable type to derive from.
12716 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
12717 case of type completion with pragma Import
12719 (Process_Import_Predefined_Type): Processing to complete a type
12720 with pragma Import. Currently supports floating point types only.
12721 (Set_Convention_From_Pragma): Do nothing without underlying type.
12722 (Process_Convention): Guard against absence of underlying type,
12723 which may happen when importing incomplete types.
12724 (Process_Import_Or_Interface): Handle case of importing predefined
12725 types. Tweak error message.
12727 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12729 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
12730 functions to previous change. Reorganize code slightly.
12732 2011-08-02 Geert Bosch <bosch@adacore.com>
12734 * back_end.ads (Register_Type_Proc): New call back procedure type for
12735 allowing the back end to provide information about available types.
12736 (Register_Back_End_Types): New procedure to register back end types.
12737 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
12739 * cstand.adb (Back_End_Float_Types): New list for floating point types
12740 supported by the back end.
12741 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
12742 (Copy_Float_Type): New procedure to make new copies of predefined types.
12743 (Register_Float_Type): New call back procedure to populate the BEFT list
12744 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
12745 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
12746 (Create_Float_Types): New procedure to create entities for floating
12747 point types predefined in Standard, and put these and any remaining
12748 BEFTs on the Predefined_Float_Types list.
12749 * stand.ads (Predefined_Float_Types): New list for predefined floating
12750 point types that do not have declarations in package Standard.
12752 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12754 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
12755 entity node for the unit containing the parameter.
12756 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
12757 (Add_Inlined_Subprogram): Likewise.
12758 * gcc-interface/Make-lang.in: Update dependencies.
12760 2011-08-02 Thomas Quinot <quinot@adacore.com>
12762 * s-stusta.adb (Print): Make sure Pos is always initialized to a
12765 2011-08-02 Geert Bosch <bosch@adacore.com>
12767 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
12769 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12771 * sem_type.adb (Covers): Move trivial case to the top and reuse the
12772 computed value of Base_Type.
12774 2011-08-02 Yannick Moy <moy@adacore.com>
12776 * restrict.adb (Check_Restriction): issue an error for any use of
12777 class-wide, even if the No_Dispatch restriction is not set.
12778 * sem_aggr.adb: Correct typos in comments and messages in formal mode
12779 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
12780 when completing a private extension, the type named in the private part
12781 is not the same as that named in the visible part.
12782 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
12783 of an inherited primitive operations of a tagged type or type extension
12784 that returns the tagged type.
12785 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
12786 function which returns True for an implicit operation inherited by the
12787 derived type declaration for the argument type.
12788 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
12791 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12793 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
12794 Process_Bounds, to perform analysis with expansion of a range or an
12795 expression that is the iteration scheme for a loop.
12796 (Analyze_Iterator_Specification): If domain of iteration is given by a
12797 function call with a controlled result, as is the case if call returns
12798 a predefined container, ensure that finalization actions are properly
12800 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
12802 2011-08-02 Javier Miranda <miranda@adacore.com>
12804 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
12805 * gcc-interface/Make-lang.in: Update dependencies.
12807 2011-08-02 Javier Miranda <miranda@adacore.com>
12809 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
12810 determine if the analysis is performed using N or Original_Node (N).
12811 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
12812 functionality of routine Is_Variable avoids code duplication.
12813 * checks.adb (Determine_Range): Handle temporaries generated by
12814 Remove_Side_Effects.
12816 2011-08-02 Javier Miranda <miranda@adacore.com>
12818 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
12819 expansion of the condition. Required since the previous analysis was
12820 done with expansion disabled (see Resolve_Quantified_Expression) and
12821 hence checks were not inserted and record comparisons have not been
12824 2011-08-02 Ed Falis <falis@adacore.com>
12826 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
12829 2011-08-02 Bob Duff <duff@adacore.com>
12831 * opt.ads: Minor comment fix.
12833 2011-08-02 Bob Duff <duff@adacore.com>
12835 * sem_ch12.adb (Analyze_Package_Instantiation,
12836 Analyze_Subprogram_Instantiation): Turn off style checking while
12837 analyzing an instance. Whatever style checks that apply to the generic
12838 unit should apply, so it makes no sense to apply them in an instance.
12839 This was causing trouble when compiling an instance of a runtime
12840 unit that violates the -gnatyO switch.
12841 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
12842 one of the two case statements, causing spurious errors.
12844 2011-08-02 Robert Dewar <dewar@adacore.com>
12846 * uname.adb: Minor reformatting.
12847 * gnatcmd.adb: Minor reformatting.
12848 * exp_attr.adb: Minor reformatting.
12850 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12852 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
12853 No_Dispatching_Calls, do not look for the Assign primitive, because
12854 predefined primitives are not created in this case.
12856 2011-08-02 Bob Duff <duff@adacore.com>
12858 * stylesw.ads: Minor comment fixes.
12860 2011-08-02 Robert Dewar <dewar@adacore.com>
12862 * freeze.adb (Add_To_Result): New procedure.
12864 2011-08-02 Jose Ruiz <ruiz@adacore.com>
12866 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
12867 time, if the specific run-time routines for handling streams of strings
12868 are not available, use the default mechanism.
12870 2011-08-02 Arnaud Charlet <charlet@adacore.com>
12872 * s-regpat.ads: Fix typo.
12874 2011-08-02 Vincent Celier <celier@adacore.com>
12876 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
12877 not null, call it to create the in memory config project file without
12878 parsing an existing default config project file.
12880 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12882 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
12884 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12886 * sem_elim.adb: an abstract subprogram does not need an eliminate
12887 pragma for its descendant to be eliminable.
12889 2011-08-02 Ed Falis <falis@adacore.com>
12891 * init.c: revert to handling before previous checkin for VxWorks
12892 * s-intman-vxworks.adb: delete unnecessary declarations related to
12893 using Ada interrupt facilities for handling signals.
12894 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
12895 * s-intman-vxworks.ads: Import __gnat_install_handler as
12896 Initialize_Interrupts.
12897 * s-taprop-vxworks.adb: Delete Signal_Mask.
12898 (Abort_Handler): change construction of mask to unblock exception
12901 2011-08-02 Jerome Guitton <guitton@adacore.com>
12903 * a-except-2005.adb (Raise_From_Signal_Handler): Call
12904 Debug_Raise_Exception before propagation starts.
12906 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
12908 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
12909 to Restriction_Check_Required.
12910 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
12911 * sem_res.adb (Resolve_Call): Likewise.
12912 * sem_attr.adb (Check_Stream_Attribute): Likewise.
12914 2011-08-02 Bob Duff <duff@adacore.com>
12916 * stylesw.ads: Update comment.
12917 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
12918 * errout.ads: Remove obsolete comment.
12920 2011-08-02 Javier Miranda <miranda@adacore.com>
12922 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
12923 (Set_Is_Safe_To_Reevaluate): new procedure.
12924 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
12925 assignment is allowed on safe-to-reevaluate variables.
12926 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
12927 temporary created to remove side effects in expressions that use
12928 the secondary stack as safe-to-reevaluate.
12929 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
12930 variables that are not true constants.
12932 2011-08-02 Robert Dewar <dewar@adacore.com>
12934 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
12935 sem_res.adb, sem_ch6.adb: Minor reformatting.
12937 2011-08-02 Jerome Guitton <guitton@adacore.com>
12939 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
12941 2011-08-02 Ed Schonberg <schonberg@adacore.com>
12943 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
12944 not set Overridden_Operation if subprogram is an initialization
12947 2011-08-02 Yannick Moy <moy@adacore.com>
12949 * par-ch6.adb: Correct obsolete name in comments
12950 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
12951 which takes two message arguments (existing function takes one), with
12952 second message used for continuation.
12953 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
12954 block statements that originate from a source block statement, not
12955 generated block statements
12956 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
12957 symmetry with procedure case
12958 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
12959 function to issue an error in formal mode if a package specification
12960 contains more than one tagged type or type extension.
12961 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
12962 parameters matching formals of tagged types are objects (or ancestor
12963 type conversions of objects), not general expressions. Issue an error
12964 on view conversions that are not involving ancestor conversion of an
12966 (Resolve_Type_Conversion): in formal mode, issue an error on the
12967 operand of an ancestor type conversion which is not an object
12968 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
12969 procedure so that it works also for actuals of function calls
12970 (Is_Actual_Tagged_Parameter): new function which determines if its
12971 argument is an actual parameter of a formal of tagged type in a
12973 (Is_SPARK_Object_Reference): new function which determines if the tree
12974 referenced by its argument represents an object in SPARK
12976 2011-08-02 Robert Dewar <dewar@adacore.com>
12978 * sem_ch3.adb: Minor reformatting
12979 Minor comment addition
12980 Minor error msg text change
12982 2011-08-02 Javier Miranda <miranda@adacore.com>
12984 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
12985 function. Used to be more precise when we generate a variable plus one
12986 assignment to remove side effects in the evaluation of the Bound
12988 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
12989 of the bound expression to force its re-analysis and thus expand the
12990 associated transient scope (if required). Code cleanup replacing the
12991 previous code that declared the constant entity by an invocation to
12992 routine Force_Evaluation which centralizes this work in the frontend.
12994 2011-08-02 Robert Dewar <dewar@adacore.com>
12996 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
12997 (Base_Type): Now uses improved Is_Base_Type function
12998 * einfo.ads (Base_Type): Inline this function
13000 2011-08-02 Robert Dewar <dewar@adacore.com>
13002 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
13003 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
13005 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13007 * gcc-interface/Make-lang.in: Update dependencies.
13008 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
13011 2011-08-02 Yannick Moy <moy@adacore.com>
13013 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
13014 non-simple expression used in delta constraint
13015 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
13016 index constraint which is not a subtype mark
13017 * par.adb: With and use Restrict
13018 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
13019 mode on component type which is not a subtype mark and default
13020 expression on component
13021 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
13022 of string which does not have a lower index bound equal to 1
13023 (Array_Type_Declaration): issue an error in formal mode on index or
13024 component type which is not a subtype mark, and on aliased keyword on
13026 (Derived_Type_Declaration): issue an error in formal mode on interface,
13027 limited or abstract type
13028 (Record_Type_Declaration): issue an error in formal mode on interface
13029 (Record_Type_Definition): issue an error in formal mode on tagged types
13030 and type extensions not declared in the specification of a library unit
13031 package; on null non-tagged record; on variant part
13033 2011-08-02 Vincent Celier <celier@adacore.com>
13035 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
13036 not declared for qualified library project when Library_Name is not
13037 declared, but Library_Dir is.
13039 2011-08-02 Robert Dewar <dewar@adacore.com>
13041 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
13042 pragmas (affects aspects [Component_]Default_Value
13043 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
13044 component type for the resolution
13046 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13048 * einfo.adb (Base_Type): Tune implementation for speed.
13050 2011-08-02 Robert Dewar <dewar@adacore.com>
13052 * freeze.adb: Minor reformatting.
13054 2011-08-02 Thomas Quinot <quinot@adacore.com>
13056 * scos.ads: Update comments.
13058 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13060 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
13061 base type, because the parent may be a subtype of a private type whose
13062 convention is established in a private part.
13064 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13066 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
13067 statement in a block when the expansion of the return expression has
13068 created a finalization chain.
13069 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
13070 with the parent node.
13071 Add N_Extended_Return_Statement to handle the case where a transient
13072 object declaration appears in the Return_Object_Declarations list of
13073 an extended return statement.
13075 2011-08-02 Matthew Gingell <gingell@adacore.com>
13077 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
13078 unused parameter 'name'.
13080 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13082 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
13083 inherited operation, check whether its alias, which is the source
13084 operastion that it renames, has been marked eliminated.
13086 2011-08-02 Javier Miranda <miranda@adacore.com>
13088 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
13089 in-mode parameter whose type is an access type since it can be used to
13090 modify its designated object. Enforce code that handles as safe an
13091 access type that is not access-to-constant but it is the result of a
13092 previous removal of side-effects.
13093 (Remove_Side_Effects): Minor code reorganization of cases which require
13094 no action. Done to incorporate documentation on new cases uncovered
13095 working in this ticket: no action needed if this routine was invoked
13096 too early and the nodes are not yet decorated.
13097 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
13098 to routine Remove_Side_Effects by calls to Force_Evaluation since they
13099 were issued with actuals that are implicitly provided by
13102 2011-08-02 Robert Dewar <dewar@adacore.com>
13104 * sem_ch3.adb, sem_res.adb: Minor reformatting.
13106 2011-08-02 Yannick Moy <moy@adacore.com>
13108 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
13109 to issue an error in formal mode on attribute not supported in this mode
13110 (Analyze_Attribute): issue errors on standard attributes not supported
13112 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
13113 comment, and issue error in formal mode on modulus which is not a power
13115 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
13117 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
13119 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
13120 operator on modular type (except 'not').
13122 2011-08-02 Robert Dewar <dewar@adacore.com>
13124 * gnat_rm.texi: Minor reformatting.
13126 2011-08-02 Arnaud Charlet <charlet@adacore.com>
13128 * s-osinte-linux.ads: Minor comment update and reformatting.
13129 * i-cexten.ads: Make this unit pure, as for its parent.
13130 Will allow its usage in more contexts if needed.
13132 2011-08-02 Robert Dewar <dewar@adacore.com>
13134 * s-utf_32.ads: Minor comment fix.
13136 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13138 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
13139 operation of a tagged synchronized type, handle the case where the
13140 controlling argument is overloaded.
13142 2011-08-02 Yannick Moy <moy@adacore.com>
13144 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
13145 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
13146 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
13147 SPARK mode and formal verification mode on processing SPARK restriction
13148 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
13149 requiring consistency checking.
13151 2011-08-02 Robert Dewar <dewar@adacore.com>
13153 * sem_res.adb: Minor reformatting.
13155 2011-08-02 Robert Dewar <dewar@adacore.com>
13157 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13158 a-cforse.ads: Remove unneeded with of Ada.Containers
13159 Remove commented out pragma Inline's
13160 Move specifications of new subprograms to the actual specs
13162 2011-08-02 Yannick Moy <moy@adacore.com>
13164 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13165 a-cforse.ads: Update comments.
13167 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13169 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
13171 2011-08-02 Robert Dewar <dewar@adacore.com>
13173 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13174 a-cforse.ads, a-cofove.ads: Minor reformatting.
13176 2011-08-02 Claire Dross <dross@adacore.com>
13178 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
13179 a-cofove.ads: Add comments.
13181 2011-08-02 Yannick Moy <moy@adacore.com>
13183 * gnat_rm.texi: Document formal containers.
13185 2011-08-02 Emmanuel Briot <briot@adacore.com>
13187 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
13188 are empty sections.
13190 2011-08-02 Robert Dewar <dewar@adacore.com>
13192 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
13195 2011-08-02 Robert Dewar <dewar@adacore.com>
13197 * aspects.adb: New aspects Default_Value and Default_Component_Value
13198 New format of Aspect_Names table checks for omitted entries
13199 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
13200 handling of boolean aspects for derived types.
13201 New aspects Default_Value and Default_Component_Value
13202 New format of Aspect_Names table checks for omitted entries
13203 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
13204 (Has_Default_Value): New flag
13205 (Has_Default_Component_Value): New flag
13206 (Has_Default_Value): New flag
13207 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
13209 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
13210 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
13211 Default_Value and Default_Component_Value
13212 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
13213 New aspects Default_Value and Default_Component_Value
13214 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
13215 * sprint.adb: Print N_Aspect_Specification node when called from gdb
13217 2011-08-02 Vincent Celier <celier@adacore.com>
13219 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
13220 inherit library kind.
13222 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13224 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
13225 Minor reformatting.
13227 2011-08-02 Robert Dewar <dewar@adacore.com>
13229 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
13231 2011-08-02 Yannick Moy <moy@adacore.com>
13233 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
13235 2011-08-02 Robert Dewar <dewar@adacore.com>
13237 * impunit.adb: Add comment.
13239 2011-08-02 Yannick Moy <moy@adacore.com>
13241 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
13242 qualification of aggregates in formal mode
13243 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
13245 (Resolve_Aggregate): complete the test that an aggregate is adequately
13246 qualified in formal mode
13248 2011-08-02 Pascal Obry <obry@adacore.com>
13250 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
13251 * mlib-prj.adb: Supress warning when compiling binder generated file.
13252 (Build_Library): Supress all warnings when compiling the binder
13255 2011-08-02 Yannick Moy <moy@adacore.com>
13257 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
13259 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
13260 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
13261 Add with/use clauses to make Check_Formal_Restriction visible
13263 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13265 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
13266 in-parameters when type of the generic formal is private in the generic
13267 spec and non-private in the body.
13269 2011-08-02 Claire Dross <dross@adacore.com>
13271 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
13272 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
13273 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
13274 * impunit.adb, Makefile.rtl: Take new files into account.
13276 2011-08-02 Robert Dewar <dewar@adacore.com>
13278 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
13279 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13281 2011-08-02 Yannick Moy <moy@adacore.com>
13283 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
13285 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
13286 matching static array bounds, taking into account the special case of
13288 * sem_ch3.adb: Typo in comment.
13290 2011-08-02 Yannick Moy <moy@adacore.com>
13292 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
13293 which issues an error in formal mode if its argument node is originally
13295 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
13296 has a discriminant specification so that it does not include the case
13298 (Derived_Type_Declaration): move here the test that a derived type has a
13299 discriminant specification
13300 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
13301 first element of a component association before accessing its choices
13302 (presence of component association is not enough)
13303 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
13304 declaration is a library item before accessing the next element in a
13305 list, as library items are not member of lists
13306 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
13307 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
13308 Check_Formal_Restriction whenever possible.
13310 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13312 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
13313 reference when needed.
13315 2011-08-02 Bob Duff <duff@adacore.com>
13317 * gnat_ugn.texi: Fix typo.
13319 2011-08-02 Vincent Celier <celier@adacore.com>
13321 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
13322 archive file name. Do not use the full path name of archives for Open
13325 2011-08-02 Robert Dewar <dewar@adacore.com>
13327 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
13328 Analyze_Aspect_Specifications
13330 (Analyze_Aspect_Specifications): New handling for boolean aspects
13331 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
13332 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
13333 sequence for Analyze_Aspect_Specifications
13334 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
13335 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
13337 2011-08-02 Robert Dewar <dewar@adacore.com>
13339 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
13340 aspects, since these no longer exist.
13342 2011-08-02 Robert Dewar <dewar@adacore.com>
13344 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
13345 semicolon, do not try to see if there are aspects following it.
13346 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
13349 2011-08-02 Robert Dewar <dewar@adacore.com>
13351 * sem_ch8.adb, aspects.ads: Minor reformatting.
13353 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13355 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
13356 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
13358 (Analyze_Aspect_Specifications): ...here. Call above procedure.
13360 2011-08-02 Yannick Moy <moy@adacore.com>
13362 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
13363 mode on subprogram declaration outside of package specification, unless
13364 it is followed by a pragma Import
13365 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
13366 Access_Type_Declaration): issue error in formal mode on access type
13367 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
13369 (Analyze_Object_Declaration): issue error in formal mode on object
13370 declaration which does not respect SPARK restrictions
13371 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
13372 declaration which does not respect SPARK restrictions
13373 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
13374 error in formal mode on digits or delta constraint
13375 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
13376 decimal fixed point type
13377 (Derived_Type_Declaration): issue error in formal mode on derived type
13378 other than type extensions of tagged record types
13379 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
13380 with check on access definition
13381 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
13382 mode on protected definition.
13383 (Analyze_Task_Definition): issue error in formal mode on task definition
13385 2011-08-02 Robert Dewar <dewar@adacore.com>
13387 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
13389 2011-08-02 Javier Miranda <miranda@adacore.com>
13391 * sem_ch6.adb (Can_Override_Operator): New function.
13392 (Verify_Overriding_Indicator): Add missing code to check overriding
13393 indicator in operators. Fixes regression.
13394 (Check_Overriding_Indicator): Minor reformating after replacing the
13395 code that evaluates if the subprogram can override an operator by
13396 invocations to the above new function.
13398 (Write_Field26_Name): Add missing code to ensure that, following
13399 the documentation in einfo.ads, this field is not shown as attribute
13400 "Static_Initialization" on non-dispatching functions.
13402 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13404 * sem_res.adb (Resolve_Call): A call to
13405 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
13406 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
13407 i.e., when the second parameter is of type Time_Span.
13409 2011-08-02 Vincent Celier <celier@adacore.com>
13411 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
13412 with an archive instead of -L<library dir> -l<library name>.
13414 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13416 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
13417 mark the base types In_Use in addition to making the operations
13420 2011-08-02 Ed Falis <falis@adacore.com>
13422 * init.c: add and setup __gnat_signal_mask for the exception signals
13423 * s-inmaop-vxworks.adb: new file.
13424 * s-intman-vxworks.adb: remove unnecessary initializations and
13426 * s-intman-vxworks.ads: remove unnecessary variable
13427 * s-taprop-vxworks.adb: simplify signal initialization
13429 2011-08-02 Robert Dewar <dewar@adacore.com>
13431 * sem_ch8.adb: Minor code reorganization, comment updates.
13433 2011-08-02 Robert Dewar <dewar@adacore.com>
13435 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
13436 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
13438 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
13439 (Matching_Static_Array_Bounds): Moved here from Sem_Res
13441 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13443 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
13444 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
13445 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
13446 use_type_clauses, to handle more efficiently use_type and use_all_type
13448 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
13449 Ada2012 Use_All_Type clause.
13450 (Use_Class_Wide_Operations): new procedure.
13452 2011-08-02 Robert Dewar <dewar@adacore.com>
13454 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
13455 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
13456 expression to expression function.
13458 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13460 * sem_ch4.adb: transform simple Ada2012 membership into equality only
13461 if types are compatible.
13463 2011-08-02 Yannick Moy <moy@adacore.com>
13465 * sem_res.adb (Matching_Static_Array_Bounds): new function which
13466 returns True if its argument array types have same dimension and same
13467 static bounds at each index.
13468 (Resolve_Actuals): issue an error in formal mode on actuals passed as
13469 OUT or IN OUT paramaters which are not view conversions in SPARK.
13470 (Resolve_Arithmetic_Op): issue an error in formal mode on
13471 multiplication or division with operands of fixed point types which are
13472 not qualified or explicitly converted.
13473 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
13474 Boolean or array type (except String) operands.
13475 (Resolve_Equality_Op): issue an error in formal mode on equality
13476 operators for array types other than String with non-matching static
13478 (Resolve_Logical_Op): issue an error in formal mode on logical operators
13479 for array types with non-matching static bounds. Factorize the code in
13480 Matching_Static_Array_Bounds.
13481 (Resolve_Qualified_Expression): issue an error in formal mode on
13482 qualified expressions for array types with non-matching static bounds.
13483 (Resolve_Type_Conversion): issue an error in formal mode on type
13484 conversion for array types with non-matching static bounds
13486 2011-08-02 Robert Dewar <dewar@adacore.com>
13488 * par-ch10.adb: Minor code reorganization (use Nkind_In).
13490 2011-08-02 Ed Schonberg <schonberg@adacore.com>
13492 * par-ch9.adb: save location of entry for proper error message.
13494 2011-08-02 Javier Miranda <miranda@adacore.com>
13496 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
13497 (Use_Full_View) which permits this routine to climb through the
13498 ancestors using the full-view of private parents.
13499 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
13500 Use_Full_View to true in calls to Is_Ancestor.
13501 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
13502 true in call to Is_Ancestor.
13503 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
13504 Use_Full_View to true in call to Is_Ancestor.
13505 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
13506 call to Is_Ancestor.
13507 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
13508 Use_Full_View to true in calls to Is_Ancestor.
13509 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
13510 Make_Select_Specific_Data_Table, Register_Primitive,
13511 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
13512 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
13513 to true in call to Is_Ancestor.
13514 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
13515 Use_Full_View to true in calls to Is_Ancestor.
13517 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
13518 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
13520 2011-08-02 Robert Dewar <dewar@adacore.com>
13522 * gnat_rm.texi: Minor reformatting.
13523 * sem_prag.adb: Minor reformatting.
13525 2011-08-02 Tristan Gingold <gingold@adacore.com>
13527 * vms_data.ads: Add VMS qualifier for -gnateP.
13529 2011-08-02 Robert Dewar <dewar@adacore.com>
13531 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
13532 * par-ch7.adb (P_Package): Proper placement of aspects for package
13533 decl/instantiation.
13534 * par-endh.adb (Check_End): Ad Is_Sloc parameter
13535 (End_Statements): Add Is_Sloc parameterr
13536 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
13537 (Check_End): Ad Is_Sloc parameter
13538 (End_Statements): Add Is_Sloc parameterr
13540 2011-08-02 Vincent Celier <celier@adacore.com>
13542 * ug_words: Add VMS qualifier equivalent to -gnateP:
13543 /SYMBOL_PREPROCESSING.
13545 2011-08-02 Jose Ruiz <ruiz@adacore.com>
13547 * gnat-style.texi: For hexadecimal numeric literals the typical
13548 grouping of digits is 4 to represent 2 bytes.
13549 A procedure spec which is split into several lines is indented two
13552 2011-08-02 Yannick Moy <moy@adacore.com>
13554 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
13555 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
13556 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
13558 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
13559 choice in array aggregate
13560 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
13562 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
13563 positional and named aggregate for record, or others in record
13564 aggregate, or multiple choice in record aggregate
13565 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
13566 array operands to logical operations AND, OR and XOR do not have the
13567 same static lower and higher bounds
13568 * sem_ch5.adb, sinfo.ads: Correct typos in comments
13570 2011-08-01 Robert Dewar <dewar@adacore.com>
13572 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
13573 Replaces Last_Source_Node_In_Sequence.
13574 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
13575 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
13576 parens and blank in string (this was inconsistently implemented).
13578 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
13579 blank in string (this was inconsistently implemented).
13581 (Set_Global_Switches): Set formal mode switches appropriately
13582 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
13584 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
13585 call Set_Error_Msg_Lang to set "spark" as language name.
13586 * par.adb: Remove unnecessary call to set formal language for errout
13587 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
13588 appropriately and call Set_Error_Msg_Lang to set "spark" as language
13590 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
13591 calls to it, moved after resolution so that types are known
13592 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
13593 result of concatenation is not of type String
13594 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
13595 concatenation is not properly restricted
13596 * gnat_rm.texi: Add doc on pragma Spark_95.
13597 * gcc-interface/Makefile.in: Remove obsolete target pairs for
13598 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
13599 * gcc-interface/Make-lang.in: Update dependencies.
13601 2011-08-01 Javier Miranda <miranda@adacore.com>
13603 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
13604 condition that detects if the overridden operation must replace an
13607 2011-08-01 Javier Miranda <miranda@adacore.com>
13609 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
13610 code declarations inserted by Insert_Actions in each alternative of the
13611 N_Case_Expression node.
13613 2011-08-01 Robert Dewar <dewar@adacore.com>
13615 * sem_ch6.adb: Minor code reorganization.
13616 * sem_util.adb: Minor reformatting.
13618 2011-08-01 Pascal Obry <obry@adacore.com>
13620 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
13621 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
13623 2011-08-01 Yannick Moy <moy@adacore.com>
13625 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
13626 literal or operator symbol which is prefixed
13627 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
13628 mode on access attributes.
13629 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
13630 that concatenation operands are properly restricted in formal mode
13631 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
13632 Analyze_Concatenation_Operand. Issue an error in formal mode if the
13633 result of the concatenation has a type different from String.
13634 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
13635 Analyze_Quantified_Expression, Analyze_Slice,
13636 Analyze_Null): issue an error in formal mode on unsupported constructs
13638 (Analyze_Block_Statement): only issue error on source block statement
13639 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
13640 function which returns the last node in a list of nodes for which
13641 Comes_From_Source returns True, if any
13642 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
13643 Last_Source_Node_In_Sequence
13644 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
13645 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
13646 mode on unsupported constructs
13647 * sem_ch9.adb Do not return after issuing error in formal mode, as the
13648 rest of the actions may be needed later on since the error is marked as
13650 * sinfo.ads: Typos in comments.
13652 2011-08-01 Pascal Obry <obry@adacore.com>
13654 * projects.texi: Minor editing.
13656 2011-08-01 Yannick Moy <moy@adacore.com>
13658 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
13659 insertion character ~~
13660 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
13661 (Set_Error_Msg_Lang): new procedure which fixes the language for use
13662 with insertion character ~~
13663 (Set_Msg_Text): treat insertion character ~~
13664 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
13665 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
13666 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
13667 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
13668 errors related to the formal language restriction not serious
13669 (insertion character |).
13670 * par.adb (Par): set formal language for error messages if needed
13671 * sem_ch6.adb (Check_Missing_Return): take into account possible
13672 generated statements at the end of the function
13673 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
13674 enumeration value to define a new pragma SPARK_95
13675 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
13676 SPARK_Version): new type and variables to store the SPARK version
13678 (SPARK_Mode): return True when SPARK_Version is set
13679 * par-prag.adb: Correct indentation
13680 (Prag): take Pragma_SPARK_95 into account
13681 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
13684 2011-08-01 Robert Dewar <dewar@adacore.com>
13686 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
13687 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
13688 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
13690 2011-08-01 Pascal Obry <obry@adacore.com>
13692 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
13693 Target_Name to Get_Path call.
13694 (Parse_Single_Project): Likewise.
13695 (Post_Parse_Context_Clause): Likewise.
13696 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
13697 Call Initialise_Project_Path with the proper Target_Name.
13698 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
13700 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
13701 with the proper Target_Name.
13702 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
13703 Part.Parse routine.
13704 (Parse_Project_And_Apply_Config): Likewise.
13705 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
13706 This is fine as this part of the code is supporting only native
13708 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
13709 is fine as this part of the code is supporting only native compilation.
13711 2011-08-01 Yannick Moy <moy@adacore.com>
13713 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
13714 of homonym, unless the homonym is one of the cases allowed in SPARK
13715 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
13716 package declaration occurring after a body.
13718 2011-08-01 Robert Dewar <dewar@adacore.com>
13720 * checks.adb, exp_ch4.adb: Minor reformatting.
13722 2011-08-01 Javier Miranda <miranda@adacore.com>
13724 * einfo.ads (Access_Disp_Table): Fix documentation.
13725 (Dispatch_Table_Wrappers): Fix documentation.
13727 2011-08-01 Pascal Obry <obry@adacore.com>
13729 * prj-env.adb, prj-env.ads: Minor reformatting.
13731 2011-08-01 Yannick Moy <moy@adacore.com>
13733 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
13734 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13735 procedures out of these packages.
13736 * errout.ads, errout.adb
13737 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
13738 procedures in of this package
13739 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
13740 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
13741 on misplaced later vs initial declarations, like in Ada 83
13742 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
13743 formal mode on attribute of private type whose full type declaration
13745 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
13746 package declaration inside a package specification
13747 (Analyze_Full_Type_Declaration): issue error in formal mode on
13748 controlled type or discriminant type
13749 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
13750 user-defined operator means that it should come from the source
13751 (New_Overloaded_Entity): issue error in formal mode on overloaded
13753 * sem_ch6.ads, sem_ch13.ads: typos in comments.
13755 2011-08-01 Thomas Quinot <quinot@adacore.com>
13757 * atree.adb: Minor reformatting.
13758 * checks.adb: Minor reformatting.
13760 2011-08-01 Vincent Celier <celier@adacore.com>
13762 * s-parame-vms-ia64.ads: Fix typo in comment
13764 * s-parame-vms-restrict.ads: Removed, unused.
13766 2011-08-01 Javier Miranda <miranda@adacore.com>
13769 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
13771 (Constrain_Index): Remove side effects in the evaluation of the bounds.
13772 * sem_ch3.ads, sem_ch3.adb
13773 (Is_Constant_Bound): New extended version of the subprogram that was
13774 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
13775 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
13776 * sem_aux.ads (Constant_Value): Fix typo in comment.
13777 * checks.adb (Generate_Index_Checks): New implementation which, for
13778 array objects with constant bounds, generates the runtime check
13779 referencing the bounds of the array type. For other cases this routine
13780 provides its previous behavior obtaining such values from the array
13782 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
13784 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
13785 we cannot have semantic interpretations of the new node.
13787 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13789 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
13792 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13794 * sem_ch8.adb: Minor code editing.
13795 * s-vxwext.adb: Remove trailing space.
13796 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
13797 consistency with other files.
13799 2011-08-01 Thomas Quinot <quinot@adacore.com>
13801 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
13803 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13805 * par-ch10.adb: reject parameterized expressions as compilation unit.
13806 * sem_ch4.adb: handle properly conditional expression with overloaded
13807 then_clause and no else_clause.
13809 2011-08-01 Tristan Gingold <gingold@adacore.com>
13811 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
13812 like done by System.Aux_DEC.
13813 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
13815 2011-08-01 Yannick Moy <moy@adacore.com>
13817 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
13818 missing label at end of declaration (subprogram or package)
13819 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
13820 of positional and named parameter association
13821 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
13822 Error_Msg_SP which adds a prefix to the error message giving the name
13823 of the formal language analyzed
13824 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
13825 access result type in subprogram, unconstrained array as result type,.
13826 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
13828 * sem_ch8.adb: Code clean up.
13830 2011-08-01 Javier Miranda <miranda@adacore.com>
13832 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
13833 * einfo.ads (Access_Disp_Table): Fix documentation.
13834 (Dispatch_Table_Wrappers): Fix documentation.
13835 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
13836 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
13837 to enforce the documentation of this attribute.
13838 (Set_Is_Interface): Cleanup the assertion.
13839 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
13840 the Underlying_Type entity before reading attribute Access_Disp_Table.
13841 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
13842 Locate the Underlying_Type before reading attribute Access_Disp_Table.
13843 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
13844 the Underlying_Type entity before reading attribute Access_Disp_Table.
13845 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
13846 Locate the Underlying_Type entity before reading attribute
13849 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13851 * s-poosiz.ads: Additional overriding indicators.
13853 2011-08-01 Yannick Moy <moy@adacore.com>
13855 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
13857 (Analyze_Iteration_Scheme): issue error in formal mode when loop
13858 parameter specification does not include a subtype mark.
13859 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
13860 formal mode on abstract subprogram.
13861 (Analyze_Subprogram_Specification): issue error in formal mode on
13862 user-defined operator.
13863 (Process_Formals): issue error in formal mode on access parameter and
13864 default expression.
13865 * sem_ch9.adb (Analyze_Abort_Statement,
13866 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
13867 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
13868 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
13869 Analyze_Requeue, Analyze_Selective_Accept,
13870 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
13871 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
13872 issue error in formal mode on user-defined raise statement.
13874 2011-08-01 Thomas Quinot <quinot@adacore.com>
13876 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
13877 declaration being hidden when overriding an implicit inherited
13879 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
13880 (-gnats), do not complain about a source file that contains only a
13883 2011-08-01 Ed Schonberg <schonberg@adacore.com>
13885 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
13886 variable if already set.
13888 2011-08-01 Arnaud Charlet <charlet@adacore.com>
13890 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
13891 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
13892 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
13893 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
13894 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
13895 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
13896 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
13897 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
13898 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
13899 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
13900 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
13901 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
13902 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
13903 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
13904 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
13905 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
13906 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
13907 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
13908 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
13909 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
13910 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
13911 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
13912 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
13913 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
13914 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
13915 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
13916 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
13917 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
13918 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
13919 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
13920 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
13921 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
13922 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
13923 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
13924 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
13925 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
13926 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
13927 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
13928 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
13929 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
13930 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
13931 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
13932 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
13933 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
13934 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
13935 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
13936 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
13937 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
13938 s-osinte-mingw.ads: Update to GPLv3 run-time license.
13939 Use GNAT instead of GNARL.
13941 2011-08-01 Bob Duff <duff@adacore.com>
13943 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
13944 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
13945 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
13948 2011-08-01 Yannick Moy <moy@adacore.com>
13950 * debug.adb (d.D) reverve flag for the SPARK mode
13951 (d.E) reverve flag for SPARK generation mode
13952 (d.F) reverve flag for Why generation mode
13953 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
13954 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
13955 functions which return True when the corresponding modes are set
13956 (Formal_Language): return "spark" or "alfa" when in formal verification
13958 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
13959 Error_Msg to prefix the error message with a tag giving the formal
13961 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
13962 message with a tag giving the formal language
13963 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
13965 (Analyze_Case_Statement): issue error in formal mode on case statement
13966 with a single "others" case alternative
13967 (Analyze_Exit_Statement): issue errors in formal mode on exit
13968 statements which do not respect SPARK restrictions
13969 (Analyze_Goto_Statement): issue error in formal mode on goto statement
13970 (Check_Unreachable_Code): always issue an error (not a warning) in
13971 formal mode on unreachable code (concerns both code after an infinite
13972 loop and after an unconditional jump, both not allowed in SPARK)
13973 * sem_ch6.adb (Analyze_Return_Statement): add call to
13974 Set_Return_Present for a procedure containing a return statement
13975 (already done for functions in Analyze_Function_Return)
13976 (Analyze_Function_Return): issue error in formal mode on extended
13977 return or if return is not last statement in function
13978 (Check_Missing_Return): issue error in formal mode if function does
13979 not end with return or if procedure contains a return
13980 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
13981 function to detect if there is an inner scope of its parameter S which
13984 2011-08-01 Thomas Quinot <quinot@adacore.com>
13986 * sem_ch6.ads: Minor reformatting.
13988 2011-08-01 Javier Miranda <miranda@adacore.com>
13990 * sem_util.adb (Abstract_Interface_List): Complete condition when
13991 processing private type declarations to avoid reading unavailable
13993 (Is_Synchronized_Tagged_Type): Complete condition when processing
13994 private extension declaration nodes to avoid reading unavailable
13997 2011-08-01 Thomas Quinot <quinot@adacore.com>
13999 * sem_ch3.adb: Minor reformatting.
14001 2011-08-01 Thomas Quinot <quinot@adacore.com>
14003 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
14004 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
14005 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
14006 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
14007 for VMS, instead parametrize the common implementation with
14008 System.Parameters declarations.
14010 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
14012 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
14014 2011-08-01 Tristan Gingold <gingold@adacore.com>
14016 * seh_init.c: Fix SEH handler installation on win64.
14018 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14020 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
14021 double analysis of an anonymous access to subprogram, because it can
14022 lead to improper sharing of profiles and a back-end crash.
14024 2011-08-01 Robert Dewar <dewar@adacore.com>
14026 * make.adb, sem_ch4.adb: Minor reformatting.
14027 * gcc-interface/Make-lang.in: Update dependencies.
14028 * sem_util.adb, exp_ch5.adb: Minor reformatting.
14030 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14032 * gnat_rm.texi: Fix definition of Long_Integer.
14034 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14036 * exp_aggr.adb: check limit size of static aggregate unconditionally,
14037 to prevent storage exhaustion.
14038 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
14039 finalized is a function body, insert the cleanup code before the final
14040 return statement, to prevent spurious warnings.
14041 * s-pooglo.ads: add overriding indicator.
14043 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14045 * sem_ch4.adb (Operator_Check): improve error message when both a
14046 with_clause and a use_clause are needed to make operator usage legal.
14047 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
14048 determine whether a compilation unit is visible within an other,
14049 either through a with_clause in the current unit, or a with_clause in
14050 its library unit or one one of its parents.
14052 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14054 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
14055 over an arbitrary expression of an array or container type.
14056 * lib-xref.adb: clarify comment.
14058 2011-08-01 Bob Duff <duff@adacore.com>
14060 * einfo.ads: Minor reformatting.
14061 * debug.adb: Minor comment improvement.
14063 2011-08-01 Javier Miranda <miranda@adacore.com>
14065 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
14066 consider hidden subprograms as valid candidates.
14068 2011-08-01 Arnaud Charlet <charlet@adacore.com>
14070 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
14072 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
14074 * gnat_ugn.texi: Fix typo.
14076 2011-08-01 Robert Dewar <dewar@adacore.com>
14078 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
14079 lib-xref.adb: Minor reformatting
14081 2011-08-01 Gary Dismukes <dismukes@adacore.com>
14083 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
14084 when to generate a call to Move_Final_List.
14085 (Has_Controlled_Parts): Remove this function.
14087 2011-08-01 Geert Bosch <bosch@adacore.com>
14089 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
14090 "," in choice list.
14092 2011-08-01 Thomas Quinot <quinot@adacore.com>
14094 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
14095 explicit raise of a predefined exception as Comes_From_Source if the
14096 original N_Raise_Statement comes from source.
14098 2011-08-01 Robert Dewar <dewar@adacore.com>
14100 * sinfo.ads: Add comment.
14101 * sem_ch6.adb: Minor reformatting.
14103 2011-08-01 Robert Dewar <dewar@adacore.com>
14105 * freeze.adb (Freeze_Entity): Refine check for bad component size
14106 clause to avoid rejecting confirming clause when atomic/aliased present.
14108 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14110 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
14111 better determine whether an entity reference is a write.
14112 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
14114 * lib-xref.adb (Output_References): Do no suppress a read reference at
14115 the same location as an immediately preceeding modify-reference, to
14116 handle properly in-out actuals.
14118 2011-08-01 Tristan Gingold <gingold@adacore.com>
14120 * env.c (__gnat_setenv) [VMS]: Refine previous change.
14122 2011-08-01 Quentin Ochem <ochem@adacore.com>
14124 * i-cstrin.adb (New_String): Changed implementation, now uses only the
14125 heap to compute the result.
14127 2011-08-01 Robert Dewar <dewar@adacore.com>
14129 * atree.ads: Minor reformatting.
14131 2011-08-01 Emmanuel Briot <briot@adacore.com>
14133 * g-expect.adb (Get_Command_Output): Fix memory leak.
14135 2011-08-01 Geert Bosch <bosch@adacore.com>
14137 * cstand.adb (P_Float_Type): New procedure to print the definition of
14138 predefined fpt types.
14139 (P_Mixed_Name): New procedure to print a name using mixed case
14140 (Print_Standard): Use P_Float_Type for printing floating point types
14141 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
14142 precision IEEE float.
14144 2011-08-01 Thomas Quinot <quinot@adacore.com>
14146 * sem_ch3.adb: Minor reformatting.
14148 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14150 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
14151 the completion of a generic function, insert the new body rather than
14152 rewriting the original.
14154 2011-08-01 Yannick Moy <moy@adacore.com>
14156 * sinfo.ads, errout.ads: Typos in comments.
14158 2011-08-01 Robert Dewar <dewar@adacore.com>
14160 * par-endh.adb: Minor reformatting.
14162 2011-08-01 Robert Dewar <dewar@adacore.com>
14164 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
14165 (Pre_Post_Aspects): New subtype.
14166 * par-ch12.adb (P_Generic): New syntax for aspects in packages
14167 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
14168 * par-ch7.adb (P_Package): Remove Decl parameter
14169 (P_Package): Handle new syntax for aspects (before IS)
14170 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
14172 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
14173 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
14174 (P_Package): Remove Decl parameter
14175 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
14177 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
14179 * sem_util.ads, sem_util.adb (Static_Boolean): New function
14180 * sinfo.ads: Document new syntax for aspects in packages etc.
14181 * sprint.adb: Handle new syntax of aspects before IS in package
14183 2011-08-01 Thomas Quinot <quinot@adacore.com>
14185 * atree.ads: Minor reformatting.
14186 * sem_prag.adb: Minor reformatting.
14188 2011-08-01 Robert Dewar <dewar@adacore.com>
14190 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
14191 case expr alternative.
14193 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14195 * sem_ch12.adb: Fix typo.
14197 2011-08-01 Geert Bosch <bosch@adacore.com>
14199 * sem_prag.adb (Check_No_Link_Name): New procedure.
14200 (Process_Import_Or_Interface): Use Check_No_Link_Name.
14201 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
14202 instead of Standard_Long_Long_Float_Size global. Preparation for
14203 eventual removal of per type constants.
14204 * exp_util.ads (Get_Stream_Size): New function returning the stream
14205 size value of subtype E.
14206 * exp_util.adb (Get_Stream_Size): Implement new function.
14207 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
14209 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
14211 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
14213 2011-08-01 Geert Bosch <bosch@adacore.com>
14215 * cstand.adb: Fix comments.
14216 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
14217 count of arguments.
14219 2011-08-01 Robert Dewar <dewar@adacore.com>
14221 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
14223 2011-08-01 Geert Bosch <bosch@adacore.com>
14225 * atree.ads: Fix comment.
14227 2011-08-01 Robert Dewar <dewar@adacore.com>
14229 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
14230 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
14231 * par.adb: Add with for Namet.Sp.
14232 * par-tchk.adb: Minor reformatting.
14234 2011-08-01 Vincent Celier <celier@adacore.com>
14236 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
14237 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
14238 of the init procedure of a SAL.
14239 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
14242 2011-08-01 Thomas Quinot <quinot@adacore.com>
14244 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
14247 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14249 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
14251 2011-08-01 Thomas Quinot <quinot@adacore.com>
14253 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
14254 conformant with its spec (return True only for types that have
14255 an overriding Initialize primitive operation that prevents them from
14256 having preelaborable initialization).
14257 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
14258 initialization for controlled types in Ada 2005 or later mode.
14260 2011-08-01 Robert Dewar <dewar@adacore.com>
14262 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
14264 (Same_Aspect): New function.
14265 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
14266 Type_Invariant, Precondition, Postcondition.
14267 * snames.ads-tmpl: Add Name_Type_Invariant.
14269 2011-08-01 Robert Dewar <dewar@adacore.com>
14271 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
14273 (Freeze_All_Ent): Fix error in handling inherited aspects.
14274 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
14275 already analyzed, but don't skip entire processing of a declaration,
14276 that's wrong in some cases of declarations being rewritten.
14277 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
14278 Don't delay for integer, string literals
14279 Treat predicates in usual manner for delay, remove special case code,
14281 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
14282 (Build_Predicate_Function): Update saved expression in aspect
14283 (Build_Invariant_Procedure): Update saved expression in aspect
14284 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
14285 of replacement of discriminant references if the reference is simple.
14287 2011-08-01 Robert Dewar <dewar@adacore.com>
14289 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
14290 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
14291 Static_Predicate and Dynamic_Predicate.
14292 (Build_Predicate_Function): Add processing for Static_Predicate
14293 and Dynamic_Predicate.
14294 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
14295 (From_Static_Predicate): New flag
14296 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
14298 2011-08-01 Robert Dewar <dewar@adacore.com>
14300 * usage.adb: Documentation cleanup for Ada version modes in usage.
14301 * expander.adb: Minor reformatting.
14303 2011-08-01 Robert Dewar <dewar@adacore.com>
14305 * atree.ads: Minor comment fix.
14306 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
14307 a-witeio.ads, sem_prag.adb: Minor reformatting.
14309 2011-08-01 Doug Rupp <rupp@adacore.com>
14311 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
14312 pointers. Use descrip.h header file for convenience. Add some
14315 2011-08-01 Robert Dewar <dewar@adacore.com>
14317 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
14318 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
14319 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
14321 (Check_Aspect_At_End_Of_Declarations): New procedure
14322 (Analye_Aspect_Specification): Minor changes for above procedures
14323 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
14324 specification node as well.
14326 2011-08-01 Pascal Obry <obry@adacore.com>
14328 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
14329 Windows files. Use GetFilesAttributes() in this case to check for file
14330 existence instead of returning with an error code.
14332 2011-08-01 Vincent Celier <celier@adacore.com>
14334 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
14335 High is above Source length.
14337 2011-08-01 Robert Dewar <dewar@adacore.com>
14339 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
14341 2011-08-01 Robert Dewar <dewar@adacore.com>
14343 * aspects.ads (Boolean_Aspects): New subtype.
14344 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
14345 for derived types in cases where the parent type and derived type have
14347 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
14348 with aspects when parent type also has aspects.
14349 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
14350 boolean expression at this point).
14351 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
14352 accordance with final decision on the Ada 2012 feature.
14353 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
14355 2011-08-01 Matthew Heaney <heaney@adacore.com>
14357 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
14359 2011-08-01 Pascal Obry <obry@adacore.com>
14361 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
14362 Fix Replace_Slice when High is above current string size.
14363 (Replace_Slice): Fix DL computation when High is above current
14366 2011-08-01 Gary Dismukes <dismukes@adacore.com>
14368 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
14370 2011-08-01 Matthew Heaney <heaney@adacore.com>
14372 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
14375 2011-08-01 Pascal Obry <obry@adacore.com>
14377 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
14380 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14382 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
14383 access to protected subprograms in generic bodies.
14384 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
14385 protected type, indicate that the convention of the subprogram is
14386 Convention_Protected, because it may be used in subsequent declarations
14387 within the protected declaration.
14389 2011-08-01 Vincent Celier <celier@adacore.com>
14391 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
14392 and "final" procedures when the name of the library is "ada", to avoid
14393 duplicate symbols "adainit" and "adafinal" in executables.
14395 2011-08-01 Ed Schonberg <schonberg@adacore.com>
14397 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
14398 quantified expression that appears within a postcondition and uses the
14399 Ada2012 'Result attribute.
14401 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14403 * init.c (__gnat_error_handler): Cast reason to int.
14404 (__gnat_install_handler): Explain sa_sigaction use.
14406 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14408 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
14409 subprogram has copy-in copy-out parameters, try to promote the mode of
14410 the return type if it is passed in registers.
14412 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14414 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
14415 left operand as addressable.
14417 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
14419 * gcc-interface/gigi.h (build_function_stub): Remove.
14420 (build_return_expr): Likewise.
14421 (convert_vms_descriptor): Declare.
14422 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
14423 (build_function_stub): Move to...
14424 * gcc-interface/utils2.c (build_return_expr): Move to...
14425 * gcc-interface/trans.c (build_function_stub): ...here.
14426 (build_return_expr): ...here.
14427 (Subprogram_Body_to_gnu): Add local variable for language_function.
14428 Disconnect the parameter attributes cache, if any, once done with it.
14429 Call end_subprog_body only after setting the end_locus.
14430 Build the stub associated with the function, if any, at the very end.
14431 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
14432 variables and streamline control flow.
14434 2011-07-23 Arnaud Charlet <charlet@adacore.com>
14437 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
14438 g-trasym-dwarf.adb.
14440 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14443 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
14444 Assign to act.sa_sigaction.
14445 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
14446 current->return_address to char * before arithmetic.
14448 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14450 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
14451 Correct argument types.
14452 Extract code from reason.
14453 (__gnat_install_handler): Assign to act.sa_sigaction.
14455 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
14457 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
14458 (GNAT1_OBJS): ...here.
14460 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
14463 * g-socthi-mingw.adb (Fill): Fix formatting.
14465 * gcc-interface/gigi.h: Move around comment.
14467 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
14470 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
14472 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
14475 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
14477 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
14479 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
14480 range comparison if Pmode is SImode.
14482 2011-07-12 Laurent GUERBY <laurent@guerby.net>
14483 Eric Botcazou <ebotcazou@adacore.com>
14485 * adadecode.c: Wrap up in extern "C" block.
14486 * adadecode.h: Likewise.
14487 * adaint.c: Likewise. Remove 'const' keyword.
14488 * adaint.h: Likewise.
14489 * argv.c: Likewise.
14490 * atree.h: Likewise.
14492 * cstreams.c: Likewise.
14494 * exit.c: Likewise.
14496 * final.c: Likewise.
14497 * init.c: Likewise.
14498 * initialize.c: Likewise.
14499 * link.c: Likewise.
14500 * namet.h: Likewise.
14501 * nlists.h: Likewise.
14502 * raise.c: Likewise.
14503 * raise.h: Likewise.
14504 * repinfo.h: Likewise.
14505 * seh_init.c: Likewise.
14506 * targext.c: Likewise.
14507 * tracebak.c: Likewise.
14508 * uintp.h: Likewise.
14509 * urealp.h: Likewise.
14510 * xeinfo.adb: Wrap up generated C code in extern "C" block.
14511 * xsinfo.adb: Likewise.
14512 * xsnamest.adb: Likewise.
14513 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
14514 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
14515 * gcc-interface/misc.c: Likewise.
14516 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
14517 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
14518 ada/targext.o here...
14519 (GNAT_ADA_OBJS): ...and not here.
14520 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
14521 (GNATBIND_OBJS): Reorder.
14523 2011-07-07 Richard Henderson <rth@redhat.com>
14525 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
14526 dwarf2out_frame_init.
14528 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
14530 * gcc-interface/misc.c (gnat_init): Tweak previous change.
14532 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14535 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
14537 2011-07-06 Richard Guenther <rguenther@suse.de>
14539 * gcc-interface/misc.c (gnat_init): Merge calls to
14540 build_common_tree_nodes and build_common_tree_nodes_2.
14541 Re-initialize boolean_false_node.
14543 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
14544 Olivier Hainque <hainque@adacore.com>
14545 Nicolas Setton <setton@adacore.com>
14547 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
14548 the type according to the ARTIFICIAL_P parameter.
14549 (create_type_decl): Likewise.
14550 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
14552 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
14554 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
14555 (gnatbind): Likewise.
14557 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14559 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
14561 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14563 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
14564 local variable throughout. Remove useless call to Base_Type.
14565 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
14566 Take it also into account for the volatileness of the field. Set the
14567 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
14569 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14571 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
14572 on a dereference built for a by-ref object if it has an address clause.
14574 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
14576 * einfo.ads (Address_Taken): Document use for the second argument of
14577 Asm_Input and Asm_Output attributes.
14578 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
14579 argument is an entity name, then set Address_Taken on it.
14580 <Attribute_Asm_Output>: Likewise.
14581 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
14582 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
14583 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
14584 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
14586 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
14588 PR middle-end/46500
14589 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
14591 2011-06-14 Joseph Myers <joseph@codesourcery.com>
14593 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
14594 (ada/utils.o): Update dependencies.
14595 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
14596 ../../../libcpp/libcpp.a.
14597 * gcc-interface/utils.c: Include common/common-target.h.
14598 (process_attributes): Use targetm_common.have_named_sections.
14600 2011-06-07 Richard Guenther <rguenther@suse.de>
14602 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
14605 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14607 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
14608 TREE_THIS_NOTRAP flag.
14610 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14612 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
14615 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14617 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
14618 constants whose full view has discriminants specially.
14620 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
14622 * gcc-interface/utils.c: Include diagnostic.h.
14623 (gnat_write_global_declarations): Output debug information for all
14624 global type declarations before finalizing the compilation unit.
14625 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
14627 2011-05-25 Jakub Jelinek <jakub@redhat.com>
14629 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
14631 2011-05-25 Kai Tietz <ktietz@redhat.com>
14633 * adaint.c (__gnat_to_canonical_file_list_next): Use array
14634 initialization instead of const/none-const pointer assignment.
14636 2011-05-24 Joseph Myers <joseph@codesourcery.com>
14638 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
14639 $(EXTRA_GNAT1_OBJS).
14640 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
14641 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
14642 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
14643 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
14644 libcommon-target.a instead of prefix.o.
14646 2011-05-21 Joseph Myers <joseph@codesourcery.com>
14649 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
14651 2011-05-20 Joseph Myers <joseph@codesourcery.com>
14653 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
14654 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
14655 instead of version.o.
14657 2011-05-18 Kai Tietz <ktietz@redhat.com>
14659 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
14660 boolean_false_node instead of integer_zero_node.
14661 (convert_with_check): Likewise.
14662 * gcc-interface/decl.c (choices_to_gnu): Likewise.
14664 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
14666 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
14667 type of the parameter is an unconstrained array, convert the actual to
14668 the type of the formal in the In Out and Out cases as well.
14670 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
14672 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
14673 call build_function_type_array or build_varargs_function_type_array
14675 (create_subprog_type): Don't call build_function_type; call
14676 build_function_type_vec instead.
14678 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
14680 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
14681 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
14682 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
14684 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
14686 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
14688 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
14689 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
14691 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
14693 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
14695 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
14697 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
14698 instead of accessing TYPE_ARG_TYPES directly.
14699 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
14701 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
14704 * gcc-interface/gigi.h (get_variant_part): Declare.
14705 * gcc-interface/decl.c (get_variant_part): Make global.
14706 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
14707 types have the same constant size, are record types and T1 has a
14708 variant part while T2 doesn't.
14710 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
14712 * gcc-interface/utils.c (begin_subprog_body): Do not call
14714 (end_subprog_body): Likewise.
14716 2011-05-04 Richard Guenther <rguenther@suse.de>
14718 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
14720 (pos_to_constructor): Likewise.
14722 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
14723 Eric Botcazou <ebotcazou@adacore.com>
14725 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
14726 of build_function_type. Adjust calls to...
14727 (build_raise_check): ...this. Do not take a void_tree parameter.
14728 Call build_function_type_list instead of build_function_type.
14729 Fix head comment and swap couple of conditional blocks.
14731 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
14733 * gnatvsn.ads (Library_Version): Bump to 4.7.
14734 (Current_Year): Bump to 2011.
14736 2011-04-29 Michael Matz <matz@suse.de>
14738 * gcc-interface/misc.c (gnat_handle_option): Set
14739 warn_maybe_uninitialized.
14741 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
14743 * gnat_ugn.texi (Complexity Metrics Control): Update link to
14744 the Watson/McCabe paper.
14746 2011-04-23 Jim Meyering <meyering@redhat.com>
14748 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
14750 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14752 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
14755 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
14757 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
14759 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
14760 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
14761 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
14762 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
14763 <all>: Do not set flags on the reused DECL node coming from an alias.
14764 Set DECL_IGNORED_P on the DECL node built for subprograms if they
14765 don't need debug info here...
14766 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
14767 (gigi): Adjust calls to create_subprog_decl.
14768 (build_raise_check): Likewise.
14769 (establish_gnat_vms_condition_handler): Likewise.
14770 (Compilation_Unit_to_gnu): Likewise.
14771 (gnat_to_gnu): Likewise.
14773 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
14775 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
14776 (NO_REORDER_ADAFLAGS): New variable.
14777 (EXTRA_GNATTOOLS): Always define.
14778 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
14779 Clean up and adjust list of files compiled with special options.
14780 * gcc-interface/Make-lang.in: Likewise.
14781 (ada/decl.o): Cosmetical change.
14782 (ada/misc.o): Remove dependency on $(PLUGIN_H).
14784 2011-04-20 Jim Meyering <meyering@redhat.com>
14786 * initialize.c (__gnat_initialize): Remove useless if-before-free.
14788 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14790 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
14791 $(CFLAGS) on the link line.
14793 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
14795 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
14796 padded type built for the return type if it is unconstrained.
14798 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
14800 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
14802 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
14804 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
14805 before calling TREE_CHAIN.
14806 * gcc-interface/misc.c (gnat_init_ts): New function.
14807 (LANG_HOOKS_INIT_TS): Define.
14809 2011-04-12 Martin Jambor <mjambor@suse.cz>
14811 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
14812 instead of cgraph_node.
14814 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14816 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
14817 alignment on fields of the RETURN type built for the Copy-In Copy-Out
14820 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
14822 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
14823 of aggregate types that contain a placeholder.
14825 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
14827 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
14829 (handle_type_generic_attribute): Likewise.
14831 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
14834 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
14836 2011-04-04 Kai Tietz <ktietz@redhat.com>
14839 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
14842 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14844 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
14845 type case, do not strip a padding type around the array type.
14847 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14849 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
14852 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14854 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
14855 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
14856 code for -feliminate-unused-debug-types.
14857 (gnat_post_options): Likewise.
14859 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14861 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14862 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
14865 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14867 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
14868 DECL_ARTIFICIAL flag on enumeration types.
14870 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14872 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
14873 fat pointer types artificial unconditionally.
14874 <E_Array_Subtype>: Attach the base array type as a parallel type if it
14877 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14879 * gcc-interface/gigi.h (get_dummy_type): Declare.
14880 (build_dummy_unc_pointer_types): Likewise.
14881 (finish_fat_pointer_type): Likewise.
14882 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
14883 fat pointer type has been built, complete it in place.
14884 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
14885 and thin pointers. Remove useless variable.
14886 (finish_fat_pointer_type): Make global and move to...
14887 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
14888 (get_dummy_type): New function.
14889 (build_dummy_unc_pointer_types): Likewise.
14890 (gnat_pushdecl): Propage the name to the anonymous variants only.
14891 (update_pointer_to): Only adjust the pointer types in the unconstrained
14894 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14896 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
14897 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
14898 if this is a Taft amendment type and the full declaration is available.
14899 * gcc-interface/trans.c (process_type): Likewise.
14900 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
14901 (process_freeze_entity): Likewise.
14902 * gcc-interface/utils.c (dummy_global): New static variable.
14903 (gnat_write_global_declarations): If there are types declared as used
14904 at the global level, insert them in the global hash table.
14906 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14908 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
14909 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
14910 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
14912 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
14913 flag of the type accordingly.
14914 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
14916 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
14918 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14919 finalizing types when updating the pointers to the designated type.
14920 <all>: Finalize the deferred types even if we didn't defer processing
14921 of incomplete types in this invocation.
14923 2011-04-01 Olivier Hainque <hainque@adacore.com>
14924 Nicolas Setton <setton@adacore.com>
14925 Eric Botcazou <ebotcazou@adacore.com>
14927 * gcc-interface/misc.c (gnat_descriptive_type): New function.
14928 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
14930 2011-03-28 Kai Tietz <ktietz@redhat.com>
14932 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
14934 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
14935 * system-mingw.ads (System): Change ZCX_By_Default default to True.
14937 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
14939 2011-03-28 Tristan Gingold <gingold@adacore.com>
14942 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
14943 Use ada output of gnatbind.
14944 (ada/b_gnatb.adb): Ditto.
14945 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
14946 (ada.mostlyclean, ada.stage1)
14947 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
14948 (ada.stagefeedback): Adjust.
14949 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
14950 Use ada output of gnatbind.
14951 (b_gnatm.adb): Ditto.
14952 (b_gnatl.o, b_gnatm.o): New rules.
14954 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14956 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
14957 for the padded type built to support a specified size or alignment.
14959 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14961 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
14962 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
14963 unconditionally to the end of the unit when the designated type is
14965 <all>: Rename local variable. Attempt to un-defer types only and do it
14966 for limited_with'ed types as well.
14967 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
14968 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
14969 consistently and remove redundant call to finalize_from_with_types.
14971 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
14973 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
14974 subprograms without a previous spec declared in the same unit.
14975 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
14976 subprograms at the end of the unit instead of at the beginning.
14977 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
14978 isn't public for the special handling of non-inline functions nested
14979 inside inline external functions.
14981 2011-03-25 Jeff Law <law@redhat.com>
14983 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
14985 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14987 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
14988 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
14989 to compute Set_Size_Depends_On_Discriminant.
14990 (Layout_Type): Call it on array types in back-end layout mode.
14991 * sem_util.adb (Requires_Transient_Scope): Return true for array
14992 types only if the size depends on the value of discriminants.
14993 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
14994 type if the RHS is a call to a function that returns an unconstrained
14995 type with default discriminant.
14997 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
14999 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
15000 non-conversion to the nominal result type at the end.
15002 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15004 * gcc-interface/trans.c (create_temporary): New function taken from...
15005 (create_init_temporary): ...here. Call it.
15006 (call_to_gnu): Create the temporary for the return value early, if any.
15007 Create it for a function with copy-in/copy-out parameters if there is
15008 no target; in other cases of copy-in/copy-out, use another temporary.
15009 Push the new binding level lazily. Add and rename local variables.
15011 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15013 * gcc-interface/decl.c (validate_size): Improve comments and tweak
15015 (set_rm_size): Likewise.
15017 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15019 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15020 for the padded type built in order to support a specified alignment.
15021 Fix incorrect formatting.
15023 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15026 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
15028 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15030 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
15031 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
15032 to the end of the list. Adjust recursive call. Rename local variable.
15033 If REORDER is true, reorder components of the record type.
15034 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
15035 components_to_record and adjust the parameter list.
15037 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15039 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
15040 disabled, use the variable for bounds of loop iteration scheme.
15042 2011-03-21 Kai Tietz <ktietz@redhat.com>
15045 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
15047 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15049 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
15050 out whether the expression is read-only. Short-circuit placeholder
15051 case and rename a couple of local variables.
15053 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15055 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
15056 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
15057 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
15058 (convert): Deal with conversions from a smaller form type specially.
15060 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
15062 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
15063 its argument, except for the special -I- switch.
15065 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
15067 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
15070 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
15072 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
15074 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
15076 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
15078 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
15079 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
15080 instead of GNAT_FORMAL. Protect the expression against multiple uses.
15081 Do not generate the check directly, instead instantiate the template
15082 check present in the descriptor.
15083 (make_descriptor_field): Move around.
15084 (build_vms_descriptor32): Build a template check in the POINTER field.
15085 (build_vms_descriptor): Remove useless suffixes.
15086 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
15088 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
15091 * targext.c: Include target files if IN_RTS is defined.
15093 2011-01-26 Richard Guenther <rguenther@suse.de>
15096 * targext.c: Include config.h.
15097 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
15100 2011-01-04 Pascal Obry <obry@adacore.com>
15101 Eric Botcazou <ebotcazou@adacore.com>
15103 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
15105 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15107 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
15108 end-of-case on the end label and its associated gotos, if any.
15110 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15112 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
15113 expressions of the parameter cache within the statement group of
15114 the CICO mechanism.
15116 2011-01-04 Olivier Hainque <hainque@adacore.com>
15117 Eric Botcazou <ebotcazou@adacore.com>
15119 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
15120 (set_end_locus_from_node): New function.
15121 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
15122 make and the function end_locus.
15123 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
15124 for the elaboration subprogram.
15125 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
15126 set the end_locus of the expression as well.
15128 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15131 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
15132 variables that are referenced in exception handlers volatile.
15136 Copyright (C) 2011 Free Software Foundation, Inc.
15138 Copying and distribution of this file, with or without modification,
15139 are permitted in any medium without royalty provided the copyright
15140 notice and this notice are preserved.