]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
tree-vect-stmts.c (vectorizable_load): For SLP without permutation treat the first...
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
c225ba50
NR
12011-10-15 Nicolas Roche <roche@adacore.com>
2
3 * gcc-interface/lang-specs.h: Ensure -mrtp switch is passed when using
4 either rtp-smp or ravenscar-cert-rtp runtimes.
5
3e452820
AC
62011-10-15 Bob Duff <duff@adacore.com>
7
8 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
9 Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr
10 is available.
11 (Expand_N_Extended_Return_Statement): Do not create a renaming of the
12 build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is
13 available.
14 (Make_Build_In_Place_Call_In_Allocator): Add the user-defined
15 pool only if RE_Root_Storage_Pool_Ptr is available.
16 (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a
17 pool actual unless RE_Root_Storage_Pool_Ptr is available.
18 * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool
19 formal only if RE_Root_Storage_Pool_Ptr is available.
20
212011-10-15 Matthew Heaney <heaney@adacore.com>
22
23 * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue
24 type): Specify Priority aspect for protected type.
25
b7539c3b
AC
262011-10-14 Ed Schonberg <schonberg@adacore.com>
27
28 * exp_disp.adb (Check_Premature_Freezing): If an untagged type
29 is a generic actual, it is a subtype of a type that was frozen
30 by the instantiation, and even if not marked frozen it does not
31 affect the construction of the dispatch table.
32
332011-10-14 Robert Dewar <dewar@adacore.com>
34
35 * make.adb, mlib-utl.adb, sem_util.adb, sem_ch4.adb: Minor code
36 reformatting.
37 * s-rident.ads: Add missing Compiler_Unit pragma.
38
af89615f
AC
392011-10-14 Gary Dismukes <dismukes@adacore.com>
40
41 * sem_res.adb: Minor reformatting.
42
432011-10-14 Hristian Kirtchev <kirtchev@adacore.com>
44
45 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
46 Code and comment reformatting. Use BIP_Task_Master
47 when creating a _master.
48 (BIP_Formal_Suffix): Code reformatting. Correct the case for
49 BIP_Task_Master.
50 (Make_Build_In_Place_Call_In_Object_Declaration): Use
51 BIP_Task_Master when creating a reference to the enclosing
52 function's _master formal.
53 (Move_Activation_Chain): Use BIP_Task_Master when creating a reference
54 to the _master.
55 * exp_ch6.ads: Change BIP_Master to BIP_Task_Master.
56 (Needs_BIP_Finalization_Master): Alphabetized.
57 * sem_ch6.adb (Create_Extra_Formals): Update the usage of
58 BIP_Task_Master.
59
602011-10-14 Ed Schonberg <schonberg@adacore.com>
61
62 * par-ch6.adb (P_Return_Object_Declaration): In Ada 2012 mode,
63 reject an aliased keyword on the object declaration of an extended
64 return statement. In older versions of the language indicate
65 that this is illegal in the standard.
66
672011-10-14 Pascal Obry <obry@adacore.com>
68
69 * sem_util.adb, sem_ch4.adb: Minor reformatting.
70
712011-10-14 Ed Schonberg <schonberg@adacore.com>
72
73 * sem_ch13.adb: Recognize properly procedure calls that are
74 transformed into code statements.
75
762011-10-14 Vincent Celier <celier@adacore.com>
77
78 * projects.texi: Minor fix in project example.
79
f2d10a02
AC
802011-10-14 Ed Schonberg <schonberg@adacore.com>
81
82 * sem_util.adb: Return objects are aliased if their type is
83 immutably limited as per AI05-0053.
84
852011-10-14 Gary Dismukes <dismukes@adacore.com>
86
87 * exp_ch4.adb (Expand_N_Op_And): Remove Short_Circuit_And_Or
88 expansion code (moved to sem_res) (Expand_N_Op_Or): Remove
89 Short_Circuit_And_Or expansion code (moved to sem_res).
90 * sem_res.adb (Resolve_Logical_Op): Add code to rewrite Boolean
91 "and" and "or" operators as short-circuit "and then" and "or
92 else", when pragma Short_Circuit_And_Or is active.
93
2fcc44fa
AC
942011-10-13 Robert Dewar <dewar@adacore.com>
95
96 * sem_ch9.adb, sem_util.adb, sem_util.ads, exp_ch6.adb, sem_ch4.adb,
97 sem_ch6.adb, exp_ch3.adb: Minor reformatting.
98
992011-10-13 Arnaud Charlet <charlet@adacore.com>
100
101 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add a-ngcoar.o.
102
1032011-10-13 Jerome Guitton <guitton@adacore.com>
104
105 * sysdep.c (__gnat_get_task_options): Re-enable VX_SPE_TASK on vThreads
106
1072011-10-13 Eric Botcazou <ebotcazou@adacore.com>
108
109 * a-convec.ads (Cursor): Minor reformatting.
110 * a-convec.adb (Next): Fix minor inconsistencies.
111 (Previous): Likewise.
112
9b62eb32
AC
1132011-10-13 Ed Schonberg <schonberg@adacore.com>
114
115 * sem_util.ads, sem_util.adb (Available_Full_View_Of_Component):
116 New predicate to determine whether some operations on an array
117 type are available when the full view of its component may differ
118 from the view of the point of the array declaration.
119 * sem_ch4.adb (Find_Equality_Types): Use
120 Available_Full_View_Of_Component.
121 * sem_type.adb (Valid_Boolean_Arg, Valid_Comparison_Arg): Ditto
122
1232011-10-13 Ed Schonberg <schonberg@adacore.com>
124
125 * sem_ch9.adb: Analyze aspects while discriminants of protected
126 type are visible.
127
1282011-10-13 Geert Bosch <bosch@adacore.com>
129
130 * Makefile.rtl (GNATRTL_TASKING_OBJECTS): Add
131 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o, as these no
132 longer depend on an external library.
133 * gcc-interface/Makefile.in (GNATRTL_LINEARALGEBRA_OBJS): Remove
134 a-nlcoar.o, a-nllcar.o, a-nucoar.o and s-gearop.o.
135 Update dependencies.
136 * gcc-interface/Make-lang.in: Update dependencies.
137
1a36a0cd
AC
1382011-10-13 Cyrille Comar <comar@adacore.com>
139
140 * gnat_ugn.texi: Minor editing.
141
1422011-10-13 Vincent Celier <celier@adacore.com>
143
144 * projects.texi: Add documentation on packages and attributes
145 that are inherited from a project being extended into the
146 extended project.
147
1482011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
149
150 * exp_ch3.adb (Build_Master): Rewritten.
151 (Expand_N_Full_Type_Declaration): Reformat the declarative
152 region. Update the call to Build_Master_Renaming.
153 (Expand_Previous_Access_Type): Rewritten.
154 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call):
155 Add local constant Result_Subt and update related usage.
156 (Expand_N_Extended_Return_Statement): Add local constant
157 Result_Subt and update related usage.
158 * exp_ch9.adb (Build_Activation_Chain): Rewritten to use the
159 new context detection mechanism.
160 (Build_Class_Wide_Master):
161 Use Insert_Action to add the renaming into the tree.
162 (Build_Master_Entity): Rewritten to use the new context detection
163 mechanism.
164 (Build_Master_Renaming): Add formal parameter Ins_Nod
165 and related usage. Use Insert_Action to add the renaming into the
166 tree.
167 (Find_Enclosing_Context): New subsidiary routine. Rather
168 than relying on enclosing scopes, this routine looks at the
169 tree structure to figure out the proper context for a _master
170 or a _chain. This approach eliminates the issues with transient
171 scopes which have not been converted into blocks.
172 * exp_ch9.ads (Build_Master_Entity): Change parameter profile
173 to better reflect the new usage. Update the related comment.
174 (Build_Master_Renaming): Add formal parameter Ins_Nod. Update
175 the comment on usage.
176 * sem_ch3.adb (Access_Definition): Update the calls to
177 Build_Master_Entity and Build_Master_Renaming.
178 * sem_ch6.adb (Create_Extra_Formals): Add local variable
179 Full_Subt. Code reformatting.
180 * sem_util.adb (Is_Iterator): Alphabetized.
181 (Is_LHS): Alphabetized.
182 (Is_Limited_Class_Wide_Type): New routine.
183 * sem_util.ads (Is_Limited_Class_Wide_Type): New routine.
184
a5917ffb
GB
1852011-10-13 Geert Bosch <bosch@adacore.com>
186
187 * a-ngrear.adb (Solve): Make generic and move to
188 System.Generic_Array_Operations.
189 * s-gearop.ads (Matrix_Vector_Solution, Matrix_Matrix_Solution):
190 New generic solvers to compute a vector resp. matrix Y such
191 that A * Y = X, approximately.
192 * s-gearop.adb (Matrix_Vector_Solution, Matrix_Matrix_Solution):
193 Implement using Forward_Eliminate and Back_Substitute
194 * a-ngcoar.adb: Reimplement in pure Ada to remove dependencies
195 on BLAS and LAPACK.
196 * a-ngcoar.ads ("abs"): Fix return type to be real.
197
574ec945
EB
1982011-10-13 Eric Botcazou <ebotcazou@adacore.com>
199
200 PR ada/50589
201 * s-linux-alpha.ads: Do not "with" Interfaces.C.
202 * s-linux-sparc.ads: Likewise.
203
8668ea36
GB
2042011-10-13 Geert Bosch <bosch@adacore.com>
205
206 * s-gearop.ads (Forward_Eliminate): Add "abs" formal function
207 returning a Real.
208 * s-gearop.adb (Forward_Eliminate): Remove local "abs" function
209 and use formal.
210 * a-ngrear.adb (Forward_Eliminate): Adjust instantiation for
211 new profile.
212
edcf5983
GB
2132011-10-13 Geert Bosch <bosch@adacore.com>
214
215 * a-ngrear.adb, s-gearop.adb, s-gearop.ads (Sqrt): Make generic and
216 move to System.Generic_Array_Operations.
217
a4935dea
GB
2182011-10-13 Geert Bosch <bosch@adacore.com>
219
220 * a-ngrear.adb ("abs"): Adjust for modified L2_Norm generic
221 * s-gearop.ads (L2_Norm): Change profile to be suitable for
222 Complex_Vector
223 * s-gearop.adb (L2_Norm): Reimplement using direct definition,
224 not inner product
225
3e7302c3
AC
2262011-10-13 Robert Dewar <dewar@adacore.com>
227
228 * exp_ch5.adb, sem_ch3.adb, impunit.adb, impunit.ads, sem_type.adb,
229 prj-proc.adb, exp_ch9.adb, s-regpat.adb, sem_ch10.adb, sem_prag.adb,
230 sem_ch12.adb, freeze.adb, sem_attr.adb, sem_attr.ads, gnatlink.adb,
231 par-ch6.adb, exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, sem_ch8.adb,
232 par-util.adb, sem_ch13.adb, lib-xref.adb, g-trasym.adb, g-trasym.ads,
233 exp_aggr.adb, s-taprop-posix.adb: Minor reformatting.
234
2352011-10-13 Geert Bosch <bosch@adacore.com>
236
237 * s-gearop.adb: Minor comment additions.
238
8417f4b2
AC
2392011-10-13 Fedor Rybin <frybin@adacore.com>
240
241 * gnat_ugn.texi: Add gnattest section.
242
2432011-10-13 Ed Schonberg <schonberg@adacore.com>
244
245 * freeze.adb: Do not create body of renaming if declaration has
246 errors.
247
2482011-10-13 Olivier Hainque <hainque@adacore.com>
249
250 * init.c (__gnat_error_handler - vxworks case): Restrict sigtramp calls
251 further, to the ppc+kernel case only.
252
2532011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
254
255 * exp_ch4.adb (Expand_N_Allocator): Comment reformatting.
256 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call):
257 Do not create a pool formal on .NET/JVM.
258 (Expand_N_Extended_Return_Statement): Alphabetize local
259 variables. Do not create a renaming of the build-in-place pool
260 parameter on .NET/JVM. (Make_Build_In_Place_Call_In_Allocator):
261 Add the user-defined pool only on non-VM targets.
262 (Make_Build_In_Place_Call_In_Object_Declaration): Alphabetize
263 local variables. Do not add a pool actual on .NET/JVM.
264 * sem_ch6.adb: Add with and use clause for Targparm.
265 (Create_Extra_Formals): Add build-in-place pool formal only on
266 non-VM targets.
267 * rtsfind.ads: Alphabetize entries.
268
4674dd21
AC
2692011-10-13 Sergey Rybin <rybin@adacore.com>
270
271 * gnat_ugn.texi: Minor correction.
272
2732011-10-13 Ed Schonberg <schonberg@adacore.com>
274
275 * sem_ch8.adb: Minor error message improvement.
276
2772011-10-13 Robert Dewar <dewar@adacore.com>
278
279 * a-cbprqu.adb, a-ciorma.adb, exp_ch3.adb: Minor reformatting.
280
95aeda79
GD
2812011-10-13 Gary Dismukes <dismukes@adacore.com>
282
283 * exp_ch5.adb (Expand_N_Loop_Statement): For the transformation
284 of a for loop for an enumeration type with an enumeration rep
285 clause, which involves moving the original loop parameter into
286 a nested block, the loop parameter's entity must be removed from
287 the entity list of the loop scope.
288
200b7162
BD
2892011-10-13 Bob Duff <duff@adacore.com>
290
291 * exp_ch6.ads (BIP_Storage_Pool): New "extra implicit parameter"
292 that gets passed in the same cases where BIP_Alloc_Form is passed
293 (caller-unknown-size results). BIP_Storage_Pool is used when
294 BIP_Alloc_Form = User_Storage_Pool. In that case, a pointer
295 to the user-defined storage pool is passed at the call site,
296 and this pool is used in callee to allocate the result.
297 * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): New
298 version of Add_Alloc_Form_Actual_To_Build_In_Place_Call. Passes
299 the additional BIP_Storage_Pool actual.
300 (Expand_N_Extended_Return_Statement): Allocate the function
301 result using the user-defined storage pool, if BIP_Alloc_Form =
302 User_Storage_Pool.
303 * sem_ch6.adb: Add the "extra formal" for BIP_Storage_Pool.
304 * exp_ch4.adb: Don't overwrite storage pool set by
305 Expand_N_Extended_Return_Statement.
306 * s-stopoo.ads, rtsfind.ads (Root_Storage_Pool_Ptr): New type,
307 for use in build-in-place function calls within allocators
308 where the access type has a user-defined storage pool.
309
9f8d1e5c
AC
3102011-10-13 Sergey Rybin <rybin@adacore.com>
311
312 * gnat_ugn.texi, vms_data.ads: Add an option to control enumeration
313 literal casing.
314
3152011-10-13 Nicolas Roche <roche@adacore.com>
316
317 * gnatlink.adb: Ensure that -mrtp is passed when
318 runtime name ends with 'rtp'.
319
3202011-10-13 Ed Schonberg <schonberg@adacore.com>
321
322 * sem_prag.adb (Analyze_Pragma, case Unchecked_Union): an
323 unchecked union type can be limited.
324
3252011-10-13 Olivier Hainque <hainque@adacore.com>
326
327 * init.c (__gnat_error_handler) <VxWorks version>: Add comments on
328 the use of the signal trampoline for PPC in the sjlj case as well.
329 Add legitimate casts, preventing compile time warnings on the
330 (sighandler *) profile.
331
3322011-10-13 Yannick Moy <moy@adacore.com>
333
334 * sem_aggr.adb (Resolve_Aggr_Expr): Always perform semantic
335 analysis in Alfa mode.
336
3372011-10-13 Ed Schonberg <schonberg@adacore.com>
338
339 * sem_ch3.adb (OK_For_Limited_Init_In_05): Conditional and case
340 expressions are legal limited return values if each one of their
341 dependent expressions are legal.
342
3432011-10-13 Ed Schonberg <schonberg@adacore.com>
344
345 * sem_ch6.adb (Analyze_Procedure_Call_Statement): In Ada 2012 mode,
346 if the prefix of the call is a qualified expression, rewrite as
347 a code statement.
348 * sem_ch13.adb (Analyze_Code_Statement): In Ada 2012 mode, the
349 code statement is legal if it is a rewriting of a procedure call.
350
3512011-10-13 Ed Schonberg <schonberg@adacore.com>
352
353 * exp_aggr.adb (Flatten): If a component association has a box,
354 assume that aggregate is not static.
355 (Safe_Aggregate): If a component association in a non-limited
356 aggregate has a box, assume that it cannot be expanded in place.
357
3582011-10-13 Vincent Celier <celier@adacore.com>
359
360 * prj-conf.adb (Get_Or_Create_Configuration_File): Call
361 Process_Project_Tree_Phase_1 with Packages_To_Check.
362 (Process_Project_And_Apply_Config): Ditto
363 * prj-part.ads, prj-part.adb, prj-pars.ads, prj-pars.adb (Parse):
364 Remove default for argument Packages_To_Check.
365 * prj-proc.adb (Recursive_Process): New argument
366 Packages_To_Check.
367 (Process): Ditto.
368 (Process_Project_Tree_Phase_1): Ditto.
369 (Recursive_Project.Process_Aggregated_Projects): Call
370 Prj.Part.Parse and Process_Project_Tree_Phase_1 with
371 Packages_To_Check.
372 * prj-proc.ads (Process): New argument Packages_To_Check
373 (Process_Project_Tree_Phase_1): Ditto
374
46f8e1ac
AC
3752011-10-13 Arnaud Charlet <charlet@adacore.com>
376
377 * gcc-interface/Makefile.in: Fix typo.
378
8097203f
AC
3792011-10-13 Ed Schonberg <schonberg@adacore.com>
380
381 * sem_ch12.adb (Analyze_Formal_{Floating_Type,
382 Signed_Integer_Type, Decimal_Fixed_Point_Type, Discrete_Type}):
383 Use sloc of defining identifier of farmal type declaration,
384 as sloc of generated internal entity, to prevent misplaced
385 references in ali.
386
3872011-10-13 Ed Schonberg <schonberg@adacore.com>
388
389 * sem_intr.adb (Check_Intrinsic_Operator): Check that type
390 is fully defined before checking that it is a numeric type.
391
3922011-10-13 Ed Schonberg <schonberg@adacore.com>
393
394 * sem_aggr.adb (Resolve_Record_Aggregate): If a component
395 association for component X has a box, then X is covered in the
396 aggregate even if there is not default value for X in the type
397 declaration, and X has to be default-initialized.
398
3992011-10-13 Ed Schonberg <schonberg@adacore.com>
400
401 * sem_attr.adb (Check_Enum_Image, Analyze_Attribute case
402 'Value): Mark literals as referenced only if reference is in
403 current source unit.
404
4052011-10-13 Matthew Heaney <heaney@adacore.com>
406
407 * a-csquin.ads (Enque, Dequeue): Mark interface operations as entries.
408
4092011-10-13 Olivier Hainque <hainque@adacore.com>
410
411 * sigtramp.h: New file. Prototype and spec of the signal
412 trampoline to be called by an established handler to provide
413 dwarf call frame info before the real signal processing code.
414 * sigtramp-ppcvxw.c: New file. Implementation of the signal
415 trampoline for ppc-vxworks.
416 * init.c (vxworks section): Use it for ppc.
417
e192a2cd
AC
4182011-10-13 Thomas Quinot <quinot@adacore.com>
419
420 * par-ch2.adb, par.adb, par-util.adb, par-ch3.adb
421 (Check_Future_Identifier): New subprogram,
422 factors duplicated code from Par.Ch2.P_Identifier and
423 Par.Ch3.P_Defining_Identifier.
424
4252011-10-13 Thomas Quinot <quinot@adacore.com>
426
427 * s-taprop-posix.adb (Initialize): Always raise Storage_Error
428 if we fail to initialize CV attributes or CV.
429
4302011-10-13 Thomas Quinot <quinot@adacore.com>
431
432 * s-tasren.adb (Timed_Selective_Wait, case
433 Accept_Alternative_Selected): Use Defer_Abort_Nestable, since
434 we know abortion is already deferred.
435
4362011-10-13 Hristian Kirtchev <kirtchev@adacore.com>
437
438 * exp_ch3.adb (Build_Class_Wide_Master): Moved to exp_ch9.
439 (Build_Master_Renaming (function)): Removed.
440 (Build_Master_Renaming (procedure)): Moved to exp_ch9.
441 (Expand_Full_Type_Declaration): Alphabetize
442 variables. Reformatting of code and comments. Rewrite the
443 section on processing of anonymous access-to-task types in
444 record components.
445 * exp_ch3.ads (Build_Class_Wide_Master): Moved to exp_ch9.
446 (Build_Master_Renaming): Moved to exp_ch9.
447 * exp_ch9.adb (Build_Class_Wide_Master): Moved from exp_ch3.
448 (Build_Master_Entity): Add formal parameter
449 Use_Current. Reformatting of code and comments.
450 (Build_Master_Renaming): Moved from exp_ch3.
451 * exp_ch9.ads (Build_Class_Wide_Master): Moved from
452 exp_ch3. Update comment on usage.
453 (Build_Master_Entity):
454 Add formal parameter Use_Current. Update comment on usage.
455 (Build_Master_Renaming): Moved from exp_ch3.
456 * sem_ch3.adb (Access_Definition): Remove redundant code to
457 create a _master and a renaming.
458
4592011-10-13 Ed Schonberg <schonberg@adacore.com>
460
461 * lib-xref.adb: Do no emit reference to overridden operation,
462 if it is internally generated.
463
4642011-10-13 Vincent Celier <celier@adacore.com>
465
466 * bindgen.adb: Remove any processing related to g-trasym
467 * Makefile.rtl: Add g-trasym.o to GNATRTL_NONTASKING_OBJS
468 * mlib-prj.adb: Remove any processing related to g-trasym.
469
0cfaf83f
EB
4702011-10-12 Eric Botcazou <ebotcazou@adacore.com>
471
472 * sem_util.adb (Denotes_Same_Prefix): Fix fatal warning.
473 * gcc-interface/Make-lang.in (WARN_ADAFLAGS): New.
474 (ALL_ADAFLAGS): Include WARN_ADAFLAGS.
475 (ADA_FLAGS_TO_PASS): Likewise.
476 (COMMON_FLAGS_TO_PASS): New.
477 (ADA_TOOLS_FLAGS_TO_PASS): Use COMMON_FLAGS_TO_PASS. In the regular
478 native case, also use FLAGS_TO_PASS and ADA_FLAGS_TO_PASS.
479 (gnatlib): Use COMMON_FLAGS_TO_PASS.
480 (ada.install-common): Likewise.
481 (install-gnatlib): Likewise.
482 (install-gnatlib-obj): Likewise.
483 (gnattools): Use ADA_TOOLS_FLAGS_TO_PASS for gnattools1 as well.
484 (gnat-cross): Delete.
485 (gnatboot): Likewise.
486 (gnatboot2): Likewise.
487 (gnatboot3): Likewise.
488 (gnatstage1): Likewise.
489 (gnatstage2): Likewise.
490 * gcc-interface/Makefile.in (SOME_ADAFLAGS): Likewise.
491 (MOST_ADAFLAGS): Likewise.
492 (LOOSE_CFLAGS): Likewise.
493 (gnat-cross): Likewise.
494 (GNATLIBFLAGS): Add -W -Wall.
495 (GNATLIBCFLAGS_FOR_C): Likewise.
496 * gcc-interface/lang.opt: Remove C-specific warnings. Add doc lines.
497 * gcc-interface/misc.c (gnat_handle_option): Remove obsolete cases.
498
722356ce
EB
4992011-10-12 Eric Botcazou <ebotcazou@adacore.com>
500
501 * gcc-interface/trans.c (Attribute_to_gnu): Use remove_conversions.
502 (push_range_check_info): Likewise.
503 (gnat_to_gnu) <N_Code_Statement>: Likewise.
504 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: Likewise.
505 (gnat_invariant_expr): Likewise.
506 * gcc-interface/utils.c (compute_related_constant): Likewise.
507 (max_size): Fix handling of SAVE_EXPR.
508 (remove_conversions): Fix formatting.
509
15bf7d19
EB
5102011-10-12 Eric Botcazou <ebotcazou@adacore.com>
511
512 * gcc-interface/ada-tree.h (DECL_LOOP_PARM_P): New flag.
513 (DECL_INDUCTION_VAR): New macro.
514 (SET_DECL_INDUCTION_VAR): Likewise.
515 * gcc-interface/gigi.h (convert_to_index_type): Declare.
516 (gnat_invariant_expr): Likewise.
517 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: If this is a loop
518 parameter, set DECL_LOOP_PARM_P on it.
519 * gcc-interface/misc.c (gnat_print_decl) <VAR_DECL>: If DECL_LOOP_PARM_P
520 is set, print DECL_INDUCTION_VAR instead of DECL_RENAMED_OBJECT.
521 * gcc-interface/trans.c (gnu_loop_label_stack): Delete.
522 (struct range_check_info_d): New type.
523 (struct loop_info_d): Likewise.
524 (gnu_loop_stack): New stack.
525 (Identifier_to_gnu): Set TREE_READONLY flag on the first dereference
526 built for a by-double-ref read-only parameter. If DECL_LOOP_PARM_P
527 is set, do not test DECL_RENAMED_OBJECT.
528 (push_range_check_info): New function.
529 (Loop_Statement_to_gnu): Push a new struct loop_info_d instead of just
530 the label. Reference the label and the iteration variable from it.
531 Build the special induction variable in the unsigned version of the
532 size type, if it is larger than the base type. And attach it to the
533 iteration variable if the latter isn't by-ref. In the iteration scheme
534 case, initialize the invariant conditions in front of the loop if
535 deemed profitable. Use gnu_loop_stack.
536 (gnat_to_gnu) <N_Exit_Statement>: Use gnu_loop_stack.
537 <N_Raise_Constraint_Error>: Always process the reason. In the range
538 check and related cases, and if loop unswitching is enabled, compute
539 invariant conditions and push this information onto the stack.
540 Do not translate again the condition if it has been already translated.
541 * gcc-interface/utils.c (record_global_renaming_pointer): Assert that
542 DECL_LOOP_PARM_P isn't set.
543 (convert_to_index_type): New function.
544 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Use it in order
545 to convert the index from the base index type to sizetype.
546 (gnat_invariant_expr): New function.
547
e79983f4
MM
5482011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
549
550 * gcc-interface/utils.c (def_builtin_1): Delete old interface with
551 two parallel arrays to hold standard builtin declarations, and
552 replace it with a function based interface that can support
15bf7d19 553 creating builtins on the fly in the future.
e79983f4
MM
554 * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Ditto.
555 (gnat_to_gnu): Ditto.
556
228ee426
EB
5572011-10-07 Eric Botcazou <ebotcazou@adacore.com>
558
559 PR lto/50492
560 * gcc-interface/gigi.h (gnat_pushdecl): Adjust comment.
561 * gcc-interface/utils.c (global_context): New variable.
562 (gnat_pushdecl): Initialize it and set it as the DECL_CONTEXT of DECLs
563 that are either public external or at top level. Use "No" macro.
564 (end_subprog_body): Call decl_function_context.
565 (rest_of_subprog_body_compilation): Likewise.
566
71196d4e
EB
5672011-10-07 Eric Botcazou <ebotcazou@adacore.com>
568
569 * gcc-interface/gigi.h (gnat_useless_type_conversion): Declare.
570 (rest_of_subprog_body_compilation): Likewise.
571 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: For renaming,
572 test for useless conversions by means of gnat_useless_type_conversion.
573 * gcc-interface/trans.c: Include bitmap.h and cgraph.h.
574 (language_function): Add named_ret_val and other_ret_val.
575 (f_named_ret_val): New macro.
576 (f_other_ret_val): Likewise.
577 (gigi): Call rest_of_subprog_body_compilation.
578 (struct nrv_data): New structure.
579 (is_nrv_p): New predicate.
580 (prune_nrv_r): New helper function.
581 (prune_nrv_in_block): New function.
582 (finalize_nrv_r): New helper function.
583 (finalize_nrv): New function.
584 (return_value_ok_for_nrv_p): New predicate.
585 (build_return_expr): If optimization is enabled, record candidates for
586 the Named Return Value optimization.
587 (build_function_stub): Call rest_of_subprog_body_compilation.
588 (Subprogram_Body_to_gnu): If optimization is enabled and there are
589 candidates, finalize the Named Return Value optimization.
590 Call rest_of_subprog_body_compilation.
591 (call_to_gnu): At the end, if a return value is needed, simplify the
592 result before wrapping it up in a COMPOUND_EXPR.
593 * gcc-interface/utils.c (end_subprog_body): Split into...
594 (rest_of_subprog_body_compilation): ...this. New function.
595 (gnat_useless_type_conversion): Likewise.
596
885c4871
AC
5972011-10-06 Thomas Quinot <quinot@adacore.com>
598
599 * einfo.ads, exp_attr.adb, exp_ch3.adb, exp_ch4.adb, exp_ch7.adb,
600 exp_ch9.adb, exp_ch9.ads, exp_strm.adb, exp_util.adb, freeze.adb,
601 g-debpoo.ads, opt.ads, par-ch12.adb, par-ch2.adb, par-ch3.adb,
602 par-ch5.adb, par-ch6.adb, sem_aggr.adb, sem_attr.adb, sem_cat.adb,
603 sem_ch10.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
604 sem_ch6.adb, sem_intr.adb, sem_res.ads, sem_type.adb, sem_util.adb,
605 s-regpat.adb, s-tpopde-vms.ads: Minor reformatting.
606 * s-osinte-freebsd.ads: Fix for tasking failures on FreeBSD.
607
6082011-10-06 Ed Schonberg <schonberg@adacore.com>
609
610 * a-cihase.adb, a-ciorma.adb: Avoid accessibility checks in container
611 references.
612
6132011-10-06 Matthew Heaney <heaney@adacore.com>
614
615 * a-cuprqu.ads, a-cuprqu.adb, a-cbprqu.ads, a-cbprqu.adb
616 (Dequeue_Only_High_Priority): Protected procedure now implemented.
617
6182011-10-06 Vincent Celier <celier@adacore.com>
619
620 * g-trasym.adb: Replace old implementation with the default
621 implementation that returns list of addresses as "0x...".
622 * g-trasym.ads: Update the list of platforms with the full
623 capability. Indicate that there is a default implementation
624 for other platforms.
625 * g-trasym-unimplemented.ads, g-trasym-unimplemented.adb: Remove.
626 * gcc-interface/Makefile.in: Remove g-trasym-unimplemented, as there
627 is now a default implementation for all platforms without the full
628 capability.
629
ce72a9a3
AC
6302011-10-06 Robert Dewar <dewar@adacore.com>
631
632 * a-ciorse.adb, a-cihase.adb, a-cihase.ads, a-coorse.adb,
633 a-cborse.adb, a-comutr.adb, a-ciorma.adb, a-cbmutr.adb,
634 a-cbmutr.ads, a-cbhase.adb, a-cbhase.ads: Minor reformatting and code
635 reorganization (use conditional expressions).
636
6372011-10-06 Robert Dewar <dewar@adacore.com>
638
639 * sem_res.adb (Resolve_Arithmetic_Op): Fix bad warning for
640 floating divide by zero.
641
6422011-10-06 Ed Schonberg <schonberg@adacore.com>
643
644 * sem_ch6.adb: Limited interfaces that are not immutably limited
645 are OK in return statements.
646
a912d7d9
IS
6472011-09-30 Iain Sandoe <iains@gcc.gnu.org>
648
649 * gcc-interface/Makefile.in (Darwin): Partial reversion of previous
650 change to powerpc section.
651
39ffb1f9
IS
6522011-09-29 Iain Sandoe <iains@gcc.gnu.org>
653
654 * gcc-interface/Makefile.in (Darwin): Factor LIBGNAT_TARGET_PAIRS
655 across the port.
656
ffb35bbf
ES
6572011-09-27 Ed Schonberg <schonberg@adacore.com>
658
659 * a-cbhase.adb, a-cbhase.ads, a-cborse.adb, a-cborse.ads,
660 a-cihase.adb, a-cihase.ads, a-ciorse.adb, a-ciorse.ads,
661 a-coorse.adb, a-coorse.ads: Add iterator machinery to bounded sets and
662 indefinite sets.
663 * a-coorma.ads: Minor reformmating.
664 * einfo.ads: Improve the comment describing the
665 Directly_Designated_Type function.
666 * a-ciorma.adb, a-ciorma.ads: Add iterator machinery to indefinite
667 ordered maps.
668 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
669 dependencies.
670
da124b6a
AC
6712011-09-27 Robert Dewar <dewar@adacore.com>
672
673 * a-comutr.ads: Minor reformatting.
674
6752011-09-27 Ed Schonberg <schonberg@adacore.com>
676
677 * a-cimutr.adb, a-cimutr.ads, a-cbmutr.adb, a-cbmutr.ads: Add children
678 iterators to multiway trees.
679
6802011-09-27 Yannick Moy <moy@adacore.com>
681
682 * debug.adb (d.D): New option for strict Alfa mode.
683 * opt.ads (Strict_Alfa_Mode): New flag to interpret compiler
684 permissions as strictly as possible.
685 * sem_ch3.adb (Signed_Integer_Type_Declaration): In non-strict
686 Alfa mode, now, interpret ranges of base types like GNAT does; in
687 strict mode, simply change the range of the implicit base Itype.
688 * gnat1drv.adb: Update comments. Set Strict_Alfa_Mode.
689
706a4067
AC
6902011-09-27 Robert Dewar <dewar@adacore.com>
691
692 * exp_ch9.adb: Minor comment fixes.
693
6942011-09-27 Ed Schonberg <schonberg@adacore.com>
695
696 * a-comutr.adb, a-comutr.ads: Add children iterators on multiway
697 trees.
698
05c1e7d2
AC
6992011-09-27 Eric Botcazou <ebotcazou@adacore.com>
700
701 * checks.adb (Apply_Scalar_Range_Check): Use Designated_Type
702 instead of Directly_Designated_Type in the indirect array case.
703
7042011-09-27 Robert Dewar <dewar@adacore.com>
705
706 * exp_util.adb, exp_aggr.adb: Minor reformatting.
707
65e78a74
AC
7082011-09-27 Ed Schonberg <schonberg@adacore.com>
709
710 * sinfo.ads, par-ch3.adb: Minor comment update: aspect specification
711 on subtype declarations.
712 * exp_aggr.adb: Minor comment update.
713
7142011-09-27 Eric Botcazou <ebotcazou@adacore.com>
715
716 * exp_util.adb (Safe_Prefixed_Reference): Remove always-false
717 test in the N_Explicit_Dereference case. Fold double logical
718 negation in the special loop case and conditionalize it on
719 Variable_Ref being true.
720
7212011-09-27 Ed Schonberg <schonberg@adacore.com>
722
723 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is a
724 single protected object and the selector is a discriminant or an
725 entry family, this is a non-overloaded candidate interpretation,
726 and possible primitive operations of the type must not be
727 examined.
728
7292011-09-27 Arnaud Charlet <charlet@adacore.com>
730
731 * s-taspri-posix-noaltstack.ads (Lock): Mark fields aliased.
732
6f5add73
AC
7332011-09-27 Pascal Obry <obry@adacore.com>
734
735 * s-osinte-hpux.ads, s-osinte-aix.ads, s-osinte-solaris-posix.ads,
736 s-osinte-irix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads:
737 Add dummy definitions for pthread_rwlock_t
738 and pthread_rwlockattr_t on all POSIX platforms.
739 * s-taprop-irix.adb, s-taprop-posix.adb (Initialize_Lock): Fix lock
740 reference.
741 (Finalize_Lock): Likewise.
742 (Write_Lock): Likewise.
743 (Unlock): Likewise.
744
7452011-09-27 Tristan Gingold <gingold@adacore.com>
746
747 * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for
748 windows 64.
749
64a63cd5
PO
7502011-09-27 Pascal Obry <obry@adacore.com>
751
752 * s-osinte-hpux.ads, s-taprop-vxworks.adb, s-taspri-vxworks.ads,
753 s-taprop-tru64.adb, s-osinte-aix.ads, s-taspri-posix-noaltstack.ads,
754 s-taspri-mingw.ads, s-taprop-vms.adb, s-tpoben.adb, s-tpoben.ads,
755 s-taprop-mingw.adb, s-taprob.adb, s-taprob.ads,
756 s-osinte-solaris-posix.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
757 s-osinte-irix.ads, s-taprop-irix.adb, s-osinte-darwin.ads,
758 s-taspri-dummy.ads, s-taspri-posix.ads, s-taprop.ads,
759 s-taspri-vms.ads, s-osinte-freebsd.ads, s-taprop-hpux-dce.adb,
760 s-taspri-hpux-dce.ads, s-taspri-tru64.ads, s-taprop-dummy.adb,
761 s-taprop-posix.adb: Revert previous changes.
762 (Lock): Now a record containing the two possible lock
763 (mutex and read/write) defined in OS_Interface.
764 * s-taprop-linux.adb (Finalize_Protection): Use r/w lock for
765 'R' locking policy.
766 (Initialize_Protection): Likewise.
767 (Lock): Likewise.
768 (Lock_Read_Only): Likewise.
769 (Unlock): Likewise.
770
f672a756
AC
7712011-09-27 Pascal Obry <obry@adacore.com>
772
773 * s-taspri-posix-noaltstack.ads (RW_Lock): This type is now defined as
774 OS_Interface.pthread_rwlock_t.
775
7762011-09-27 Robert Dewar <dewar@adacore.com>
777
778 * exp_ch9.adb, a-cimutr.adb, a-cimutr.ads, gnat1drv.adb, a-comutr.adb,
779 a-comutr.ads, exp_dist.adb, a-cbmutr.adb, a-cbmutr.ads,
780 sem_ch5.adb, sem_util.adb: Minor reformatting.
781
7a44cb69
PO
7822011-09-27 Pascal Obry <obry@adacore.com>
783
784 * s-taprop.ads (Initialize_Lock)[RW_Lock]: New spec for r/w lock.
785 (Finalize_Lock)[RW_Lock]: Likewise.
786 (Write_Lock)[RW_Lock]: Likewise.
787 (Unlock)[RW_Lock]: Likewise.
788 (Read_Lock): Define L as RW_Lock (instead of Lock).
789 * s-taprop-linux.adb (Initialize_Lock)[RW_Lock]: New
790 routine for r/w lock.
791 (Finalize_Lock)[RW_Lock]: Likewise.
792 (Write_Lock)[RW_Lock]: Likewise.
793 (Unlock)[RW_Lock]: Likewise.
794 (Read_Lock): Define L as RW_Lock (instead of Lock).
795
796 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
797 s-taprop-mingw.adb, s-taprop-solaris.adb, s-taprop-irix.adb,
798 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
799 (Initialize_Lock)[RW_Lock]: Same implementation as corresponding
800 routine for standard lock.
801 (Finalize_Lock)[RW_Lock]: Likewise.
802 (Write_Lock)[RW_Lock]: Likewise.
803 (Unlock)[RW_Lock]: Likewise.
804 (Read_Lock): Define L as RW_Lock (instead of Lock).
805 * s-taprob.ads, s-tpoben.ads (Protection): Add RWL (RW_Lock)
806 in the record definition.
807 * s-taprob.adb, s-taproben.adb (Finalize_Protection): Use r/w
808 lock for 'R' locking policy.
809 (Initialize_Protection): Likewise.
810 (Lock): Likewise.
811 (Lock_Read_Only): Likewise.
812 (Unlock): Likewise.
813 * s-taspri-posix.ads (RW_Lock): New type defined as
814 OS_Interface.pthread_rwlock_t.
815
816 * s-taspri-vxworks.ads, s-taspri-posix-noaltstack.ads,
817 s-taspri-mingw.ads, s-taspri-solaris.ads, s-taspri-dummy.ads,
818 s-taspri-posix.ads, s-taspri-vms.ads, s-taspri-hpux-dce.ads,
819 s-taspri-tru64.ads (RW_Lock): New type defined as alias to Lock.
820
4c173b50
PO
8212011-09-27 Pascal Obry <obry@adacore.com>
822
823 * exp_ch9.adb, s-taspri-posix.ads: Minor reformatting.
824
8252011-09-27 Pascal Obry <obry@adacore.com>
826
827 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
828 s-osinte-hpux.ads, s-osinte-irix.ads,
829 s-osinte-solaris-posix.ads (pthread_rwlock_t): New definition alias of
830 pthread_mutex_t.
831 (pthread_rwlockattr_t): New definition alias of pthread_mutexattr_t.
832 * s-osinte-linux.ads (pthread_rwlock_t, pthread_rwlockattr_t,
833 pthread_rwlockattr_init, pthread_rwlockattr_destroy,
834 pthread_rwlockattr_setkind_np, pthread_rwlock_init,
835 pthread_rwlock_destroy, pthread_rwlock_rdlock,
836 pthread_rwlock_wrlock, pthread_rwlock_unlock): New.
837
343250a6
PO
8382011-09-27 Pascal Obry <obry@adacore.com>
839
840 * rtsfind.ads: Add RE_Lock_Read_Only into rtsfind circuitry.
841 (RE_Id): Add RE_Lock_Read_Only.
842 (RE_Unit_Table): Likewise.
843 * sem_prag.adb (Process_Convention): Change Pragma_Locking_Policy
844 to lift restriction on first character. Handle now the
845 Name_Concurrent_Readers_Locking where policy character is set to
846 'R'.
847 * snames.ads-tmpl (Name_Concurrent_Readers_Locking): New
848 constant.
849 * exp_ch9.adb (Build_Protected_Subprogram_Body): Generate a
850 read only lock for function in protected object.
851 * s-taprob.ads (Lock_Read_Only): Remove obsolete comment as
852 this routine is now used.
853
2d0dd51a
EB
8542011-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
855
856 * s-atocou-x86.adb (Decrement): Use %;.
857 (Increment): Likewise.
858
bdbebf66
EB
8592011-09-26 Eric Botcazou <ebotcazou@adacore.com>
860
861 * gcc-interface/utils2.c (build_allocator): Set TREE_THIS_NOTRAP on the
862 dereference of the pointer to the storage area. Remove useless type
863 conversions and factor out common code.
864
1aa291f7
EB
8652011-09-26 Eric Botcazou <ebotcazou@adacore.com>
866
867 * gcc-interface/utils.c (maybe_unconstrained_array): Declare TYPE local
868 variable and use it throughout.
869 <UNCONSTRAINED_ARRAY_TYPE>: Add 'break' at the end.
870 <RECORD_TYPE>: Do not unconditionally convert to the unpadded type as a
871 first step. Also convert to the unpadded type as a last step.
872
7d76717d
EB
8732011-09-26 Eric Botcazou <ebotcazou@adacore.com>
874
875 * gcc-interface/gigi.h (create_subprog_decl): Replace TREE_CHAIN with
876 DECL_CHAIN in comment.
877 * gcc-interface/trans.c (gigi): Likewise.
878 (Attribute_to_gnu): Likewise.
879 (build_function_stub): Likewise.
880 (gnat_to_gnu): Likewise.
881 * gcc-interface/utils.c (create_subprog_decl): Likewise.
882 (convert_vms_descriptor64): Likewise.
883 (convert_vms_descriptor32): Likewise.
884
42acad07
EB
8852011-09-26 Eric Botcazou <ebotcazou@adacore.com>
886
887 * gcc-interface/trans.c (assoc_to_constructor): Minor tweaks.
888 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting
889 issues. Use COMPLETE_TYPE_P in assertion. Also set TREE_READONLY if
890 the type of the record is TYPE_READONLY.
891
a1d72281
EB
8922011-09-26 Eric Botcazou <ebotcazou@adacore.com>
893 Robert Dewar <dewar@adacore.com>
894
895 * sem_ch6.adb (Set_Formal_Mode): Set Can_Never_Be_Null on an IN or IN
896 OUT formal parameter which is of an null-exclusion access subtype.
897
a1c7d797
EB
8982011-09-26 Eric Botcazou <ebotcazou@adacore.com>
899
900 * gcc-interface/ada-tree.h (DECL_CAN_NEVER_BE_NULL_P): New macro.
901 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Set the flag.
902 (gnat_to_gnu_param): Likewise.
903 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Invoke
904 maybe_unconstrained_array instead of doing the work manually.
905 (maybe_unconstrained_array): Propagate the TREE_THIS_NOTRAP flag.
906 * gcc-interface/utils2.c (build_unary_op) <INDIRECT_REF>: If operand
907 is a DECL with the flag, set TREE_THIS_NOTRAP on the reference.
908 (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
909 (gnat_stabilize_reference): Likewise.
910
50179d58
EB
9112011-09-26 Eric Botcazou <ebotcazou@adacore.com>
912
913 * gcc-interface/ada-tree.h (TYPE_NULL_BOUNDS): New macro.
914 (SET_TYPE_NULL_BOUNDS): Likewise.
915 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set again
916 TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
917 * gcc-interface/trans.c (Identifier_to_gnu): Return initializers of fat
918 pointer types.
919 * gcc-interface/utils.c (create_var_decl_1): If the object is external,
920 check that the initializer is a valid constant expression for use in
921 initializing a static variable. Add missing guard.
922 (update_pointer_to): Adjust TYPE_NULL_BOUNDS if set.
923 (convert_to_fat_pointer): In the null fat pointer case, build a valid
924 pointer for the bounds.
925 * gcc-interface/utils2.c (compare_fat_pointers): New function.
926 (build_binary_op) <EQ_EXPR>: Call it to compare fat pointers.
927
ad1d36ba
EB
9282011-09-25 Eric Botcazou <ebotcazou@adacore.com>
929
930 * gcc-interface/ada-tree.h (TREE_THIS_NOTRAP): Redefine.
931 * gcc-interface/trans.c (Identifier_to_gnu): Factor out common code in
932 the by-ref case. Do not set TREE_READONLY on a renamed object. Set
933 TREE_THIS_NOTRAP on UNCONSTRAINED_ARRAY_REF nodes.
934 (Attribute_to_gnu) <Attr_Length>: Expand the use of the parameter cache
935 to the indirect case.
936 * gcc-interface/utils.c (convert) <UNCONSTRAINED_ARRAY_REF>: Preserve
937 the TREE_THIS_NOTRAP flag.
938
6162cec0
EB
9392011-09-25 Eric Botcazou <ebotcazou@adacore.com>
940
941 * gcc-interface/trans.c (Loop_Statement_to_gnu): In the case of an
942 iteration scheme, always generate the do-while form if optimization
943 is enabled. Use more straightforward test at the end.
944
dee12fcd
EB
9452011-09-25 Eric Botcazou <ebotcazou@adacore.com>
946
947 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Subtype>: Use
948 XNEW instead of xmalloc. Do not build useless pointer type.
949 <E_Anonymous_Access_Subprogram_Type>: Use XNEW instead of xmalloc.
950 * gcc-interface/trans.c (gnat_to_gnu) <N_Raise_Constraint_Error>: Tidy.
951 * gcc-interface/utils2.c (build_unary_op): Remove local variable.
952
dea976c4
EB
9532011-09-25 Eric Botcazou <ebotcazou@adacore.com>
954
955 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
956 the alignment if this doesn't prevent BLKmode access to the object.
957
655ae828
IS
9582011-09-24 Iain Sandoe <iains@gcc.gnu.org>
959
960 * gcc-interface/Makefile.in (darwin): Do not issue the
961 '-flat_namespace' linker flag during Ada build.
962 * mlib-tgt-specific-darwin.adb: Remove '-flat_namespace' flag from the
963 default shared library options.
964
0e871c15
AO
9652011-09-19 Alexandre Oliva <aoliva@redhat.com>
966
967 * gcc-interface/decl.c (annotate_value): Look up expression for
968 insertion in the cache at the end.
969
1e6a52b4
AC
9702011-09-19 Arnaud Charlet <charlet@adacore.com>
971
972 * gcc-interface/Make-lang.in: Update dependencies.
973
a3068ca6
AC
9742011-09-19 Steve Baird <baird@adacore.com>
975
976 * snames.ads-tmpl: Move declaration of Name_Annotate into range of
977 configuration pragma names so that Is_Configuration_Pragma_Name
978 will return True for Name_Annotate. Make corresponding change in
979 Pragma_Id enumeration type. This is needed to allow an Annotate
980 pragma to occur in a configuration pragma file (typically,
981 a gnat.adc file).
982 * gnat_ugn.texi: Add Annotate to the list of configuration pragmas.
983 * gnat_rm.texi: Note that pragma Annotate may be used as a
984 configuration pragma.
985
9862011-09-19 Ed Schonberg <schonberg@adacore.com>
987
988 * a-cbmutr.adb, a-cbmutr.ads, a-cimutr.adb, a-cimutr.ads,
989 a-comutr.adb, a-comutr.ads: Add iterator machinery for multiway trees.
990
9912011-09-19 Yannick Moy <moy@adacore.com>
992
993 * exp_alfa.adb, exp_alfa.ads (Expand_Alfa_N_In): New function
994 for expansion of set membership.
995 (Expand_Alfa): Call expansion for N_In and N_Not_In nodes.
996 * exp_ch4.adb, exp_ch4.ads (Expand_Set_Membership): Make procedure
997 visible for use in Alfa expansion.
998 * sem_ch5.adb (Analyze_Iterator_Specification): Introduce loop
999 variable in Alfa mode.
1000
10012011-09-19 Thomas Quinot <quinot@adacore.com>
1002
1003 * s-osinte-darwin.ads: Change SIGADAABRT on Darwin to SIGABRT.
1004
10052011-09-19 Thomas Quinot <quinot@adacore.com>
1006
1007 * exp_ch9.adb: Minor reformatting.
1008
10092011-09-19 Hristian Kirtchev <kirtchev@adacore.com>
1010
1011 * freeze.adb (Build_Renamed_Body): Generic subprograms
1012 instantiations cannot be poperly inlined by the compiler, do
1013 not set the Body_To_Inline attribute in such cases.
1014 * sem_ch12.adb (Analyze_Subprogram_Instantiation): Inherit all
1015 inlining-related flags from the generic subprogram declaration.
1016
10172011-09-19 Thomas Quinot <quinot@adacore.com>
1018
1019 * exp_dist.adb, rtsfind.ads, sem_util.adb, sem_util.ads
1020 (Build_Stub_Type): Remove, instead copy components from
1021 System.Partition_Interface.RACW_Stub_Type.
1022 (RPC_Receiver_Decl): Remainder of code from old Build_Stub_Type routine.
1023 (Copy_Component_List): New subprogram.
1024
10252011-09-19 Yannick Moy <moy@adacore.com>
1026
1027 * lib-xref.adb (Generate_Reference): Ignore references to
1028 constants in Standard.
1029
e7fceebc
AC
10302011-09-19 Robert Dewar <dewar@adacore.com>
1031
1032 * err_vars.ads, errout.ads: Minor reformatting.
1033
10342011-09-19 Robert Dewar <dewar@adacore.com>
1035
1036 * aspects.ads (Impl_Defined_Aspects): New array
1037 * lib-writ.adb (No_Dependences): New name for No_Dependence
1038 * restrict.adb (No_Dependences): New name for No_Dependence
1039 (Check_Restriction_No_Specification_Of_Aspect): New
1040 procedure.
1041 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1042 (Restricted_Profile_Result): New variable
1043 (No_Specification_Of_Aspects): New variable
1044 (No_Specification_Of_Aspect_Warning): New variable
1045 * restrict.ads (No_Dependences): New name for No_Dependence
1046 (Check_Restriction_No_Specification_Of_Aspect): New procedure
1047 (Set_Restriction_No_Specification_Of_Aspect): New procedure
1048 * s-rident.ads: Add restriction
1049 No_Implementation_Aspect_Specifications, this is also added to
1050 the No_Implementation_Extensions profile.
1051 * sem_ch13.adb (Analyze_Aspect_Specifications): Check
1052 No_Implementation_Defined_Aspects
1053 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1054 * sem_prag.adb (Analyze_Aspect_Specifications): Check
1055 No_Implementation_Aspects
1056 (Analyze_Aspect_Specifications): Check No_Specification_Of_Aspect
1057 * snames.ads-tmpl (Name_No_Specification_Of_Aspect): New name
1058
10592011-09-19 Yannick Moy <moy@adacore.com>
1060
1061 * lib-xref.adb (Generate_Reference): Take into account multiple
1062 renamings for Alfa refs.
1063
10642011-09-19 Thomas Quinot <quinot@adacore.com>
1065
1066 * g-socthi-mingw.adb: Minor reformatting.
1067
10682011-09-19 Yannick Moy <moy@adacore.com>
1069
1070 * gnat1drv.adb (Adjust_Global_Switches): Set tagged type
1071 expansion to False in mode Alfa
1072
10732011-09-19 Pascal Obry <obry@adacore.com>
1074
1075 * mingw32.h: Remove obsolete code needed for old versions
1076 of MingW.
1077
e5a163fc
RD
10782011-09-19 Robert Dewar <dewar@adacore.com>
1079
1080 * errout.ads: Minor reformatting.
1081
6d7e5c54
AC
10822011-09-19 Ed Schonberg <schonberg@adacore.com>
1083
1084 * sem_ch6.adb (Analyze_Expression_Function): When the expression
1085 function is transformed into a declaration and a body, insert
1086 body at the end of the declarative part, to prevent premature
1087 freeze actions, and preserve original specification in the
1088 subprogram declaration.
1089
10902011-09-19 Vincent Celier <celier@adacore.com>
1091
1092 * projects.texi: Minor editing.
1093
99ba07a3
AC
10942011-09-19 Robert Dewar <dewar@adacore.com>
1095
1096 * sem_aggr.adb, lib-writ.ads, s-restri.ads, sem_ch6.adb,
1097 exp_aggr.adb: Minor reformatting.
1098
10992011-09-19 Yannick Moy <moy@adacore.com>
1100
1101 * lib-xref.adb (Generate_Reference): Change entity referenced
1102 to underlying object if any, or else reference to the HEAP.
1103
41781043
AC
11042011-09-15 Arnaud Charlet <charlet@adacore.com>
1105
1106 * gcc-interface/Make-lang.in: Update dependencies.
1107
804ff4c3
AC
11082011-09-15 Robert Dewar <dewar@adacore.com>
1109
1110 * tree_io.ads: Minor reformatting.
1111 * a-intnam.ads: Fix bad header.
1112
11132011-09-15 Thomas Quinot <quinot@adacore.com>
1114
1115 * a-exexpr-gcc.adb: Minor reformatting.
1116
11172011-09-15 Yannick Moy <moy@adacore.com>
1118
1119 * sem_ch6.adb: Propagate information that an expression function comes
1120 from source (otherwise references to this entity are not stored).
1121
0b5b2bbc
AC
11222011-09-15 Robert Dewar <dewar@adacore.com>
1123
1124 * a-cdlili.adb, a-coinve.adb, a-stzunb-shared.ads, a-suezst.adb,
1125 a-suenco.adb, a-stwiun-shared.ads, a-cobove.adb, a-convec.adb,
1126 a-btgbso.adb, a-cbdlli.adb, a-suewst.adb: Minor reformatting.
1127
11282011-09-15 Ed Schonberg <schonberg@adacore.com>
1129
1130 * sem_ch6.adb (Analyze_Expression_Function): Code cleanup:
1131 if the expression function is not a completion, create a
1132 new specification for the generated declaration, and keep the
1133 original specification in the generated body. Shorter code also
1134 ensures that proper warnings are generated for unused formals
1135 in all cases.
1136
11372011-09-15 Sergey Rybin <rybin@adacore.com>
1138
1139 * tree_io.ads: Update ASIS_Version_Number because of the changes
1140 in the tree structures for expression functions.
1141
11422011-09-15 Arnaud Charlet <charlet@adacore.com>
1143
1144 * s-osinte-aix.ads, s-osinte-darwin.ads, s-osinte-freebsd.ads,
1145 s-osinte-hpux.ads, s-osinte-lynxos.ads, s-osinte-solaris-posix.ads,
1146 s-taprop-posix.adb (CLOCK_MONOTONIC): New constant.
1147 (CLOCK_REALTIME): Fix wrong value on some OSes.
1148 * s-taprop-posix.adb (Monotonic_Clock): Use CLOCK_MONOTONIC.
1149
7e169899
EB
11502011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1151
1152 * gcc-interface/utils.c (maybe_unconstrained_array): In the reference
1153 to unconstrained array case, deal with each branch of a COND_EXPR.
1154 * gcc-interface/utils2.c (build_allocator): Deal with each branch of
1155 a COND_EXPR in the initializer, if present.
1156
819a653e
EB
11572011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1158
1159 * gcc-interface/decl.c (maybe_pad_type): Do not try to change the form
1160 of an addressable type.
1161 * gcc-interface/trans.c (gnat_gimplify_expr) <VIEW_CONVERT_EXPR>: New.
1162 Deal with those cases for which creating a temporary is mandatory.
1163
c946adde
EB
11642011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1165
1166 * gcc-interface/trans.c (call_to_gnu): Use local variable. Make sure
1167 this is a real formal parameter before testing whether it is by ref.
1168
dddf8120
EB
11692011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1170
1171 * gcc-interface/gigi.h (build_call_0_expr): Delete.
1172 (build_call_1_expr): Likewise.
1173 (build_call_2_expr): Likewise.
1174 (build_call_n_expr): New prototype.
1175 * gcc-interface/decl.c (gnat_to_gnu_entity): Use build_call_n_expr.
1176 * gcc-interface/trans.c (establish_gnat_vms_condition_handler): Ditto.
1177 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
1178 (Exception_Handler_to_gnu_zcx): Likewise.
1179 (gnat_to_gnu): Likewise.
1180 (build_binary_op_trapv): Likewise.
1181 * gcc-interface/utils2.c (build_call_0_expr): Delete.
1182 (build_call_1_expr): Likewise.
1183 (build_call_2_expr): Likewise.
1184 (build_call_n_expr): New function.
1185 (build_call_raise): Use build_call_n_expr.
1186 (build_call_raise_range): Likewise.
1187 (build_call_raise_column): Likewise.
1188 (build_call_alloc_dealloc_proc): Likewise.
1189 (maybe_wrap_malloc): Likewise.
1190 (maybe_wrap_free): Likewise.
1191
d8e38554
EB
11922011-09-11 Eric Botcazou <ebotcazou@adacore.com>
1193
1194 * gcc-interface/trans.c (build_return_expr): Use void_type_node for
1195 MODIFY_EXPR.
1196 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Assert that
1197 the result type is null if ENABLE_CHECKING. Set operation_type at the
1198 end unconditionally if not set in the previous cases.
1199 Use build2 and void_type_node for MODIFY_EXPR.
1200 (build_allocator): Use NULL_TREE for MODIFY_EXPR.
1201
416de7d5
EB
12022011-09-08 Eric Botcazou <ebotcazou@adacore.com>
1203
1204 * gcc-interface/utils.c (unchecked_convert): Use a field of the right
1205 precision when converting to or from an integral type whose precision
1206 is not equal to its size.
1207
88b76013
IS
12082011-09-08 Iain Sandoe <iains@gcc.gnu.org>
1209
416de7d5 1210 * traceback.c (Darwin) USE_GCC_UNWINDER for Darwin versions >= 8.
88b76013 1211
1aeee5ad
IS
12122011-09-07 Iain Sandoe <iains@gcc.gnu.org>
1213
416de7d5 1214 * gcc-interface/Makefile.in (darwin): Provide powerpc64 system
1aeee5ad
IS
1215 implementation.
1216 * system-darwin-ppc64.ads: New file.
1217
f61fc398
IS
12182011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1219
1220 * gcc-interface/Makefile.in (gnatlib-shared-darwin): Remove
1221 reference to "-lm".
1222
84ef27d3
IS
12232011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1224
1225 * gcc-interface/Makefile.in (darwin, SO_OPTS): Provide architecture
1226 size switches to the link phase for shared libs.
1227
a1bf1ec7
IS
12282011-09-06 Iain Sandoe <iains@gcc.gnu.org>
1229
416de7d5 1230 * gcc-interface/Makefile.in (x86_64 darwin arch): Adjust
a1bf1ec7
IS
1231 LIBGNAT_TARGET_PAIRS for x86 and x86_64 variants.
1232
e972fd52
AC
12332011-09-06 Arnaud Charlet <charlet@adacore.com>
1234
1235 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in
1236 (gnattools, regnattools, cross-gnattools, canadian-gnattools,
1237 gnatlib, gnatlib-sjlj, gnatlib-zcx, gnatlib-shared, gnatlib_and_tools):
1238 New targets.
1239 (TOOLS_FLAGS_TO_PASS): New.
1240 (../stamp-tools): Reintroduce, to avoid merge conflicts.
1241
ef417be1
RD
12422011-09-06 Robert Dewar <dewar@adacore.com>
1243
1244 * sem_ch10.adb, impunit.ads, impunit.adb (Not_Impl_Defined_Unit): New
1245 name for Is_RM_Defined_Unit. Also several fixes to this unit.
1246
0a034606
RD
12472011-09-06 Robert Dewar <dewar@adacore.com>
1248
1249 * impunit.ads, impunit.adb (Is_RM_Defined_Unit): New function.
1250 * s-rident.ads: New restriction No_Implementation_Units
1251 (this restriction is also part of the profile
1252 No_Implementation_Extensions)
1253 * sem_ch10.adb (Analyze_With_Clause): Add check for
1254 No_Implementation_Units restriction.
1255
ebb6faaa
AC
12562011-09-06 Jerome Guitton <guitton@adacore.com>
1257
1258 * sysdep.c (__gnat_get_task_options): Disable VX_SPE_TASK
1259 on vThreads.
1260
12612011-09-06 Thomas Quinot <quinot@adacore.com>
1262
1263 * s-solita.adb: Minor reformatting.
1264
12652011-09-06 Ed Schonberg <schonberg@adacore.com>
1266
1267 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The body that
1268 is a rewriting of an expression function does not freeze previous
1269 entities.
1270
12712011-09-06 Robert Dewar <dewar@adacore.com>
1272
1273 * impunit.adb (Is_Known_Unit): Fix bad handling of Ada 2012 case
1274
60435286
TG
12752011-09-06 Tristan Gingold <gingold@adacore.com>
1276
1277 * gcc-interface/Makefile.in: Handle e500v2-wrs-vxworksae like
1278 powerpc-wrs-vxworksae.
1279
08f8a983
AC
12802011-09-06 Thomas Quinot <quinot@adacore.com>
1281
1282 * s-os_lib.ads (Spawn): Minor documentation clarification,
1283 Success is True for a zero exit status.
1284
12852011-09-06 Ed Schonberg <schonberg@adacore.com>
1286
1287 * sem_ch5.adb: Add message for common iterator error.
1288
12892011-09-06 Ed Schonberg <schonberg@adacore.com>
1290
1291 * exp_ch3.adb (Build_Initialization_Call): If the target is a
1292 selected component discriminated by a current instance, replace
1293 the constraint with a reference to the target object, regardless
1294 of whether the context is an init_proc.
1295
12962011-09-06 Robert Dewar <dewar@adacore.com>
1297
1298 * exp_attr.adb: Descriptor_Size is never static.
1299
13002011-09-06 Robert Dewar <dewar@adacore.com>
1301
1302 * gnat_ugn.texi: Add documentation for LSLOC metric in gnatmetric
1303
13042011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1305
1306 * gnat_rm.texi: Clarify that attribute Descriptor_Size is
1307 non-static.
1308
13092011-09-06 Ed Schonberg <schonberg@adacore.com>
1310
1311 * sem_res.adb (Resolve): An expression that is the body of an
1312 expression function does not freeze.
1313
13142011-09-06 Matthew Heaney <heaney@adacore.com>
1315
1316 * a-csquin.ads, a-cusyqu.adb, a-cbprqu.adb, a-cbsyqu.adb,
1317 a-cuprqu.adb: Changed copyright notice to indicate current
1318 year only.
1319
13202011-09-06 Vincent Celier <celier@adacore.com>
1321
1322 * prj.adb: Minor spelling error fix in comment
1323 * sem_res.adb: Minor reformatting
1324
13252011-09-06 Pascal Obry <obry@adacore.com>
1326
1327 * sysdep.c (winflush_nt): Removed as not needed anymore.
1328 (winflush_95): Likewise.
1329 (winflush_init): Likewise.
1330 (winflush_function): Likewise.
1331 (getc_immediate_common): Remove call to winflush_function.
1332
cb3d8731
HK
13332011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1334
1335 * exp_attr.adb (Expand_N_Attribute_Reference): Rewrite the
1336 processing for Descriptor_Size.
1337 * gnat_rm.texi: Rephrase the wording for attribute Descriptor_Size
1338 to account for its broader usage.
1339 * sem_attr.adb (Analyze_Attribute): Change the error detection
1340 circuitry for Descriptor_Size as the attribute is now applicable
1341 to all types.
1342
f7e6fc47
RD
13432011-09-06 Robert Dewar <dewar@adacore.com>
1344
1345 * sem_attr.adb, prj-nmsc.adb, exp_aggr.adb: Minor reformatting.
1346
f8e9fc30
AC
13472011-09-06 Ed Schonberg <schonberg@adacore.com>
1348
1349 * lib-xref.adb (OK_To_Set_Referenced): A reference to a formal
1350 in a parameter association must not set the Referenced flag on
1351 the formal.
1352 * prj-nmsc.adb (Check_File_Naming_Schemes): Remove useless formal
1353
13542011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1355
1356 * gnat_rm.texi: Add a section on attribute Descriptor_Size
1357
e8e38f35
AC
13582011-09-06 Arnaud Charlet <charlet@adacore.com>
1359
1360 * gcc-interface/Makefile.in (common-tools, gnatmake-re,
1361 gnatlink-re): Speed up by using -j0.
1362
ba759acd
AC
13632011-09-06 Yannick Moy <moy@adacore.com>
1364
1365 * sem_ch13.adb (Analyze_Aspect_Specifications): Call
1366 Set_Corresponding_Aspect when creating pragma from aspect.
1367 (Add_Predicates): Use new field Corresponding_Aspect.
1368 * sem_prag.adb (Analyze_Pragma): Make Pname hold source aspect
1369 name when present, for the purpose of issuing error messages;
1370 remove local procedure Error_Pragma_Arg_Alternate_Name.
1371 * sinfo.adb, sinfo.ads (Corresponding_Aspect): New field in
1372 N_Pragma node.
1373 (From_Dynamic_Predicate, From_Static_Predicate): Remove fields from
1374 N_Pragma node.
1375
13762011-09-06 Robert Dewar <dewar@adacore.com>
1377
1378 * checks.adb, s-except.ads, g-socket.adb: Minor reformatting.
1379
13802011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1381
1382 * exp_ch6.adb (Build_Heap_Allocator): Add new
1383 local variable Desig_Typ. Code and comment reformatting. Add
1384 machinery to ensure that the allocation uses a fat pointer when
1385 the type of the return object is a constrained array and the
1386 function return type is an unconstrained array.
1387
13882011-09-06 Vincent Celier <celier@adacore.com>
1389
1390 * make.adb, prj-part.adb, prj-nmsc.adb: Remove unused formal
1391 parameters in subprograms.
1392
13932011-09-06 Arnaud Charlet <charlet@adacore.com>
1394
1395 * s-taprop-mingw.adb (Finalize_TCB): Fix typo.
1396
13972011-09-06 Thomas Quinot <quinot@adacore.com>
1398
1399 * s-taprop-vxworks.adb, s-tpoaal.adb, s-tpopsp-vxworks.adb
1400 (System.Tasking.Primitive_Operations.Specific.Delete): Remove
1401 subprogram.
1402 (System.Tasking.Primitive_Operations.Specific.Set): If argument
1403 is null, destroy task specific data, to make API consistent with
1404 other platforms, and thus compatible with the shared version
1405 of s-tpoaal.adb.
1406 (System.Tasking.Primitive_Operations.ATCB_Allocation.Free_ATCB):
1407 Document the above assumption.
1408
f4f92d9d
AC
14092011-09-06 Ed Schonberg <schonberg@adacore.com>
1410
1411 * exp_ch6.adb (Expand_Inlined_Call): Fix use of uninitialized
1412 variable for type of return value when return type is
1413 unconstrained and context is an assignment.
1414
14152011-09-06 Ed Schonberg <schonberg@adacore.com>
1416
1417 * sem_ch8.adb (Check_Class_Wide_Actual): Do not generate body of
1418 class-wide operation if expansion is not enabled.
1419
14202011-09-06 Eric Botcazou <ebotcazou@adacore.com>
1421
1422 * checks.adb (Apply_Scalar_Range_Check): Deal with access
1423 type prefix.
1424
14252011-09-06 Yannick Moy <moy@adacore.com>
1426
1427 * sem_ch13.adb (Analyze_Aspect_Specifications, case
1428 Aspect_Invariant): Do not issue error at this point on illegal
1429 pragma placement, as this is checked later on when analyzing
1430 the corresponding pragma.
1431 * sem_prag.adb (Error_Pragma_Arg_Alternate_Name): New procedure
1432 similar to Error_Pragma_Arg, except the source name of the
1433 aspect/pragma to use in warnings may be equal to parameter
1434 Alt_Name (Analyze_Pragma, case Pragma_Invariant): refine error
1435 message to distinguish source name of pragma/aspect, and whether
1436 the illegality resides in the type being public, or being private
1437 without a public declaration
1438
14392011-09-06 Thomas Quinot <quinot@adacore.com>
1440
1441 * g-socket.adb (Check_For_Fd_Set): On Windows, no need for bitmap
1442 size check (fd_set is implemented differently on that platform).
1443
14442011-09-06 Thomas Quinot <quinot@adacore.com>
1445
1446 * s-taprop-vxworks.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1447 s-tpoaal.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
1448 s-taprop-solaris.adb, s-taprop-irix.adb, s-taprop.ads,
1449 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-posix.adb
1450 (ATCB_Allocation): New subpackage of
1451 System.Tasking.Primitive_Operations, shared across all targets
1452 with full tasking runtime.
1453 (ATCB_Allocation.New_ATCB): Moved there (from target specific
1454 s-taprop bodies).
1455 (ATCB_Allocation.Free_ATCB): New subprogram. Deallocate an ATCB,
1456 taking care of establishing a local temporary ATCB if the one
1457 being deallocated is Self, to avoid a reference to the freed
1458 ATCB in Abort_Undefer.
1459
14602011-09-06 Thomas Quinot <quinot@adacore.com>
1461
1462 * s-tassta.adb, s-taskin.ads (Free_Task): If the task is not
1463 terminated, mark it for deallocation upon termination.
1464 (Terminate_Task): Call Free_Task again if the task is marked
1465 for automatic deallocation upon termination.
1466
df177175
RD
14672011-09-06 Robert Dewar <dewar@adacore.com>
1468
1469 * a-cbprqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cusyqu.ads,
1470 a-intnam-aix.ads, a-intnam-darwin.ads, a-intnam-dummy.ads,
1471 a-intnam-freebsd.ads, a-intnam-hpux.ads, a-intnam-irix.ads,
1472 a-intnam-linux.ads, a-intnam-lynxos.ads, a-intnam-mingw.ads,
1473 a-intnam-solaris.ads, a-intnam-tru64.ads,
1474 a-intnam-vms.ads, a-intnam-vxworks.ads, a-intnam.ads, interfac.ads,
1475 cstand.adb, s-maccod.ads: Mark all entities as Implementation_Defined
1476 * einfo.ads, einfo.adb (Is_Implementation_Defined): New flag
1477 * par-prag.adb: Add dummy entry for pragma Implementation_Defined
1478 * s-rident.ads: Add new restriction No_Implementation_Identifiers
1479 Add new profile No_Implementation_Extensions
1480 * sem_prag.adb: Implement pragma Implementation_Defined Implement
1481 profile No_Implementation_Extensions
1482 * sem_util.adb: Minor reformatting (Set_Entity_With_Style_Check):
1483 Check violation of restriction No_Implementation_Identifiers
1484 * snames.ads-tmpl: Add entries for pragma Implementation_Defined
1485 Add entry for Name_No_Implementation_Extensions
1486
14872011-09-06 Robert Dewar <dewar@adacore.com>
1488
1489 * impunit.ads: Minor reformatting.
1490
b991dd43
AC
14912011-09-06 Robert Dewar <dewar@adacore.com>
1492
1493 * ali.adb, sem_ch13.adb, lib-xref.adb: Minor reformatting.
1494
14952011-09-06 Pascal Obry <obry@adacore.com>
1496
1497 * s-osinte-linux.ads, s-oscons-tmplt.c: Use oscons to define sigset_t
1498 types.
1499
516785cc
AC
15002011-09-06 Robert Dewar <dewar@adacore.com>
1501
1502 * g-socket.adb: Minor reformatting
1503
15042011-09-06 Javier Miranda <miranda@adacore.com>
1505
1506 * ali.adb (Scan_ALI): Add missing support to load references of
1507 entities imported from other languages.
1508 * ali.ads (Xref_Record): Adding new fields to store the language and
1509 name of an imported entity.
1510 * lib-xref.adb (Output_Import_Export_Info): Fix typo
1511 in comment.
1512
15132011-09-06 Ed Schonberg <schonberg@adacore.com>
1514
1515 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): A type invariant
1516 is allowed on a full type declaration if it is the completion of
1517 a private declarations.
1518 * sem_ch13.adb (Analyze_Aspect_Specifications): An invariant
1519 aspect is allowed on a full type declaration in the private part
1520 of a package.
1521
96691943
AC
15222011-09-06 Robert Dewar <dewar@adacore.com>
1523
1524 * sem_ch8.ads: Minor reformatting
1525
15262011-09-06 Thomas Quinot <quinot@adacore.com>
1527
1528 * s-oscons-tmplt.c, g-socket.adb (GNAT.Sockets.Clear,Set,Is_Set):
1529 Guard against socket values that are not in [0;FD_SETSIZE[
1530
54bf19e4
AC
15312011-09-06 Robert Dewar <dewar@adacore.com>
1532
1533 * s-osinte-linux.ads, a-iteint.ads, exp_ch6.adb, s-solita.adb: Minor
1534 reformatting.
1535
15362011-09-06 Arnaud Charlet <charlet@adacore.com>
1537
1538 * s-linux-alpha.ads: Minor reformatting
1539 * s-oscons-tmplt.c: Fix generated comments in s-oscons template.
1540 Use sizeof instead of corresponding C defines in s-oscons template.
1541
5d42cba1
VG
15422011-09-06 Vadim Godunko <godunko@adacore.com>
1543
1544 * a-convec.ads, a-iteint.ads: Minor reformatting.
1545
77aa62e7
AC
15462011-09-06 Vincent Celier <celier@adacore.com>
1547
1548 * projects.texi: Add menus and @node lines.
1549
15502011-09-06 Ed Schonberg <schonberg@adacore.com>
1551
1552 * exp_ch6.adb (Expand_Inlined_Call): Handle properly the case
1553 where the return type is an unconstrained array and the context
1554 is an assignment. Optimize the case when the target of the
1555 assignment is a selected component.
1556
15572011-09-06 Arnaud Charlet <charlet@adacore.com>
1558
1559 * s-solita.adb: Update comments.
1560
15612011-09-06 Pascal Obry <obry@adacore.com>
1562
1563 * s-linux.ads, s-linux-alpha.ads, s-linux-hppa.ads, s-linux-mipsel.ads,
1564 s-linux-sparc.ads: Remove hard coded and now wrong definitions.
1565 * s-oscons-tmplt.c: Add support for generating pthread related
1566 types size on GNU/Linux as done for Darwin.
1567 * s-osinte-linux.ads: Use s-oscons to define the pthread types.
1568
886b5a18
AC
15692011-09-06 Robert Dewar <dewar@adacore.com>
1570
1571 * exp_ch6.adb: Fix minor typo.
1572
15732011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1574
1575 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1576 (Alignment_Of): Moved to the body of Nearest_Multiple_Rounded_Up.
1577 (Double_Size_Of): Alphabetized. Update the comment on usage.
1578 (Make_Finalize_Address_Stmts): Update comments and reformat code.
1579 (Nearest_Multiple_Rounded_Up): New routine.
1580 (Size_Of): Update comment on usage. The generated expression now
1581 accounts for alignment gaps by rounding the size of the type to the
1582 nearest multiple rounded up of the type's alignment.
1583
57a3fca9
AC
15842011-09-06 Robert Dewar <dewar@adacore.com>
1585
1586 * exp_ch7.adb, g-comlin.adb: Minor reformatting.
1587
15882011-09-06 Steve Baird <baird@adacore.com>
1589
1590 * exp_ch4.adb (Expand_Allocator_Expression): Look through
1591 derived subprograms in checking for presence of an
1592 Extra_Accessibility_Of_Result formal parameter.
1593 * exp_ch6.adb (Expand_Call): Look through derived subprograms in
1594 checking for presence of an Extra_Accessibility_Of_Result formal
1595 parameter.
1596 (Expand_Call.Add_Actual_Parameter): Fix a bug in the
1597 case where the Parameter_Associatiations attribute is already set,
1598 but set to an empty list.
1599 (Needs_Result_Accessibility_Level):
1600 Unconditionally return False. This is a temporary
1601 change, disabling the Extra_Accessibility_Of_Result
1602 mechanism.
1603 (Expand_Simple_Function_Return): Check for
1604 Extra_Accessibility_Of_Result parameter's presence instead of
1605 testing Ada_Version when generating a runtime accessibility
1606 check which makes use of the parameter.
1607
eaed0c37
AC
16082011-09-06 Ed Schonberg <schonberg@adacore.com>
1609
1610 * exp_ch4.adb (Expand_N_Case_Expression): Actions created for the
1611 expression in a given case alternative must be attached to the
1612 statement list of the ccrresponding case statement alternative
1613 They cannot be propagated ahead of the case statement, because
1614 the validity of the expression that generated the action may
1615 hold only for that alternative.
1616
16172011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1618
1619 * exp_ch7.adb: Remove with and use clauses for Get_Targ.
1620 (Alignment_Of): Remove the code for strict alignment targets.
1621 (Double_Alignment_Of): Removed.
1622 (Double_Size_Of): New routine.
1623 (Make_Finalize_Address_Stmts): Change the
1624 calculation of the dope's size. Update relevant comments.
1625 (Size_Of): New routine.
1626
b8a93198
AC
16272011-09-06 Steve Baird <baird@adacore.com>
1628
1629 * einfo.ads (Extra_Accessibility): Update associated comment to use
1630 the term "present" correctly ("present" just means that it is not
1631 an error to query the value of the attribute - it does not imply
1632 that the value must be non-null).
1633 (Extra_Constrained): Ditto.
1634 (Is_Visible_Formal): Ditto.
1635 (Extra_Accessibility_Of_Result) Ditto; also add Inline pragma.
1636 (Set_Extra_Accessibility_Of_Result): Add Inline pragma.
1637 * exp_ch4.adb (Expand_Allocator_Expression): Improve a comment.
1638 * exp_ch6.adb (Expand_Call): The callee may require an
1639 Extra_Accessibility_Of_Result actual parameter even if Ada_Version
1640 < Ada_2012. This can occur if the callee is exported from a Gnat
1641 runtimes unit. Also improve a comment.
1642
16432011-09-06 Hristian Kirtchev <kirtchev@adacore.com>
1644
1645 * exp_ch7.adb: Add with and use clauses for Get_Targ.
1646 (Alignment_Of): Rename formal parameter Some_Typ
1647 to Typ, update related comment. Use the allocator alignment on
1648 strict alignment targets such as SPARC.
1649 (Double_Alignment_Of): Rename formal parameter Some_Typ to Typ, update
1650 related comment.
1651
16522011-09-06 Gary Dismukes <dismukes@adacore.com>
1653
1654 * sem_ch9.adb (Check_Interfaces): Test
1655 Is_Limited_Type rather than Is_Limited_Record when checking that
1656 the partial view of a synchronized full view must be limited.
1657
16582011-09-06 Emmanuel Briot <briot@adacore.com>
1659
1660 * g-comlin.adb (Free): Fix memory leak.
1661
ebf494ec
RD
16622011-09-06 Robert Dewar <dewar@adacore.com>
1663
1664 * sem_util.adb, exp_ch6.adb: Minor reformatting and code reorganization.
1665
63585f75
SB
16662011-09-06 Steve Baird <baird@adacore.com>
1667
1668 * einfo.ads (Extra_Accessibility_Of_Result): New function; in the
1669 (Ada2012) cases described in AI05-0234 where the accessibility
1670 level of a function result is "determined by the point of
1671 call", an implicit parameter representing that accessibility
1672 level is passed in. Extra_Accessibilty_Of_Result yields this
1673 additional formal parameter. Extra_Accessibility_Of_Result
1674 is analogous to the existing Extra_Accessibility
1675 function used in the implementation of access parameters.
1676 (Set_Extra_Accessibility_Of_Result): New procedure; sets
1677 Extra_Accessibility_Of_Result attribute.
1678 * einfo.adb (Extra_Accessibility_Of_Result): New function.
1679 (Set_Extra_Accessibility_Of_Result): New procedure.
1680 (Write_Field19_Name): Display Extra_Accessibilty_Of_Result attribute.
1681 * sem_util.adb (Dynamic_Accessibility_Level): Set Etype of
1682 an accessibility level literal to Natural; introduce a nested
1683 function, Make_Level_Literal, to do this.
1684 * exp_ch6.ads (Needs_Result_Accessibility_Level): New function;
1685 determines whether a given function (or access-to-function
1686 type) needs to have an implicitly-declared accessibility-level
1687 parameter added to its profile.
1688 (Add_Extra_Actual_To_Call): Export an existing procedure which was
1689 previously declared in the body of Exp_Ch6.
1690 * exp_ch6.adb (Add_Extra_Actual_To_Call): Export declaration by moving
1691 it to exp_ch6.ads.
1692 (Has_Unconstrained_Access_Discriminants): New Function; a
1693 predicate on subtype entities which returns True if the given
1694 subtype is unconstrained and has one or more access discriminants.
1695 (Expand_Call): When expanding a call to a function which takes an
1696 Extra_Accessibility_Of_Result parameter, pass in the appropriate
1697 actual parameter value. In the case of a function call which is
1698 used to initialize an allocator, this may not be possible because
1699 the Etype of the allocator may not have been set yet. In this
1700 case, we defer passing in the parameter and handle it later in
1701 Expand_Allocator_Expression.
1702 (Expand_Simple_Function_Return): When returning from a function which
1703 returns an unconstrained subtype having at least one access
1704 discriminant, generate the accessibility check needed to ensure that
1705 the function result will not outlive any objects designated by its
1706 discriminants.
1707 (Needs_Result_Accessibility_Level): New function; see exp_ch6.ads
1708 description.
1709 * exp_ch4.adb (Expand_Allocator_Expression): When a function call
1710 is used to initialize an allocator, we may need to pass in "the
1711 accessibility level determined by the point of call" (AI05-0234)
1712 to the function. Expand_Call, where such actual parameters are
1713 usually generated, is too early in this case because the Etype of
1714 the allocator (which is used in determining the level to be passed
1715 in) may not have been set yet when Expand_Call executes. Instead,
1716 we generate code to pass in the appropriate actual parameter
1717 in Expand_Allocator_Expression.
1718 * sem_ch6.adb (Create_Extra_Formals): Create
1719 the new Extra_Accessibility_Of_Result formal if
1720 Needs_Result_Accessibility_Level returns True. This includes the
1721 introduction of a nested procedure, Check_Against_Result_Level.
1722
1a982c6e
AC
17232011-09-06 Arnaud Charlet <charlet@adacore.com>
1724
1725 * gcc-interface/Makefile.in (X86_TARGET_PAIRS): Remove duplicate
1726 declaration.
1727
e42bcfa3
AC
17282011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1729
1730 * s-finmas.adb (Set_Finalize_Address): Explain the reason
1731 for the synchronization. Move the test for null from
1732 s-stposu.Allocate_Any_Controlled to this routine since the check
1733 needs to be protected too.
1734 (Set_Heterogeneous_Finalize_Address): Explain the reason for the
1735 synchronization code.
1736 * s-finmas.ads (Set_Heterogeneous_Finalize_Address): Add comment
1737 explaining the context in which this routine is used.
1738 * s-stposu.adb (Allocate_Any_Controlled): Move the test for null
1739 to s-finmas.Set_Finalize_Address.
1740
17412011-09-05 Ed Schonberg <schonberg@adacore.com>
1742
1743 * einfo.ads: Document that itypes have no parent field.
1744
17452011-09-05 Robert Dewar <dewar@adacore.com>
1746
1747 * rtsfind.adb (Check_CRT): Check for overloaded entity
1748 * rtsfind.ads: Document that entities to be found by rtsfind
1749 cannot be overloaded
1750 * s-taenca.adb, s-tasren.adb, s-tpobop.adb, s-tpoben.ads, s-tpoben.adb
1751 (Lock_Entries_With_Status): New name for Lock_Entries with two
1752 arguments (changed to meet rtsfind no overloading rule).
1753
544e7c17
AC
17542011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1755
1756 * s-finmas.adb (Set_Finalize_Address (Address,
1757 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
1758 (Set_Finalize_Address (in out Finalization_Master,
1759 Finalize_Address_Ptr): Add synchronization code.
1760 * s-finmas.ads (Set_Finalize_Address (Address,
1761 Finalize_Address_Ptr)): Renamed to Set_Heterogeneous_Finalize_Address.
1762 * s-stposu.adb (Allocate_Any_Controlled): Update the call to
1763 Set_Finalize_Address for the heterogeneous case.
1764
17652011-09-05 Ed Schonberg <schonberg@adacore.com>
1766
1767 * sem_ch3.adb: Undo previous change, not suitable after all.
1768
17692011-09-05 Robert Dewar <dewar@adacore.com>
1770
1771 * einfo.ads: Minor comment clarification.
1772
0613fb33
AC
17732011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1774
1775 * exp_ch6.adb (Move_Activation_Chain): Rewritten. The routine
1776 no longer needs to search through the entities of the return
1777 statement scope to find the _chain.
1778 * sem_ch5.adb: Add with and use clauses for Exp_Ch6 and Sem_Ch6.
1779 (Analyze_Block_Statement): Add local variable
1780 Is_BIP_Return_Statement. Add machinery to install all entities
1781 produced by the expansion of the return object declaration.
1782 (Install_Return_Entities): New routine.
1783 * sem_ch6.ads, sem_ch6.adb (Install_Entity): Moved from body to spec.
1784
17852011-09-05 Ed Schonberg <schonberg@adacore.com>
1786
1787 * sem_ch10.adb (Analyze_Context): Apply simple fixup if context
1788 of subunit is incomplete.
1789 (Analyze_Proper_Body): If parent spec is not available, do not
1790 attempt analysis.
1791
5dcab3ca
AC
17922011-09-05 Ed Schonberg <schonberg@adacore.com>
1793
1794 * sem_disp.adb (Find_Controlling_Arg): Add checks for
1795 interface type conversions, that are expanded into dereferences.
1796
17972011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1798
1799 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
1800 Examine the parameter and return profile of a subprogram and swap
1801 any incomplete types coming from a limited context with their
1802 corresponding non-limited views.
1803 (Exchange_Limited_Views): New routine.
1804
18052011-09-05 Ed Schonberg <schonberg@adacore.com>
1806
1807 * sem_ch3.adb (Prepare_Private_Subtype_Completion): Set parent
1808 of internal entity to the subtype declaration, so that when
1809 entities are subsequently exchanged in a package body, the tree
1810 remains properly formatted for ASIS.
1811
8da1a312
AC
18122011-09-05 Johannes Kanig <kanig@adacore.com>
1813
1814 * g-comlin.adb (Set_Usage): Additional optional argument to set help
1815 message.
1816 (Display_Help): display the user given help message, if available.
1817
18182011-09-05 Ed Schonberg <schonberg@adacore.com>
1819
1820 * sem_ch3.adb (OK_For_Limited_Init_In_05): The expression
1821 is legal if the original node is an identifier that is a
1822 parameterless function call.
1823
69b73847
PO
18242011-09-05 Pascal Obry <obry@adacore.com>
1825
1826 * prj-nmsc.adb: Minor reformatting.
1827 Add support for standalone aggregate library.
1828 (Check_Stand_Alone_Library): Handle standalone aggregate library.
1829 * projects.texi: Fix documentation for aggregate library projects.
1830
81bf2382
AC
18312011-09-05 Robert Dewar <dewar@adacore.com>
1832
1833 * sem_ch6.adb: Minor reformatting.
1834
18352011-09-05 Matthew Gingell <gingell@adacore.com>
1836
1837 * s-tassta.adb (Task_Wrapper): Ensure that we don't try to write the
1838 stack guard page on PPC Linux. This patch ensures the 64K guard page at
1839 the bottom of the stack is not overwritten.
1840
13a0b1e8
AC
18412011-09-05 Thomas Quinot <quinot@adacore.com>
1842
1843 * exp_intr.adb, s-tasini.adb: Minor reformatting.
1844
18452011-09-05 Ed Schonberg <schonberg@adacore.com>
1846
1847 * sem_ch3.adb (Access_Definition): If an access type declaration
1848 appears in a child unit, the scope of whatever anonymous type
1849 may be generated is the child unit itself.
1850
18512011-09-05 Ed Schonberg <schonberg@adacore.com>
1852
1853 * sem_ch6.adb (Analyze_Expression_Function): Do not set
1854 Comes_From_Source on rewritten body.
1855 (Analyze_Subprogram_Body_Helper): Check that the original node for
1856 the body comes from source, when determining whether expansion
1857 of a protected operation is needed.
1858
20428725
AC
18592011-09-05 Ed Schonberg <schonberg@adacore.com>
1860
1861 * exp_aggr.adb (Replace_Type): If the target of the assignment is
1862 a selected component and the right-hand side is a self-referential
1863 access, the proper prefix of the rewritten attribute is a copy
1864 of the left-hand side, not of its prefix.
1865
18662011-09-05 Robert Dewar <dewar@adacore.com>
1867
1868 * sem_ch5.adb: Minor reformatting.
1869 * sem_ch3.adb: Minor code clean up.
1870
18712011-09-05 Jose Ruiz <ruiz@adacore.com>
1872
1873 * exp_ch9.adb (Make_Initialize_Protection): The fact that
1874 restriction No_Dynamic_Attachment is in effect or not should
1875 not influence the default priority associated to a protected
1876 object. With this change, when the restriction is in effect (as
1877 is the case for the Ravenscar profile) the default priority of
1878 a protected object with an interrupt handler is in the range of
1879 interrupt priorities (Default_Interrupt_Priority) as required
1880 by D.3(10).
1881
18822011-09-05 Arnaud Charlet <charlet@adacore.com>
1883
1884 * a-iteint.ads: Fix header.
1885
18862011-09-05 Vincent Celier <celier@adacore.com>
1887
1888 * prj-conf.adb (Do_Autoconf): Make sure Obj_Dir always ends
1889 with a directory separator to avoid output such as:
1890 "/path/to/objauto.cgpr" has been deleted.
1891
4a1bfefb
AC
18922011-09-05 Robert Dewar <dewar@adacore.com>
1893
1894 * sem_ch3.adb: Minor reformatting.
1895
18962011-09-05 Ed Schonberg <schonberg@adacore.com>
1897
1898 * sem_ch5.adb: Better error message.
1899
19002011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1901
1902 * exp_aggr.adb: Add with and use clause for Exp_Ch6.
1903 (Expand_Array_Aggregate): Detect a special case of an aggregate
1904 which contains tasks in the context of an unexpanded return
1905 statement of a build-in-place function.
1906 * exp_ch6.adb: Add with and use clause for Exp_Aggr.
1907 (Expand_N_Extended_Return_Statement): Detect a delayed aggregate
1908 which contains tasks and expand it now that the original simple
1909 return statement has been rewritten.
1910 * exp_ch9.adb (Build_Activation_Chain_Entity): Code
1911 reformatting. Do not create a chain for an extended return
1912 statement if one is already available.
1913 (Has_Activation_Chain): New routine.
1914
9ec080cb
AC
19152011-09-05 Marc Sango <sango@adacore.com>
1916
1917 * sem_ch3.adb (Analyze_Object_Declaration): Remove
1918 the wrong test and add the correct test to detect the violation
1919 of illegal use of unconstrained string type in SPARK mode.
1920
19212011-09-05 Ed Schonberg <schonberg@adacore.com>
1922
1923 * sem_ch5.adb (Analyze_Iteration_Specification): Improve error
1924 message on an iterator over an array.
1925
19262011-09-05 Robert Dewar <dewar@adacore.com>
1927
1928 * lib-xref-alfa.adb: Minor reformatting.
1929
aeae67ed
RD
19302011-09-05 Robert Dewar <dewar@adacore.com>
1931
1932 * sem_ch3.adb, sem_res.adb, par.adb, par-ch6.adb, g-comlin.adb,
1933 exp_ch6.adb, lib-xref-alfa.adb: Minor reformatting.
1934
d72e7628
AC
19352011-09-05 Gary Dismukes <dismukes@adacore.com>
1936
1937 * exp_ch7.adb, exp_ch6.adb: Minor reformatting.
1938
19392011-09-05 Johannes Kanig <kanig@adacore.com>
1940
1941 * lib-xref-alfa.adb: Update comments.
1942
19432011-09-05 Thomas Quinot <quinot@adacore.com>
1944
1945 * sem_res.adb: Minor reformatting
1946
0d566e01
ES
19472011-09-05 Ed Schonberg <schonberg@adacore.com>
1948
1949 * exp_ch6.adb (Build_In_Place_Formal): If extra formals are not
1950 present, create them now. Needed in case the return type was
1951 a limited view in the function declaration.
1952 (Make_Build_In_Place_Call_In_Allocator): If return type contains
1953 tasks, build the activation chain for it. Pass a reference to
1954 the Master_Id in call to Add_Task_Actuals_To_Build_In_Place call.
1955 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Clean up interface
1956 with build_in_place calls.
1957 * sem_ch9.adb (Analyze_Task_Type_Declaration): If partial view was
1958 incomplete, inatialize its Corresponding_Record_Type component.
1959 * sem_ch10.adb (Build_Chain): Initialize Private_Dependents field
1960 of limited views.
1961
ec09f261
AC
19622011-09-05 Johannes Kanig <kanig@adacore.com>
1963
1964 * lib-xref-alfa.adb (Is_Alfa_Reference): Filter constants from effect
1965 information.
1966
19672011-09-05 Ed Schonberg <schonberg@adacore.com>
1968
1969 * par-ch6.adb (P_Subprogram): In Ada2012 mode, if the subprogram
1970 appears within a package specification and the token after "IS"
1971 is not a parenthesis, assume that this is an unparenthesized
1972 expression function, even if the token appears in a line by
1973 itself.
1974 * par.adb: Clarify use of Labl field of scope stack in error
1975 recovery.
1976
7109f4f5
AC
19772011-09-05 Bob Duff <duff@adacore.com>
1978
1979 * sem_res.adb (Resolve_Intrinsic_Operator): Use unchecked
1980 conversions instead of normal type conversions in all cases where a
1981 type conversion would be illegal. In particular, use unchecked
1982 conversions when the operand types are private.
1983
19842011-09-05 Johannes Kanig <kanig@adacore.com>
1985
1986 * lib-xref-alfa.adb (Is_Alfa_Reference): Never declare effects on
1987 objects of task type or protected type.
1988
66dc8075
AC
19892011-09-05 Ed Schonberg <schonberg@adacore.com>
1990
1991 * sem_ch6.adb (Analyze_Expression_Function): If the expression
1992 function comes from source, indicate that so does its rewriting,
1993 so it is compatible with any subsequent expansion of the
1994 subprogram body (e.g. when it is a protected operation).
1995 * sem_ch4.adb: minor reformatting
1996
19972011-09-05 Hristian Kirtchev <kirtchev@adacore.com>
1998
1999 * lib.adb (Check_Same_Extended_Unit): Comment rewriting. Use
2000 Get_Source_Unit rather than Get_Code_Unit as instantiation unfolding
2001 may lead to wrong ancestor package in the case of instantiated subunit
2002 bodies. If a subunit is instantiated, follow the chain of instantiations
2003 rather than the stub structure.
2004
bd38b431
AC
20052011-09-02 Robert Dewar <dewar@adacore.com>
2006
2007 * sem_ch4.adb, sem_ch6.adb: Minor reformatting.
2008 * gcc-interface/Make-lang.in: Update dependencies.
2009
20102011-09-02 Marc Sango <sango@adacore.com>
2011
2012 * sem_ch3.adb (Analyze_Object_Declaration): Change
2013 comment and add additional check to differentiate constant of
2014 type string from others unconstrained type.
2015
99d520ad
ES
20162011-09-02 Ed Schonberg <schonberg@adacore.com>
2017
2018 * sinfo.ads, sinfo.adb: New semantic attribute Premature_Use,
2019 present in incomplete type declarations to refine the error
2020 message the full declaration is in the same unit.
2021 * sem_ch4.adb (Analyze_Selected_Component): If the prefix is of
2022 an incomplete type, set the Premature_Use for additional message.
2023 * sem_ch3.adb (Find_Type_Name): If partial view is incomplete
2024 and Premature_Use is set, place additional information at the
2025 point of premature use.
2026
5b5588dd
AC
20272011-09-02 Bob Duff <duff@adacore.com>
2028
2029 * sem_ch6.adb: (Check_Post_State): Suppress warning
2030 "postcondition refers only to pre-state" when the expression has not
2031 yet been analyzed, because it causes false alarms. This can happen when
2032 the postcondition contains a quantified expression, because those are
2033 analyzed later. This is a temporary/partial fix.
2034 (Process_Post_Conditions): Minor: change wording of warning.
2035
20362011-09-02 Marc Sango <sango@adacore.com>
2037
2038 * sem_ch3.adb (Analyze_Object_Declaration): Detect the violation of
2039 illegal use of unconstrained string type in SPARK mode.
2040 * sem_res.adb (Analyze_Operator_Symbol): Set the
2041 right place where the string operand of concatenation should be
2042 violate in SPARK mode.
2043
bd603506
RD
20442011-09-02 Robert Dewar <dewar@adacore.com>
2045
2046 * sem_prag.adb, sem_util.adb, sem_ch6.adb, prj-nmsc.adb,
2047 exp_ch3.adb: Minor reformatting.
2048
24a120ac
AC
20492011-09-02 Vincent Celier <celier@adacore.com>
2050
2051 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Declare "gcc"
2052 as the compiler driver so Is_Compilable returns True for sources.
2053 * prj-nmsc.adb (Override_Kind): When Kind is Sep, set the source
2054 for the body.
2055
20562011-09-02 Ed Schonberg <schonberg@adacore.com>
2057
2058 * sem_prag.adb (Analyze_PPC_In_Decl_Part): for a class-wide
2059 condition, a reference to a controlling formal must be interpreted
2060 as having the class-wide type (or an access to such) so that the
2061 inherited condition can be properly applied to any overriding
2062 operation (see ARM12 6.6.1 (7)).
2063
20642011-09-02 Tristan Gingold <gingold@adacore.com>
2065
2066 * init.c (__gnat_is_vms_v7): Fix case and add prototype
2067 for LIB$GETSYI.
2068
20692011-09-02 Javier Miranda <miranda@adacore.com>
2070
2071 * exp_ch3.adb (Expand_N_Object_Declaration): Do not copy the
2072 initializing expression of a class-wide interface object declaration
2073 if its type is limited.
2074
20752011-09-02 Johannes Kanig <kanig@adacore.com>
2076
2077 * sem_util.adb (Unique_Name): To obtain a unique name for enumeration
2078 literals, take into account the type name; the type is *not*
2079 the scope for an enumeration literal.
2080
20812011-09-02 Ed Schonberg <schonberg@adacore.com>
2082
2083 * sem_ch6.adb (Check_Overriding_Indicator): add special check
2084 to reject an overriding indicator on a user-defined Adjust
2085 subprogram for a limited controlled type.
2086
20872011-09-02 Ed Schonberg <schonberg@adacore.com>
2088
2089 * sem_res.adb (Resolve_Actuals): add missing call to Resolve
2090 for an actual that is a function call returning an unconstrained
2091 limited controlled type.
2092
20932011-09-02 Tristan Gingold <gingold@adacore.com>
2094
2095 * g-socthi-vms.adb (c_sendmsg, c_recvmsg): Use unpacked msg if on vms 7
2096
20972011-09-02 Johannes Kanig <kanig@adacore.com>
2098
2099 * alfa.ads (Name_Of_Heap_Variable): Change value of the HEAP variable
2100 from "HEAP" to __HEAP Change comment that refers to that variable
2101 * put_alfa.adb: Change comment that refers to that variable
2102
c5f5123f
AC
21032011-09-02 Robert Dewar <dewar@adacore.com>
2104
2105 * exp_ch4.adb, exp_ch6.adb, prj-nmsc.adb: Minor reformatting.
2106
21072011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2108
2109 * exp_util.adb (Extract_Renamed_Object): Renamed to
2110 Find_Renamed_Object. This routine has been reimplemented and now uses
2111 tree traversal to locate a renamed object.
2112 (Is_Aliased): Replace call to Extract_Renamed_Object with
2113 Find_Renamed_Object.
2114
21152011-09-02 Tristan Gingold <gingold@adacore.com>
2116
2117 * init.c: (__gnat_is_vms_v7): New function.
2118
21192011-09-02 Olivier Hainque <hainque@adacore.com>
2120
2121 * tracebak.c (STOP_FRAME, ppc elf/vxworks case): Stop on frames
2122 that have a misaligned backchain, necessarily bogus.
2123
2bfa5484
HK
21242011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2125
2126 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not create
2127 TSS routine Finalize_Address when compiling in Alfa mode.
2128 (Expand_Freeze_Record_Type): Do not create TSS routine
2129 Finalize_Address when compiling in Alfa mode.
2130 * exp_ch4.adb (Expand_Allocator_Expression): Do not produce a
2131 call to Set_Finalize_Address in Alfa mode because Finalize_Address is
2132 not built.
2133 (Expand_N_Allocator): Do not produce a call to
2134 Set_Finalize_Address in Alfa mode because Finalize_Address is not built.
2135 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not
2136 produce a call to primitive Set_Finalize_Address in Alfa mode because
2137 Finalize_Address is not built.
2138 * exp_ch7.adb (Build_Finalization_Master): Do not create
2139 finalization masters in Afa mode since they are not needed.
2140 (Build_Finalizer): Do not create scope and library-level
2141 finalizers in Alfa mode since they are not needed.
2142 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not expand
2143 "new" and "free" when applied to controlled objects in Alfa mode since
2144 this is not needed.
2145
7a0ddd20
AC
21462011-09-02 Vincent Celier <celier@adacore.com>
2147
2148 * prj-nmsc.db: (Check_Stand_Alone_Library): For SALs, allow
2149 only library names with the syntax of Ada identifiers, to avoid errors
2150 when compiling the binder generated files.
2151 * projects.texi: Document restriction on SAL library names
2152
21532011-09-02 Thomas Quinot <quinot@adacore.com>
2154
2155 * a-chtgbo.adb: Minor comment fix.
2156
439b6dfa
AC
21572011-09-02 Robert Dewar <dewar@adacore.com>
2158
2159 * lib-xref.adb: Minor reformatting
2160
21612011-09-02 Vincent Celier <celier@adacore.com>
2162
2163 * bindusg.adb, clean.adb, gnatchop.adb, gnatfind.adb, gnatlink.adb,
2164 gnatls.adb, gnatname.adb, gnatxref.adb, gprep.adb, makeusg.adb: Add
2165 --version and --help in usage.
2166 * switch.ads, switch.adb (Display_Usage_Version_And_Help): New procedure
2167
f2404867
AC
21682011-09-02 Bob Duff <duff@adacore.com>
2169
2170 * lib-xref.adb: (Hash): Avoid use of 'Mod attribute, because old
2171 compilers don't understand it.
2172
21732011-09-02 Gary Dismukes <dismukes@adacore.com>
2174
2175 * exp_attr.adb (Expand_N_Attribute_Reference): Pass the
2176 underlying subtype rather than its base type on the call to
2177 Build_Record_Or_Elementary_Input_Function, so that any
2178 constraints on a discriminated subtype will be available for
2179 doing the check required by AI05-0192.
2180 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2181 If the prefix subtype of the 'Input attribute is a constrained
2182 discriminated subtype, then check each constrained discriminant value
2183 against the corresponding value read from the stream.
2184
029b67ba
YM
21852011-09-02 Yannick Moy <moy@adacore.com>
2186
2187 * usage.adb, warnsw.adb, sem_ch6.adb, opt.ads: Disable by default
2188 warnings on suspicious contracts, and enable them with -gnatwa.
2189
dc36a7e3
RD
21902011-09-02 Robert Dewar <dewar@adacore.com>
2191
2192 * exp_util.adb, exp_ch9.adb, sem_attr.adb, sem_ch6.adb: Minor
2193 reformatting.
2194
d5aa443c
AC
21952011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2196
2197 * exp_ch9.adb (Install_Private_Data_Declarations): Add guards
2198 which ensure that restriction No_Dynamic_Attachment has not been
2199 violated.
2200 (Make_Initialize_Protection): Protected types with attach or
2201 interrupt handlers must not violate restriction No_Dynamic_Attachment.
2202 * exp_util.adb (Corresponding_Runtime_Package): Add a guard
2203 which ensures that restriction No_Dynamic_Attachment has not been
2204 violated.
2205 * sem_attr.adb: (Eval_Attribute): Transform
2206 VAX_Float_Type'First and 'Last into references to
2207 the temporaries which store the corresponding bounds. The
2208 transformation is needed since the back end cannot evaluate
2209 'First and 'Last on VAX.
2210 (Is_VAX_Float): New routine.
2211
22122011-09-02 Ed Schonberg <schonberg@adacore.com>
2213
2214 * sem_ch12.adb (Analyze_Subprogram_Instantiation): If the
2215 generic unit is not intrinsic and has an explicit convention,
2216 the instance inherits it.
2217
67c86178
AC
22182011-09-02 Robert Dewar <dewar@adacore.com>
2219
2220 * prj-dect.adb, prj-env.adb, prj-nmsc.adb, prj-proc.adb, prj-tree.adb,
2221 prj.adb, prj.ads, sem_ch5.adb: Minor reformatting.
2222
22232011-09-02 Thomas Quinot <quinot@adacore.com>
2224
2225 * sem_attr.adb (Analyze_Attribute, case Unrestriced_Access):
2226 Guard against a prefix that is an N_Has_Entity but has no
2227 associated entity.
2228
22292011-09-02 Yannick Moy <moy@adacore.com>
2230
2231 * lib-xref-alfa.adb (Is_Alfa_Reference): Ignore IN parameters in Alfa
2232 references.
2233
22342011-09-02 Yannick Moy <moy@adacore.com>
2235
2236 * opt.ads (Warn_On_Suspicious_Contract): New warning flag.
2237 * sem_ch3.adb (Analyze_Declarations): Call checker for suspicious
2238 contracts.
2239 * sem_ch6.adb, sem_ch6.ads (Check_Subprogram_Contract): New
2240 procedure looking for suspicious postconditions.
2241 * usage.adb (Usage): New options -gnatw.t and -gnatw.T.
2242 * warnsw.adb (Set_Dot_Warning_Switch): Take into account new
2243 options -gnatw.t and -gnatw.T.
2244
735ca1b9
PO
22452011-09-02 Pascal Obry <obry@adacore.com>
2246
2247 * prj.adb: Minor code refactoring. Move check for null project in
2248 Project_Changed.
2249 * projects.texi: Fix minor typos.
2250
86828d40
AC
22512011-09-02 Ed Schonberg <schonberg@adacore.com>
2252
2253 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
2254 of iteration is an expression, its value must be captured in a
2255 renaming declaration, so that modification of the elements is
2256 propagated to the original container.
2257
22582011-09-02 Pascal Obry <obry@adacore.com>
2259
2260 * prj-proc.adb, prj.adb, makeutl.adb, makeutl.ads, prj-dect.adb,
2261 prj-nmsc.adb, prj-util.adb, prj-conf.adb, prj-env.adb,
2262 prj-tree.adb: Minor reformatting and style fixes.
2263
83de674b
AC
22642011-09-02 Robert Dewar <dewar@adacore.com>
2265
2266 * s-rident.ads: Add new restriction No_Implicit_Aliasing
2267 * sem_attr.adb: (Analyze_Access_Attribute): Deal with
2268 No_Implicit_Aliasing
2269 (Analyze_Attribute, case Address): ditto
2270 (Analyze_Attribute, case Unrestricted_Access): ditto
2271 * sem_util.ads, sem_util.adb: (Is_Aliased_View): Handle
2272 No_Implicit_Aliasing restriction.
2273 * gnat_rm.texi: Add documentation for No_Implicit_Aliasing
2274
22752011-09-02 Ed Schonberg <schonberg@adacore.com>
2276
2277 * exp_util.adb: (Possible_Bit_Aligned_Object): If the object
2278 is an unchecked conversion, apply test to its expression.
2279
22802011-09-02 Javier Miranda <miranda@adacore.com>
2281
2282 * sem_ch3.adb (Check_Abstract_Overriding): When
2283 traversing the chain of aliased subprograms avoid reporting a
2284 redundant error on the current entity.
2285
22862011-09-02 Sergey Rybin <rybin@adacore.com>
2287
2288 * gnat_ugn.texi: Minor clean up.
2289
22902011-09-02 Bob Duff <duff@adacore.com>
2291
2292 * s-htable.adb (Set_If_Not_Present): Use renaming
2293 instead of ":=", because the type Key is limited in the generic (even
2294 if not in the instances).
2295
2c17ca0a
AC
22962011-09-02 Robert Dewar <dewar@adacore.com>
2297
2298 * exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb,
2299 g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor
2300 reformatting.
2301
23022011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2303
2304 * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an
2305 inherited component with the enclosing derived type. Code reformatting.
2306
23072011-09-02 Gary Dismukes <dismukes@adacore.com>
2308
2309 * checks.adb: (Determine_Range): Add test of OK1 to prevent the early
2310 return done when overflow checks are enabled, since comparisons against
2311 Lor and Hir should not be done when OK1 is False.
2312
23132011-09-02 Gary Dismukes <dismukes@adacore.com>
2314
2315 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
2316 Add new formal Master_Exp. When present, add that expression to the
2317 call as an extra actual.
2318 (Make_Build_In_Place_Call_In_Object_Declaration): Add variable
2319 Fmaster_Actual and in the case of a BIP call initializing a return
2320 object of an enclosing BIP function set it to a
2321 new reference to the implicit finalization master
2322 formal of the enclosing function. Fmaster_Actual is
2323 then passed to the new formal Master_Exp on the call to
2324 Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move
2325 initializations of Enclosing_Func to its declaration.
2326
23272011-09-02 Thomas Quinot <quinot@adacore.com>
2328
2329 * csets.ads: Minor reformatting
2330
23312011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2332
2333 * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve
2334 the full view of a private type coming from an instantiation.
2335 * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search
2336 loop to iterate over the declarations rather than use the
2337 First_Entity / Next_Entity scheme.
2338
ed32b82e
ES
23392011-09-02 Ed Schonberg <schonberg@adacore.com>
2340
2341 * sem_attr.adb: (Analyze_Attribute, case 'Range): when expanding
2342 X'range (N) into X'First (N) .. X'Last (N), do not share the
2343 dimension indicator N, if present. Even though it is a static
2344 constant, its source location may be modified when printing
2345 expanded code under -gnatDL, and node sharing will lead to chaos
2346 in Sprint on large files, by generating a sloc value that does
2347 not correspond to any source file.
2348
f7bb41af
AC
23492011-09-02 Bob Duff <duff@adacore.com>
2350
2351 * einfo.adb: (Has_Xref_Entry): Do not call
2352 Implementation_Base_Type. Lib.Xref has been
2353 rewritten to avoid the need for it, and it was costly.
2354 * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New
2355 functions in support of efficient xref.
2356 * lib-xref-alfa.adb: Misc changes related to Key component of
2357 type Xref_Entry.
2358 * lib-xref.adb: (Add_Entry,etc): Speed improvement.
2359 (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry
2360 no longer does. This is the one place where it is needed.
2361
23622011-09-02 Johannes Kanig <kanig@adacore.com>
2363
2364 * g-comlin.adb (Getopt): New optional argument Concatenate to have
2365 similar interface as the other Getopt function.
2366
23672011-09-02 Hristian Kirtchev <kirtchev@adacore.com>
2368
2369 * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate
2370 a call to Set_Finalize_Address if there is no allocator available.
2371 * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for
2372 a case of allocator expansion where the allocator is not expanded but
2373 needs a custom allocate routine. Code reformatting.
2374 (Is_Finalizable_Transient): Remove local variables Has_Rens and
2375 Ren_Obj. Code reformatting.
2376 (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing
2377 through the use of 'reference.
2378 * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated
2379 as part of build-in-place expansion. They are intentionally marked as
2380 coming from source, but their parents are not.
2381
bd0bc43e
AC
23822011-09-02 Ed Schonberg <schonberg@adacore.com>
2383
2384 * sem_ch10.adb (Analyze_With_Clause): If the library unit
2385 is the generated subprogram declaration for a child unit body
2386 that acts as spec, use the original body in the with_clause,
2387 to prevent binding errors.
2388
23892011-09-02 Vincent Celier <celier@adacore.com>
2390
2391 * gnat_ugn.texi: Adapt documentation of -gnateInnn to new VMS
2392 qualifier /MULTI_UNIT_INDEX=
2393
23942011-09-02 Johannes Kanig <kanig@adacore.com>
2395
2396 * g-comlin.adb (Getopt): Return when switch is dealt with automatically,
2397 instead of calling the callback function
2398
9fdb5d21
RD
23992011-09-02 Robert Dewar <dewar@adacore.com>
2400
2401 * prj-proc.adb, prj.ads, sem_util.adb, s-taprop-linux.adb,
2402 prj-nmsc.adb, prj-util.ads, prj-env.adb: Minor reformatting.
2403
c6d5d1ac
AC
24042011-09-02 Vincent Celier <celier@adacore.com>
2405
2406 * prj-nmsc.adb: (Find_Sources): When the list of sources is
2407 explicitly declared in an extending project, do not warn if a source
2408 for an inherited naming exception is not found.
2409
24102011-09-02 Gary Dismukes <dismukes@adacore.com>
2411
2412 * exp_ch6.adb: (Is_Build_In_Place_Function_Call): Return False if
2413 expansion is inactive.
2414
24152011-09-02 Ed Schonberg <schonberg@adacore.com>
2416
2417 * sem_util.adb (Note_Possible_Modification): If the entity
2418 being modified is the renaming generated for an Ada2012 iterator
2419 element, the enclosing container or array is modified as well.
2420
2ba1a7c7
AC
24212011-09-02 Jose Ruiz <ruiz@adacore.com>
2422
2423 * s-taprop-linux.adb (Initialize_Lock, Initialize_TCB,
2424 Initialize): Define and initialize the
2425 mutex attributes and condition variable attributes locally.
2426
24272011-09-02 Vincent Celier <celier@adacore.com>
2428
2429 * prj-nmsc.adb (Check_File): Mark as Locally_Removed a naming
2430 exception replaced in an extending project.
2431 (Check_Object): No error when the other source is locally removed.
2432
24332011-09-02 Yannick Moy <moy@adacore.com>
2434
2435 * exp_ch6.adb (Is_Build_In_Place_Function_Call): in Alfa mode, allow
2436 unresolved calls.
2437
d51813db
AC
24382011-08-31 Arnaud Charlet <charlet@adacore.com>
2439
2440 * gcc-interface/Makefile.in: Clean up handling of x86 and x86-64
2441 run-time files.
2442 * gcc-interface/Make-lang.in: Update dependencies.
2443
9f55bc62
AC
24442011-09-01 Robert Dewar <dewar@adacore.com>
2445
2446 * sem_ch3.adb, s-taprop-linux.adb, gnatls.adb: Minor reformatting.
2447
24482011-09-01 Jose Ruiz <ruiz@adacore.com>
2449
2450 * adaint.h (__gnat_cpu_free): Fix the name of this profile.
2451 * adaint.c (__gnat_cpu_alloc, __gnat_cpu_alloc_size, __gnat_cpu_free,
2452 __gnat_cpu_zero, __gnat_cpu_set): Create version of these subprograms
2453 specific for systems where their glibc version does not define the
2454 routines to handle dynamically allocated CPU sets.
2455
24562011-09-01 Vincent Celier <celier@adacore.com>
2457
2458 * prj-proc.adb, prj.ads, prj-nmsc.adb, prj-util.adb, prj-util.ads,
2459 prj-env.adb: Implement inheritance of naming exceptions in extending
2460 projects.
2461
d7386a7a
AC
24622011-09-01 Romain Berrendonner <berrendo@adacore.com>
2463
2464 * gnatls.adb: Display simple message instead of content of
2465 gnatlic.adl.
2466
24672011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2468
2469 * sem_ch3.adb: (Build_Derived_Record_Type) Remove the kludgy update of
2470 access discriminant and anonymous access component scopes.
2471 (Inherit_Component): Reuse the itype of an access discriminant
2472 or anonymous access component by copying it in order to set the proper
2473 scope. This is done only when the parent and the derived type
2474 are in different scopes.
2475 (Set_Anonymous_Etype): New routine.
2476
24772011-09-01 Robert Dewar <dewar@adacore.com>
2478
2479 * a-convec.adb: Minor reformatting throughout.
2480
9d1e0e72
JR
24812011-09-01 Jose Ruiz <ruiz@adacore.com>
2482
2483 * adaint.c, adaint.h (__gnat_cpu_alloc, __gnat_cpu_alloc_size,
2484 __gnat_cpu_set_free): Create these wrappers around the CPU_ALLOC,
2485 CPU_ALLOC_SIZE and CPU_FREE linux macros.
2486 (__gnat_cpu_zero, __gnat_cpu_set): Use the CPU_ZERO_S and
2487 CPU_SET_S respectively because we are now using dynamically allocated
2488 CPU sets which are more portable across different glibc versions.
2489 * s-osinte-linux.ads (cpu_set_t_ptr, CPU_ALLOC, CPU_ALLOC_SIZE,
2490 CPU_FREE): Add this type and subprograms to be able to create cpu_set_t
2491 masks dynamically according to the number of processors in the target
2492 platform.
2493 (CPU_ZERO, CPU_SET): They are now mapped to the CPU_ZERO_S and CPU_SET_S
2494 respectively, so we need to pass the size of the masks as
2495 parameters.
2496 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use dynamically
2497 created cpu_set_t masks
2498 with the number of processors available in the target platform,
2499 instead of static bit arrays. It enhances portability because
2500 it uses the information from the target platform.
2501 * sem_ch8.adb: (Attribute_Renaming): When checking whether we
2502 are using a restricted run-time library, use the flag
2503 Configurable_Run_Time_Mode instead of Restricted_Profile.
2504
a95be2d4
AC
25052011-09-01 Vincent Celier <celier@adacore.com>
2506
2507 * ug_words: Add /MULTI_UNIT_INDEX= -> -gnateI
2508 * vms_data.ads: Add new VMS qualifier equivalent for -gnateInnn
2509
25102011-09-01 Nicolas Roche <roche@adacore.com>
2511
2512 * adaint.c (__gnat_tmp_name): Don't use tmpnam function from the system
2513 on VxWorks in kernel mode.
2514
6b81741c
AC
25152011-09-01 Jose Ruiz <ruiz@adacore.com>
2516
2517 * s-taprop-linux.adb (Create_Task, Set_Task_Affinity): Use the linux
2518 macros for handling CPU sets (CPU_ZERO, CPU_SET) instead of modifying
2519 directly the bit array.
2520 * s-osinte-linux.ads (CPU_ZERO, CPU_SET): Import these wrappers around
2521 the linux macros with the same name.
2522 * adaint.h, adaint.c (__gnat_cpu_zero, __gnat_cpu_set): Create these
2523 wrappers around the CPU_ZERO and CPU_SET linux macros.
2524
25252011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2526
2527 * exp_ch7.adb (Find_Insertion_List): Removed.
2528 (Process_Transient_Objects): Insert the declarations of the hook
2529 access type and the hook object before the associated transient object.
2530
25312011-09-01 Jose Ruiz <ruiz@adacore.com>
2532
2533 * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
2534 package System.Aux_Dec when using restricted run-time libraries which
2535 do not have this package.
2536
25372011-09-01 Tristan Gingold <gingold@adacore.com>
2538
2539 * s-vaflop-vms-alpha.adb: Remove pragma optimize, useless.
2540
25412011-09-01 Bob Duff <duff@adacore.com>
2542
2543 * sem_attr.adb (Analyze_Access_Attribute): Do not call
2544 Kill_Current_Values for P'Unrestricted_Access, where P is library level
2545
25462011-09-01 Thomas Quinot <quinot@adacore.com>
2547
2548 * exp_ch5.adb: Minor reformatting
2549 * gnat_ugn.texi: Fix minor typos.
2550 * gcc-interface/Make-lang.in: Update dependencies.
2551
8256c1bf
AC
25522011-09-01 Robert Dewar <dewar@adacore.com>
2553
2554 * inline.adb, sem_aggr.adb: Minor reformatting.
2555
25562011-09-01 Ed Schonberg <schonberg@adacore.com>
2557
2558 * a-convec.adb: Proper handling of cursors for Ada2012 iterators.
2559
d1c5f424
AC
25602011-09-01 Robert Dewar <dewar@adacore.com>
2561
2562 * prj-proc.adb, exp_ch6.adb, prj-env.adb: Minor reformatting.
2563
25642011-09-01 Bob Duff <duff@adacore.com>
2565
2566 * sem_aggr.adb (Resolve_Aggregate): Need to treat "in instance
2567 body" the same as "in inlined body", because visibility shouldn't
2568 apply there.
2569
25702011-09-01 Eric Botcazou <ebotcazou@adacore.com>
2571
2572 * inline.adb (Add_Inlined_Body): Refine previous change.
2573
1bb6e262
AC
25742011-09-01 Gary Dismukes <dismukes@adacore.com>
2575
2576 * exp_ch6.ads (Needs_BIP_Alloc_Form): New utility function.
2577 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2578 Test for case where call
2579 initializes an object of a return statement before testing for
2580 a constrained call, to ensure that all such cases get handled
2581 by simply passing on the caller's parameters. Also, in that
2582 case call Needs_BIP_Alloc_Form to determine whether to pass on
2583 the BIP_Alloc_Form parameter of the enclosing function rather
2584 than testing Is_Constrained. Add similar tests for the return
2585 of a BIP call to later processing to ensure consistent handling.
2586 (Needs_BIP_Alloc_Form): New utility function.
2587 * sem_ch6.adb: (Create_Extra_Formals): Replace test for adding
2588 a BIP_Alloc_Form formal with call to new utility function
2589 Needs_BIP_Alloc_Form.
2590
25912011-09-01 Pascal Obry <obry@adacore.com>
2592
2593 * prj-part.adb: Minor reformatting.
2594
25952011-09-01 Vincent Celier <celier@adacore.com>
2596
2597 * prj-env.adb (Create_Mapping_File.Process): Encode the upper
2598 half character in the unit name.
2599
db15225a
AC
26002011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2601
2602 * exp_ch4.adb: Minor code and comment reformatting.
2603
26042011-09-01 Thomas Quinot <quinot@adacore.com>
2605
2606 * exp_ch6.adb (Expand_Inlined_Call): Remove redundant tests
2607 for Is_Limited_Type and Is_Tagged_Type in condition checking
2608 for by-reference type.
2609 * inline.adb (Add_Inlined_Body): Only exclude init_procs. Other
2610 subprograms may have a completion because of a previous
2611 Inline_Always clause, but the enclosing package must be marked
2612 inlined for the subprogram body to become visible to the backend.
2613
9d641fc0
TQ
26142011-09-01 Thomas Quinot <quinot@adacore.com>
2615
2616 * sem_aux.adb, exp_ch4.adb: Minor reformatting
2617
dbe36d67
AC
26182011-09-01 Pascal Obry <obry@adacore.com>
2619
2620 * prj-proc.adb, prj.ads, sinput-p.adb: Minor reformatting.
2621
26222011-09-01 Ed Schonberg <schonberg@adacore.com>
2623
2624 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Generate references to
2625 the formals of a subprogram stub that acts as a spec.
2626
26272011-09-01 Ed Schonberg <schonberg@adacore.com>
2628
2629 * exp_ch6.adb (Expand_Inlined_Call): If an actual is a by_reference
2630 type, declare a renaming for it, not an object declaration.
2631
f5037886
AC
26322011-09-01 Yannick Moy <moy@adacore.com>
2633
2634 * ali-util.adb, ali-util.ads (Read_Withed_ALIs): Add parameter
2635 Ignore_Errors to ignore failures to read ALI files when True.
2636
26372011-09-01 Javier Miranda <miranda@adacore.com>
2638
2639 * exp_ch3.adb (Expand_N_Object_Declaration): Handle non-default
2640 constructor calls associated with non-tagged record types.
2641
26422011-09-01 Robert Dewar <dewar@adacore.com>
2643
2644 * g-socthi-vms.adb: Minor reformatting.
2645
26462011-09-01 Nicolas Roche <roche@adacore.com>
2647
2648 * sysdep.c: Don't use macro functions for stdio functions on VxWorks
2649 in order to avoid impact of imcompatible changes.
2650 * cstreams.c: Likewise
2651 * cio.c: Likewise
2652 * aux-io.c: Likewise
2653
26542011-09-01 Yannick Moy <moy@adacore.com>
2655
2656 * lib-writ.adb (Write_With_Lines): Always output complete information
2657 on "with" line in Alfa mode, as this is required by formal verification
2658 back-end.
2659
549e4558
AC
26602011-09-01 Tristan Gingold <gingold@adacore.com>
2661
2662 * g-socthi-vms.adb: Add comments.
2663
26642011-09-01 Pascal Obry <obry@adacore.com>
2665
2666 * prj.ads: Minor reformatting.
2667
70c0422d
AC
26682011-09-01 Vincent Celier <celier@adacore.com>
2669
2670 * prj-env.adb (Create_Config_Pragmas_File.Check): Put all naming
2671 exceptions in the config pragmas file.
2672
26732011-09-01 Tristan Gingold <gingold@adacore.com>
2674
2675 * gnat_ugn.texi: Document GNAT_STACK_SIZE on IVMS.
2676
8c5b03a0
AC
26772011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2678
2679 * exp_ch7.adb (Find_Insertion_List): New routine.
2680 (Process_Transient_Objects): Add code to handle the abnormal
2681 finalization of a controlled transient associated with a subprogram
2682 call. Since transients are cleaned up right after the associated
2683 context, an exception raised during a subprogram call may bypass the
2684 finalization code.
2685
26862011-09-01 Robert Dewar <dewar@adacore.com>
2687
2688 * exp_ch6.adb (Expand_Call): Check actual for aliased parameter is
2689 aliased.
2690
3040dbd4
RD
26912011-09-01 Robert Dewar <dewar@adacore.com>
2692
2693 * exp_ch4.adb, a-exexda.adb: Minor reformatting.
2694
fecbd779
AC
26952011-09-01 Robert Dewar <dewar@adacore.com>
2696
2697 * s-taskin.ads, s-tassta.adb, sem_ch13.adb: Minor reformatting.
2698
26992011-09-01 Thomas Quinot <quinot@adacore.com>
2700
2701 * Makefile.rtl: Move s-oscons.o from GNATRTL_TASKING_OBJS to
2702 GNATRTL_NONTASKING_OBJS.
2703
27042011-09-01 Robert Dewar <dewar@adacore.com>
2705
2706 * einfo.ads (Is_Aliased): Fix existing documentation and add note on
2707 possibility of this flag being set for formals in Ada 2012 mode.
2708 * par-ch6.adb (P_Formal_Part): Handle aliased for parameters for Ada
2709 2012.
2710 * sem_ch6.adb (Process_Formals): Handle aliased parameters in Ada 2012
2711 mode.
2712 * sinfo.adb (Aliased_Present): Allowed in N_Parameter_Specification for
2713 Ada 2012.
2714 * sinfo.ads (Aliased_Present): Allowed in N_Parameter_Specification for
2715 Ada 2012.
2716
27172011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2718
2719 * exp_ch4.adb (Find_Insertion_Node): New routine. Determines the proper
2720 insertion node in a tree of nested Expression_With_Actions nodes.
2721 (Process_Transient_Object): In the case where a complex if statement
2722 has been converted into nested Expression_With_Actions nodes, the
2723 "hook" object and the associated access type must be inserted before
2724 the top most Expression_With_Actions.
2725
516f608f
AC
27262011-09-01 Robert Dewar <dewar@adacore.com>
2727
2728 * a-cbprqu.adb, a-cbprqu.ads, a-cuprqu.adb, a-cuprqu.ads,
2729 a-cbsyqu.adb, a-cbsyqu.ads: Minor reformatting.
2730
27312011-09-01 Ed Schonberg <schonberg@adacore.com>
2732
2733 * sem_attr.adb: Conditionalize aliasing predicates to Ada2012.
2734
27352011-09-01 Jose Ruiz <ruiz@adacore.com>
2736
2737 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the CPU
2738 aspect.
2739 * aspects.adb (Canonical_Aspect): Add entry for the CPU aspect.
2740 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the CPU aspect
2741 in a similar way as we do for the Priority or Dispatching_Domain aspect.
2742 * s-mudido-affinity.adb (Dispatching_Domain_Tasks,
2743 Dispatching_Domains_Frozen): Move this local data to package
2744 System.Tasking because with the CPU aspect we need to have access
2745 to this data when creating the task in System.Tasking.Stages.Create_Task
2746 * s-taskin.ads (Dispatching_Domain_Tasks, Dispatching_Domains_Frozen):
2747 Move these variables from the body of
2748 System.Multiprocessors.Dispatching_Domains because with the CPU aspect
2749 we need to have access to this data when creating the task in
2750 System.Tasking.Stages.Create_Task.
2751 * s-taskin.adb (Initialize): Signal the allocation of the environment
2752 task to a CPU, if any, so that we know whether the CPU can be
2753 transferred to a different dispatching domain.
2754 * s-tassta.adb (Create_Task): Check whether the CPU to which this task
2755 is being allocated belongs to the dispatching domain where the task
2756 lives. Signal the allocation of the task to a CPU, if any, so that we
2757 know whether the CPU can be transferred to a different dispatching
2758 domain.
2759
2d42e881
ES
27602011-09-01 Ed Schonberg <schonberg@adacore.com>
2761
2762 * exp_attr.adb, sem_attr.adb, snames.ads-tmpl: Implementation of
2763 attributes Same_Storage and Overlaps_Storage.
2764
579fda56
AC
27652011-09-01 Hristian Kirtchev <kirtchev@adacore.com>
2766
2767 * exp_strm.adb: Remove with and use clause for Opt.
2768 (Build_Array_Input_Function): Remove the version-dependent generation
2769 of the return statement. The Ada 2005 tree is now the default.
2770
27712011-09-01 Yannick Moy <moy@adacore.com>
2772
2773 * put_alfa.adb: Unconditionnally write files in Alfa section, so that
2774 it is never empty when compiling in Alfa mode.
2775
27762011-09-01 Robert Dewar <dewar@adacore.com>
2777
2778 * sem_aggr.adb, sem_ch3.adb, a-direct.adb, s-taprop-vxworks.adb,
2779 comperr.adb, exp_ch9.adb, exp_pakd.adb, sem_ch12.adb, freeze.adb,
2780 s-taprop-mingw.adb, s-taprop-linux.adb, s-taprop-solaris.adb,
2781 gnat1drv.adb, a-rbtgbo.adb, exp_dist.adb: Minor reformatting
2782
27832011-09-01 Matthew Heaney <heaney@adacore.com>
2784
2785 * Makefile.rtl, impunit.adb: Add a-csquin.ads, a-cusyqu.ad[sb],
2786 a-cuprqu.ad[sb], a-cbsyqu.ad[sb], a-cbprqu.ad[sb]
2787 * a-csquin.ads: New Ada 2012 unit that specifies the queue interface
2788 * a-cusyqu.ads, a-cusyqu.adb: New Ada 2012 unit that specifies the
2789 unbounded queue container.
2790 * a-cbsyqu.ads, a-cbsyqu.adb: New Ada 2012 unit that specifies the
2791 bounded queue container.
2792 * a-cuprqu.ads, a-cuprqu.adb: New Ada 2012 unit that specifies the
2793 unbounded priority queue container.
2794 * a-cbprqu.ads, a-cbprqu.adb: New Ada 2012 unit that specifies the
2795 bounded priority queue container.
2796
24c34107
AC
27972011-08-31 Pascal Obry <obry@adacore.com>
2798
2799 * a-direct.adb: Do not try to create an UNC path on Windows.
2800 (Create_Path): Skip leading computer name in UNC path if any.
2801
28022011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2803
2804 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): Remove the
2805 version-dependent generation of the return statement. The Ada 2005 tree
2806 is now the default.
2807
28082011-08-31 Thomas Quinot <quinot@adacore.com>
2809
2810 * rtsfind.ads, exp_dist.adb (Find_Numeric_Representation): Predefined
2811 types Stream_Element_Offset and Storage_Offset have a different native
2812 type depending on whether the platform is 32 or 64 bits. When
2813 exchanging them, always convert to 64 bits.
2814
28152011-08-31 Yannick Moy <moy@adacore.com>
2816
2817 * debug.adb: Reserve debug option -gnatd.E for passing gnatprove option
2818 --force-alfa to gnat2why.
2819
28202011-08-31 Ed Schonberg <schonberg@adacore.com>
2821
2822 * sem_ch12.adb (Save_References): If the node has aspects, save
2823 references within the corresponding expressions in a separate step,
2824 because the aspects are not directly in the tree for the declaration
2825 to which they belong.
2826
28272011-08-31 Arnaud Charlet <charlet@adacore.com>
2828
2829 * freeze.adb (Freeze_Record_Type): Omit test on variable size component
2830 in CodePeer mode, since representation clauses are partially ignored.
2831 * gcc-interface/Make-lang.in: Update dependencies.
2832
702d2020
AC
28332011-08-31 Jose Ruiz <ruiz@adacore.com>
2834
2835 * s-taprop-vxworks.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
2836 s-taprop-solaris.adb (Create_Task): Not_A_Specific_CPU can be assigned
2837 to any dispatching domain.
2838
28392011-08-31 Thomas Quinot <quinot@adacore.com>
2840
2841 * exp_ch4.adb: Minor reformatting.
2842
28432011-08-31 Bob Duff <duff@adacore.com>
2844
2845 * sem_ch6.adb (Get_Generic_Parent_Type): Don't query Subtype_Indication
2846 on nodes for which it is not defined.
2847 (Is_Non_Overriding_Operation): Exit the loop when we find a generic
2848 parent type.
2849
28502011-08-31 Bob Duff <duff@adacore.com>
2851
2852 * sem_ch3.adb (Process_Full_View): Disable legality check if
2853 In_Instance, to avoid spurious errors.
2854 * sem_ch12.adb (Validate_Derived_Type_Instance): Disable legality check
2855 if In_Instance, to avoid spurious errors.
2856
28572011-08-31 Pascal Obry <obry@adacore.com>
2858
2859 * a-direct.adb: Use Dir_Seps everywhere to properly handle all
2860 directory speparators.
2861 (Compose): Use Dir_Seps to handle both forms.
2862 (Create_Path): Use Dir_Seps instead of explicit check, no semantic
2863 changes.
2864 (Extension): Use Dir_Seps to handle both forms.
2865
28662011-08-31 Pascal Obry <obry@adacore.com>
2867
2868 * prj-conf.adb: Minor reformatting.
2869
67645bde
AC
28702011-08-31 Jose Ruiz <ruiz@adacore.com>
2871
2872 * aspects.ads (Aspect_Id, Aspect_Argument, Aspect_Names): Add the
2873 dispatching domain aspect.
2874 * aspects.adb (Canonical_Aspect): Add entry for the dispatching domain
2875 aspect.
2876 * sem_ch13.adb (Analyze_Aspect_Specifications): Analyze the
2877 Dispatching_Domain aspect in a similar way as we do for the Priority
2878 aspect.
2879 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add the
2880 Dispatching_Domain component if a Dispatching_Domain pragma or aspect
2881 is present.
2882 (Make_Task_Create_Call): Add the Dispatching_Domain when creating a task
2883 * par-prag.adb (Prag): Add Pragma_Dispatching_Domain as a known pragma.
2884 * sem_prag.adb (Analyze_Pragma): Check the correctness of a pragma
2885 Dispatching_Domain and add it to the task definition.
2886 (Sig_Flags): Add Pragma_Dispatching_Domain.
2887 * rtsfind.ads, rtsfind.adb (RTU_Id, RE_Id, Get_Unit_Name): Add the
2888 support to find the types Dispatching_Domain and
2889 Dispatching_Domain_Access.
2890 * sinfo.ads, sinfo.adb (Has_Pragma_Dispatching_Domain,
2891 Set_Has_Pragma_Dispatching_Domain): Add these subprograms to set and
2892 query the availability of a pragma Dispatching_Domain.
2893 * snames.ads-tmpl (Name_uDispatching_Domain): Add this name required by
2894 the expander to pass the Dispatching_Domain when creating a task.
2895 (Name_Dispatching_Domain): Add this new name for a pragma.
2896 (Pragma_Id): Add the new Pragma_Dispatching_Domain.
2897 * s-tassta.ads, s-tassta.adb (Create_Task): Set the domain to which the
2898 task has been allocated at creation time.
2899 * s-tarest.adb (Create_Restricted_Task): The dispatching domain using
2900 Ravenscar is always null.
2901 * s-taskin.ads, s-taskin.adb (Initialize_ATCB): Set the domain to which
2902 the task has been allocated at creation time.
2903 * s-tporft.adb (Register_Foreign_Thread): A foreign task will not have
2904 a specific dispatching domain.
2905 * s-taprop-linux.adb, s-taprop-solaris.adb, s-taprop-vxworks.adb,
2906 s-taprop-mingw.adb (Create_Task): Check whether both Dispatching_Domain
2907 and CPU are specified for the task, and the CPU value is not contained
2908 within the range of processors for the domain.
2909
29102011-08-31 Vincent Celier <celier@adacore.com>
2911
2912 * make.adb (Original_Gcc) : New constant String_Access.
2913 (Gnatmake): For VM targets, do not use VM version of the compiler if
2914 --GCC= has been specified.
2915
29162011-08-31 Thomas Quinot <quinot@adacore.com>
2917
2918 * sem_ch5.adb: Minor reformatting.
2919
29202011-08-31 Ed Schonberg <schonberg@adacore.com>
2921
2922 * exp_pakd.adb (Convert_To_PAT_Type): If prefix is a function call, do
2923 not reanalyze it.
2924
29252011-08-31 Bob Duff <duff@adacore.com>
2926
2927 * exp_ch4.adb (Expand_N_Selected_Component): Use the full type, in case
2928 the access type is private; we don't care about privacy in expansion.
2929
29302011-08-31 Ed Schonberg <schonberg@adacore.com>
2931
2932 * sem_aggr.adb (Resolve_Aggregate): In an instance, ignore aggregate
2933 subcomponents tnat may be limited, because they originate in view
2934 conflicts. If the original aggregate is legal and the actuals are
2935 legal, the aggregate itself is legal.
2936
b8789727
AC
29372011-08-31 Matthew Heaney <heaney@adacore.com>
2938
2939 * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
2940 status.
2941
29422011-08-31 Ed Schonberg <schonberg@adacore.com>
2943
2944 * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
2945 errors in B tests.
2946
29472011-08-31 Jose Ruiz <ruiz@adacore.com>
2948
2949 * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
2950 Interrupt_Priority aspects, force the analysis of the aspect expression
2951 (when building the equivalent pragma). Otherwise, its analysis is done
2952 too late, after the task or protected object has been created.
2953 * sem_ch9.adb (Analyze_Single_Protected_Declaration,
2954 Analyze_Single_Task_Declaration): Remove the code to move the aspects
2955 to the object declaration because they are needed in the type
2956 declaration.
2957
e0c32166
AC
29582011-08-31 Robert Dewar <dewar@adacore.com>
2959
2960 * exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
2961 a-rbtgbo.adb, exp_intr.adb, a-cbdlli.adb, a-cbdlli.ads: Minor
2962 reformatting.
2963
29642011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2965
2966 * exp_util.adb (Find_Protection_Type): Do not look for fields _object
2967 if the corresponding type is malformed due to restriction violations.
2968
29692011-08-31 Robert Dewar <dewar@adacore.com>
2970
2971 * s-ransee.ads, s-ransee.adb: Minor reformatting.
2972
29732011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2974
2975 * exp_ch4.adb (Expand_N_Allocator): Correct faulty condition which
2976 would cause the generation of Set_Finalize_Address if the target is a
2977 VM and the designated type is not derived from [Limited_]Controlled.
2978
29792011-08-31 Arnaud Charlet <charlet@adacore.com>
2980
2981 * comperr.adb, comperr.ads, gnat1drv.adb (Delete_SCIL_Files): New
2982 subprogram.
2983 (Compiler_Abort, Gnat1drv): Call Delete_SCIL_Files in codepeer mode in
2984 case of a compilation error.
2985
29862011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2987
2988 * init.c (__gnat_error_handler): Standardize the stack overflow or
2989 erroneous memory access message.
2990 * seh_init.c (__gnat_SEH_error_handler): Standardize the stack overflow
2991 or erroneous memory access message.
2992
11bc76df
AC
29932011-08-31 Robert Dewar <dewar@adacore.com>
2994
2995 * sem_ch4.adb: Minor reformatting.
2996 * sem_ch6.adb: Minor code reorganization (use Ekind_In).
2997
29982011-08-31 Thomas Quinot <quinot@adacore.com>
2999
3000 * scos.ads: Minor documentation clarification.
3001 * put_scos.adb: Do not generate SCO unit header line for a unit that
3002 has no SCO lines.
3003
876d4394
RD
30042011-08-31 Robert Dewar <dewar@adacore.com>
3005
3006 * a-rbtgbo.adb, alfa_test.adb: Minor reformatting.
3007
36b8f95f
AC
30082011-08-31 Tristan Gingold <gingold@adacore.com>
3009
3010 * exp_ch7.ads, exp_ch7.adb (Finalization_Exception_Data): New type to
3011 hold variables between these following subprograms.
3012 (Build_Exception_Handler, Build_Object_Declarations,
3013 Build_Raise_Statement): Use the above type as parameter.
3014 Make the above adjustments.
3015 * exp_intr.adb (Expand_Unc_Deallocation): Adjust.
3016
30172011-08-31 Pascal Obry <obry@adacore.com>
3018
3019 * projects.texi: Minor reformatting.
3020
30212011-08-31 Tristan Gingold <gingold@adacore.com>
3022
3023 * s-ransee.ads, s-ransee.adb: Add system.random_seed unit.
3024 * s-rannum.adb (Reset): Use Get_Seed from s-ransee.
3025
30262011-08-31 Ed Schonberg <schonberg@adacore.com>
3027
3028 * exp_ch5.adb: Minor code cleanup.
3029 * sem_ch5.adb (Analyze_Iteration_Scheme): Set ekind of loop variable to
3030 prevent cascaded errors.
3031 (Analyze_Loop_Statement): In semantics-only mode, introduce loop
3032 variable of an iterator specification in current scope.
3033 * sem_ch6.adb (Analyze_Return_Statement, Find_what_It_Apples_To): Skip
3034 postconditions on the stack, as they contain no return statements.
3035
30362011-08-31 Yannick Moy <moy@adacore.com>
3037
3038 * exp_alfa.adb (Expand_Alfa_N_Package_Declaration,
3039 Expand_Alfa_N_Subprogram_Body): Remove useless procedures which simply
3040 call Qualify_Entity_Names.
3041 (Expand_Alfa): call Qualify_Entity_Names in more cases
3042 * lib-xref-alfa.adb: Take into account system package.
3043 * sem_prag.adb Take into account restrictions in Alfa mode, contrary to
3044 CodePeer mode in which we are interested in finding bugs even if
3045 compiler cannot compile source.
3046 * sem_util.adb, sem_util.ads (Unique_Entity): Take into account case of
3047 deferred constant.
3048
30492011-08-31 Gary Dismukes <dismukes@adacore.com>
3050
3051 * sem_ch3.adb (Constrain_Concurrent): Retrieve Base_Type of the subtype
3052 denoted by the subtype mark to ensure getting the concurrent type in
3053 the case where the subtype mark denotes a private subtype of a
3054 concurrent type (needed when using -gnatc).
3055 (Process_Subtype): For the processing specific to type kinds, case on
3056 the Base_Type kind of the Subtype_Mark_Id, to handle cases where the
3057 subtype denotes a private subtype whose base type is nonprivate (needed
3058 for subtypes of private fulfilled by task types when compiling with
3059 -gnatc).
3060
30612011-08-31 Gary Dismukes <dismukes@adacore.com>
3062
3063 * sem_disp.adb (Check_Dispatching_Operation): Bypass registration of
3064 late primitives that override interface operations when the full
3065 expander is not active, to avoid blowups in Register_Primitive when
3066 types don't have associated secondary dispatch tables.
3067
30682011-08-31 Yannick Moy <moy@adacore.com>
3069
3070 * alfa_test.adb: Code clean up.
3071
30722011-08-31 Marc Sango <sango@adacore.com>
3073
3074 * restrict.adb (Check_SPARK_Restriction): Change Comes_From_Source (N)
3075 by Comes_From_Source (Original_Node (N)) in order to treat also the
3076 nodes which have been rewritten.
3077 * sem_ch4.adb (Analyze_Explicit_Dereference, Analyze_Slice): Guard the
3078 explicit dereference and slice violation in spark mode on the nodes
3079 coming only from the source code.
3080
8cf23b91
AC
30812011-08-31 Robert Dewar <dewar@adacore.com>
3082
3083 * exp_ch5.adb, exp_alfa.ads, prj.ads, sem_attr.adb,
3084 lib-xref-alfa.adb: Minor reformatting.
3085
30862011-08-31 Matthew Heaney <heaney@adacore.com>
3087
3088 * a-crbltr.ads (Tree_Type): Default-initialize the Nodes component.
3089
30902011-08-31 Javier Miranda <miranda@adacore.com>
3091
3092 * sem_ch4.adb (Try_Object_Operation): Addition of one formal to search
3093 only for class-wide subprograms conflicting with entities of concurrent
3094 tagged types.
3095
30962011-08-31 Matthew Heaney <heaney@adacore.com>
3097
3098 * a-rbtgbo.adb (Generic_Allocate): Initialize pointer components of
3099 node to null value.
3100
31012011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3102
3103 * sem_ch12.adb (Insert_Freeze_Node_For_Instance): Provide a more
3104 general description of the routine.
3105
31062011-08-31 Ed Schonberg <schonberg@adacore.com>
3107
3108 * a-cbdlli.adb, a-cbdlli.ads: Add iterator machinery to bounded
3109 doubly-linked lists.
3110
0bb3bfb8
GD
31112011-08-31 Gary Dismukes <dismukes@adacore.com>
3112
3113 * exp_ch5.adb (Expand_N_Assignment_Statement): When a discriminant
3114 check is needed for a left-hand side that is a dereference, and the
3115 base type is private without discriminants (whereas the full type does
3116 have discriminants), an extra retrieval of the underlying type may be
3117 needed in the case where the subtype is a record subtype whose base
3118 type is private. Update comments.
3119
11fa950b
AC
31202011-08-31 Javier Miranda <miranda@adacore.com>
3121
3122 * sem_ch4.adb (Try_Object_Operation): When a dispatching primitive is
3123 found check if there is a class-wide subprogram covering the primitive.
3124
31252011-08-31 Yannick Moy <moy@adacore.com>
3126
3127 * sem_res.adb: Further cases where full expansion test is needed,
3128 rather than expansion test.
3129
31302011-08-31 Pascal Obry <obry@adacore.com>
3131
3132 * prj-attr.adb: Fix Source_File_Switches attribute kind (must be a list)
3133
31342011-08-31 Ed Schonberg <schonberg@adacore.com>
3135
3136 * exp_ch5.adb: Handle iterators over derived container types.
3137
31382011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3139
3140 * einfo.ads, einfo.adb: Add new flag Has_Anonymous_Master.
3141 (Has_Anonymous_Master): New routine.
3142 (Set_Has_Anonymous_Master): New routine.
3143 (Write_Entity_Flags): Add an entry for Has_Anonymous_Master.
3144 * exp_ch4.adb: Add with and use clause for Sem_Ch8.
3145 (Current_Anonymous_Master): New routine.
3146 (Current_Unit_First_Declaration): Removed.
3147 (Current_Unit_Scope): Removed.
3148 (Expand_N_Allocator): Anonymous access-to-controlled types now chain
3149 their objects on a per-unit heterogeneous finalization master.
3150
31512011-08-31 Matthew Heaney <heaney@adacore.com>
3152
3153 * a-cbhama.adb, a-cbhase.adb (Insert): Check for zero-length buckets
3154 array.
3155
31562011-08-31 Jose Ruiz <ruiz@adacore.com>
3157
3158 * s-taprop-linux.adb (Create_Task): Avoid changing the affinity mask
3159 when not needed.
3160
31612011-08-31 Gary Dismukes <dismukes@adacore.com>
3162
3163 * sem_disp.adb (Propagate_Tag): Return without propagating in the case
3164 where the actual is an unexpanded call to 'Input.
3165
d2b4b3da
AC
31662011-08-31 Yannick Moy <moy@adacore.com>
3167
3168 * sem_ch4.adb: Code clean up.
3169
31702011-08-31 Yannick Moy <moy@adacore.com>
3171
3172 * exp_alfa.adb, exp_alfa.ads: Minor correction of copyright notice.
3173
31742011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3175
3176 * exp_ch7.adb (Build_Array_Deep_Procs): Do not generate Deep_Finalize
3177 and TSS primitive Finalize_Address if finalization is suppressed.
3178 (Build_Record_Deep_Procs): Do not generate Deep_Finalize and TSS
3179 primitive Finalize_Address if finalization is suppressed.
3180
31812011-08-31 Jose Ruiz <ruiz@adacore.com>
3182
3183 * s-mudido-affinity.adb, s-taprop-linux.adb, s-taprop-mingw.adb,
3184 s-taprop-solaris.adb, s-taprop-vxworks.adb (Set_Task_Affinity): Make
3185 sure that the underlying task has already been created before trying
3186 to change its affinity.
3187 (Set_CPU): Use the term processor instead of CPU, as we do in
3188 Assign_Task.
3189
31902011-08-31 Vincent Celier <celier@adacore.com>
3191
3192 * prj-attr.adb: New Compiler attribute Source_File_Switches.
3193 * prj-nmsc.adb (Process_Compiler): Process attribute
3194 Source_File_Switches.
3195 * prj.ads (Language_Config): New name list component
3196 Name_Source_File_Switches.
3197 * snames.ads-tmpl (Name_Source_File_Switches): New standard name.
3198
31992011-08-31 Ed Schonberg <schonberg@adacore.com>
3200
3201 * sem_attr.adb (Analyze_Attribute, case 'Old): If prefix may be a
3202 discriminated component of an actual, expand at once to prevent
3203 ouf-of-order references with generated subtypes.
3204
32052011-08-31 Yannick Moy <moy@adacore.com>
3206
3207 * lib-xref-alfa.adb (Add_Alfa_Xrefs): Do not take into account read
3208 reference to operator in Alfa xrefs.
3209
32102011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3211
3212 * sem_ch12.adb (Freeze_Subprogram_Body): Add code to handle the case
3213 where the parent instance was frozen before the current instance due to
3214 the presence of a source body. Update calls to Insert_After_Last_Decl.
3215 (Insert_After_Last_Decl): Renamed to Insert_Freeze_Node_For_Instance.
3216 Update the comment which illustrates the purpose of the routine.
3217 Package instances are now frozen by source bodies which appear after
3218 the instance. This ensures that entities coming from within the
3219 instance are available for use in the said bodies.
3220 (Install_Body): Add code to handle the case where the parent instance
3221 was frozen before the current instance due to the presence of a source
3222 body. Update calls to Insert_After_Last_Decl.
3223
56812278
AC
32242011-08-31 Jose Ruiz <ruiz@adacore.com>
3225
3226 * s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
3227 access types.
3228 * affinity.c (__gnat_set_affinity_mask): Declare index variable.
3229
32302011-08-31 Yannick Moy <moy@adacore.com>
3231
3232 * sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
3233 full-expander test.
16c3301a
AC
3234 * alfa.adb, alfa.ads, alfa_test.adb, ali.adb, debug.adb, errout.adb,
3235 errout.ads, erroutc.adb, expander.adb, exp_ch4.adb, exp_ch7.adb,
3236 freeze.adb, get_alfa.adb, get_alfa.ads, gnat1drv.adb, lib-writ.adb,
3237 lib-writ.ads, lib-xref.adb, lib-xref.ads, lib-xref-alfa.adb, opt.adb,
3238 opt.ads, put_alfa.adb, put_alfa.ads, restrict.adb, sem_ch12.adb,
3239 sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
3240 sem_prag.adb, sem_res.adb, sem_util.adb: Minor reformatting, renaming
3241 ALFA in Alfa (we dropped acronym).
56812278
AC
3242 * einfo.adb (Primitive_Operations): Correctly return list of primitive
3243 operations in a case where it returned previously No_Elist.
3244
7cda9727
RD
32452011-08-31 Robert Dewar <dewar@adacore.com>
3246
3247 * s-taprop-vxworks.adb, sem_ch5.adb, s-taprop-tru64.adb, exp_alfa.adb,
3248 s-taprop-vms.adb, bindgen.adb, s-mudido.adb, s-mudido.ads,
3249 sem_res.adb, expander.adb, s-taprop-mingw.adb, s-taprop-linux.adb,
3250 s-taprop-solaris.adb, s-mudido-affinity.adb, vms_conv.adb,
3251 s-taprop-irix.adb, s-taprop.ads, s-taskin.adb, s-taskin.ads,
3252 s-taprop-hpux-dce.adb, a-chtgbo.adb, s-taprop-posix.adb: Minor
3253 reformatting.
3254
0a190dfd
AC
32552011-08-31 Hristian Kirtchev <kirtchev@adacore.com>
3256
3257 * sem_ch12 (Check_Private_View): Revert previous change.
3258 * sem_res.adb (Conversion_Check): Do not emit the error message if the
3259 conversion is in a generic instance.
3260
32612011-08-31 Matthew Heaney <heaney@adacore.com>
3262
3263 * a-cbhase.adb (Symmetric_Difference): Dereference correct node array.
3264 * a-chtgbo.adb (Free): Allow 0 as index value.
3265
32662011-08-31 Matthew Heaney <heaney@adacore.com>
3267
3268 * a-cborma.adb (Insert): Add comment to explain why no element
3269 assignment.
3270
32712011-08-31 Gary Dismukes <dismukes@adacore.com>
3272
3273 * sem_util.adb (Find_Body_Discriminal): Test whether the scope of the
3274 spec discriminant is already a concurrent type, in which case just use
3275 it, otherwise fetch the Corresponding_Concurrent_Type as before.
3276
7d266442
EB
32772011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3278
3279 * system-irix-n64.ads, system-linux-armeb.ads, system-linux-armel.ads,
3280 system-linux-mips.ads, system-linux-mipsel.ads,
3281 system-linux-mips64el.ads, system-linux-ppc64.ads,
3282 system-linux-sparcv9.ads, system-rtems.ads: Remove GCC_ZCX_Support.
3283
4f1a975c
EB
32842011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3285
3286 * gcc-interface/ada-tree.h (TYPE_EXTRA_SUBTYPE_P): Add internal check.
3287 * gcc-interface/utils2.c (build_binary_op): Tighten condition.
3288 (build_unary_op): Likewise.
3289
f2991b48
EB
32902011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3291
3292 * raise-gcc.c: Do not include coretypes.h and tm.h.
3293 (setup_to_install): Remove test for compiler macro.
3294 * targext.c: Document use for the library.
3295 * gcc-interface/Makefile.in: Fix comment on the use of IN_GCC.
3296
10a22f43
EB
32972011-08-30 Eric Botcazou <ebotcazou@adacore.com>
3298
3299 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not convert
3300 the expression to the nominal type if the latter is a record type with
3301 a variant part and the type of the former is a record type without one.
3302
bfa2e39d
AC
33032011-08-30 Yannick Moy <moy@adacore.com>
3304
3305 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3306 expansion in Alfa mode.
3307 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public
3308 * exp_alfa.adb, exp_alfa.ads: New package defining light expansion for
3309 Alfa mode.
3310 * gnat1drv.adb (Adjust_Global_Switches): Update Comment.
3311 * sem_res.adb: Ditto.
bd34109a 3312 * gcc-interface/Make-lang.in: Update dependencies.
bfa2e39d
AC
3313
33142011-08-30 Thomas Quinot <quinot@adacore.com>
3315
3316 * g-socket.ads: Minor documentation adjustment.
3317
a0347839
AC
33182011-08-30 Robert Dewar <dewar@adacore.com>
3319
3320 * exp_ch9.adb, s-tassta.adb, s-secsta.adb: Minor reformatting.
3321
33222011-08-30 Yannick Moy <moy@adacore.com>
3323
3324 * exp_ch6_light.adb, exp_ch6_light.ads, exp_attr_light.adb,
3325 exp_attr_light.ads, exp_ch7_light.adb, exp_ch7_light.ads,
3326 exp_light.adb, exp_light.ads, exp_prag.adb, expander.adb,
3327 gnat1drv.adb, exp_ch11.adb, exp_ch6.adb, exp_ch6.ads, exp_aggr.adb:
3328 Revert change which introduced files for "light"
3329 expansion, to be replaced by a single file for Alfa expansion.
3330
3597c0e9
RD
33312011-08-30 Robert Dewar <dewar@adacore.com>
3332
3333 * opt.ads, s-soflin.adb, exp_ch9.adb, sem_res.adb: Update comment.
3334 Minor code reorg/reformatting.
3335
da94696d
AC
33362011-08-30 Yannick Moy <moy@adacore.com>
3337
3338 * opt.adb, opt.ads (Full_Expander_Active): New function defines a
3339 common shorthand for (Expander_Active and not ALFA_Mode) that can be
3340 used for testing full expansion, that is active expansion not in the
3341 reduced mode for Alfa
3342 * exp_ch4.adb, exp_ch9.adb, exp_disp.adb, sem_ch10.adb, sem_ch12.adb,
3343 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Use newly defined "flag" instead
3344 of the verbose (Expander_Active and not ALFA_Mode)
3345
33462011-08-30 Tristan Gingold <gingold@adacore.com>
3347
3348 * s-parame-vms-alpha.ads, s-parame-hpux.ads, s-tassta.adb,
3349 s-tarest.adb, s-parame-vms-ia64.ads, s-soflin.adb, s-secsta.adb,
5b8ca141
TG
3350 s-secsta.ads, s-parame.ads, s-parame-vxworks.ads, s-parame-ae653.ads:
3351 Renames Ratio to Percentage, and Sec_Stack_Ratio to Sec_Stack_Percentage
da94696d 3352
c199ccf7
AC
33532011-08-30 Gary Dismukes <dismukes@adacore.com>
3354
3355 * sem_res.adb (Valid_Conversion): Revise test for implicit anonymous
3356 access conversions to check that the conversion is a rewritten node,
3357 rather than just having Comes_From_Source set to False, which wasn't
3358 sufficient.
3359
33602011-08-30 Robert Dewar <dewar@adacore.com>
3361
3362 * exp_ch9.adb, sem_ch9.adb, sem_ch6.adb, exp_disp.adb,
3363 g-socket.ads: Minor reformatting.
3364
33652011-08-30 Thomas Quinot <quinot@adacore.com>
3366
3367 * sem_util.adb: Minor reformatting.
3368
33692011-08-30 Tristan Gingold <gingold@adacore.com>
3370
3371 * raise-gcc.c: Never catch exception if _UA_FORCE_UNWIND flag is set,
3372 to be compliant with the ABI.
3373
dff99e1a
AC
33742011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3375
3376 * sem_ch12.adb (Check_Private_View): Exchange the private and full view
3377 of a designated type when the related access type is an actual in an
3378 instance. This ensures that the full view of designated type is
3379 available when inside the body of the instance.
3380
33812011-08-30 Ed Schonberg <schonberg@adacore.com>
3382
3383 * sem_util.adb (May_Be_Lvalue): To determine whether a reference may be
3384 in a position to be modified, a slice is treated like an indexed
3385 component.
3386
63be2a5a
AC
33872011-08-30 Thomas Quinot <quinot@adacore.com>
3388
3389 * s-oscons-tmplt.c, g-socket.ads: Adjust maximum allowed value for
3390 field tv_sec in struct timeval.
3391
33922011-08-30 Yannick Moy <moy@adacore.com>
3393
3394 * exp_ch9.adb, exp_disp.adb, sem_ch9.adb, sem_res.adb: Protect several
3395 blocks of code doing full expansion, previously only guarded by
3396 Expander_Active, by anding the test that ALFA_Mode is not set
3397
33982011-08-30 Ed Schonberg <schonberg@adacore.com>
3399
3400 * sem_ch6.adb (Analyze_Return_Type): If the return type is incomplete,
3401 add the function to the list of private dependents, for subsequent
3402 legality check on Taft amendment types.
3403 * sem_ch12.adb (Analyze_Formal_Incomplete_Type): Initialize
3404 Private_Dependents, as for other incomplete types.
3405 * sem_util.adb (Wrong_Type): Avoid cascaded errors when a
3406 Taft-amendment type is used as the return type of a function.
3407
dd54644b
JM
34082011-08-30 Javier Miranda <miranda@adacore.com>
3409
3410 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
3411 which emits an error by a call to a new routine which report the error.
3412 * exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
3413 entity does not cover an existing interface.
3414 * errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
3415 code.
3416 * sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
3417 protected procedures or entries whose mode is not conformant.
3418 (Check_Synchronized_Overriding): Code cleanup: replace code which emits
3419 an error by a call to a new routine which report the error.
3420
d3ba478e
AC
34212011-08-30 Robert Dewar <dewar@adacore.com>
3422
3423 * gnat_rm.texi: Minor change.
3424 * exp_attr_light.adb: Minor reformatting.
3425
34262011-08-30 Ed Schonberg <schonberg@adacore.com>
3427
3428 * sem_ch3.adb: Patch inheritance of aspects in
3429 Complete_Private_Subtype, to avoid infinite loop.
3430
c01817d2
AC
34312011-08-30 Javier Miranda <miranda@adacore.com>
3432
3433 * sem_ch3.adb (Add_Internal_Interface_Entities): If serious errors have
3434 been reported and a subprogram covering an interface primitive is not
3435 found then skip generating the internal entity. Done to avoid crashing
3436 the frontend.
3437 (Check_Abstract_Overriding): Change text of error of wrong formal of
3438 protected subprogram or entry. Done for consistency to emit exactly the
3439 same error reported by Check_Synchronized_Overriding. In addition, the
3440 error is restricted to protected types (bug found working on AI05-0090)
3441
34422011-08-30 Yannick Moy <moy@adacore.com>
3443
3444 * exp_aggr.adb, exp_ch11.adb, exp_prag.adb: Remove early exit during
3445 expansion in Alfa mode.
3446 * exp_ch6.adb, exp_ch6.ads (Expand_Actuals): Make subprogram public.
3447 * exp_light.adb, exp_light.ads: New package defining light expansion.
3448 * expander.adb (Expand): Call light expansion in Alfa mode
3449 * exp_ch6_light.adb, exp_ch6_light.ads: Light expansion of chapter 6
3450 constructs.
3451 * exp_ch7_light.adb, exp_ch7_light.ads: Light expansion of chapter 7
3452 constructs.
3453 * exp_attr_light.adb, exp_attr_light.ads: Light expansion of attributes
3454 * gnat1drv.adb (Adjust_Global_Switches): Comment
3455
34562011-08-30 Yannick Moy <moy@adacore.com>
3457
3458 * lib-xref-alfa.adb: Minor refactoring.
3459
34602011-08-30 Yannick Moy <moy@adacore.com>
3461
3462 * exp_ch9.adb (Expand_Entry_Barrier): Do not perform expansion in Alfa
3463 mode.
3464 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not perform
3465 expansion in Alfa mode.
3466 * sem_ch9.adb (Analyze_Entry_Body): Do not perform expansion in Alfa
3467 mode.
3468
34692011-08-30 Robert Dewar <dewar@adacore.com>
3470
3471 * debug_a.adb: Update comment.
3472
996c8821
RD
34732011-08-30 Robert Dewar <dewar@adacore.com>
3474
3475 * exp_ch5.adb, sem_ch3.adb, sem_ch5.adb, einfo.adb, checks.adb,
3476 sem_util.adb, sem_util.ads, sem_res.adb, s-stposu.adb, sem_attr.adb,
3477 exp_ch4.adb, exp_ch6.adb, lib-xref-alfa.adb,
3478 sem_ch8.adb, sem_disp.adb, exp_ch3.adb: Minor reformatting
3479
34802011-08-30 Robert Dewar <dewar@adacore.com>
3481
3482 * gnat_rm.texi: Add section on C.6(16) implementation advice for pragma
3483 volatile.
3484
3647ca26
HK
34852011-08-30 Hristian Kirtchev <kirtchev@adacore.com>
3486
3487 * exp_ch3.adb (Expand_Freeze_Array_Type): Correct the call to
3488 Build_Finalization_Master by supplying an insertion node and enclosing
3489 scope. In its old version, the call did not generate a finalization
3490 master.
3491 (Expand_Freeze_Record_Type): Add local variable Has_AACC. Add code to
3492 recognize anonymous access-to-controlled components. Rewrite the
3493 machinery which creates finalization masters to service anonymous
3494 access-to-controlled components of a record type. In its current state,
3495 only one heterogeneous master is necessary to handle multiple anonymous
3496 components.
3497 (Freeze_Type): Comment reformatting.
3498 * rtsfind.ads: Add RE_Set_Is_Heterogeneous to tables RE_Id and
3499 RE_Unit_Table.
3500 * s-stposu.adb (Allocate_Any_Controlled): Rewrite the machinery which
3501 associates TSS primitive Finalize_Address with either the master itself
3502 or with the internal hash table depending on the mode of operation of
3503 the master.
3504
6d4e4fbc
JM
35052011-08-30 Javier Miranda <miranda@adacore.com>
3506
3507 * exp_ch3.adb (Make_Eq_If): If the etype of the _parent component is an
3508 interface type then do not generate code to compare this component.
3509 Required since they have no components and their equality operator is
3510 abstract.
3511
d15f9422
AC
35122011-08-30 Steve Baird <baird@adacore.com>
3513
3514 * sem_util.ads (Deepest_Type_Access_Level): New function; for the type
3515 of a saooaaat (i.e, a stand-alone object of an anonymous access type),
3516 returns the (static) accessibility level of the object. Otherwise, the
3517 same as Type_Access_Level.
3518 (Dynamic_Accessibility_Level): New function; given an expression which
3519 could occur as the rhs of an assignment to a saooaaat (i.e., an
3520 expression of an access-to-object type), return the new value for the
3521 saooaaat's associated Extra_Accessibility object.
3522 (Effective_Extra_Accessibility): New function; same as
3523 Einfo.Extra_Accessibility except that object renames are looked through.
3524 * sem_util.adb
3525 (Deepest_Type_Access_Level): New function; see sem_util.ads description.
3526 (Dynamic_Accessibility_Level): New function; see sem_util.ads
3527 description.
3528 (Effective_Extra_Accessibility): New function; see sem_util.ads
3529 description.
3530 * einfo.ads (Is_Local_Anonymous_Access): Update comments.
3531 (Extra_Accessibility): Update comments.
3532 (Init_Object_Size_Align): New procedure; same as Init_Size_Align
3533 except RM_Size field (which is only for types) is unaffected.
3534 * einfo.adb
3535 (Extra_Accessibility): Expand domain to allow objects, not just formals.
3536 (Set_Extra_Accessibility): Expand domain to allow objects, not just
3537 formals.
3538 (Init_Size): Add assertion that we are not trashing the
3539 Extra_Accessibility attribute of an object.
3540 (Init_Size_Align): Add assertion that we are not trashing the
3541 Extra_Accessibility attribute of an object.
3542 (Init_Object_Size_Align): New procedure; see einfo.ads description.
3543 * sem_ch3.adb (Find_Type_Of_Object): Set Is_Local_Anonymous_Access
3544 differently for the type of a (non-library-level) saooaaat depending
3545 whether Ada_Version < Ada_2012. This is the only point where Ada_Version
3546 is queried in this set of changes - everything else (in particular,
3547 setting of the Extra_Accessibility attribute in exp_ch3.adb) is
3548 driven off of the setting of the Is_Local_Anonymous_Access attribute.
3549 The special treatment of library-level saooaaats is an optimization,
3550 not required for correctnesss. This is based on the observation that the
3551 Ada2012 rules (static and dynamic) for saooaaats turn out to be
3552 equivalent to the Ada2005 rules in the case of a library-level saooaaat.
3553 * exp_ch3.adb
3554 (Expand_N_Object_Declaration): If Is_Local_Anonymous_Access is
3555 false for the type of a saooaaat, declare and initialize its
3556 accessibility level object and set the Extra_Accessibility attribute
3557 of the saooaaat to refer to this object.
3558 * checks.adb (Apply_Accessibility_Check): Add Ada 2012 saooaaat support.
3559 * exp_ch4.adb (Expand_N_In): Replace some Extra_Accessibility calls with
3560 calls to Effective_Extra_Accessibility in order to support
3561 renames of saooaaats.
3562 (Expand_N_Type_Conversion): Add new local function,
3563 Has_Extra_Accessibility, and call it when determining whether an
3564 accessibility check is needed.
3565 It returns True iff Present (Effective_Extra_Accessibility (Id)) would
3566 evaluate to True (without raising an exception).
3567 * exp_ch5.adb
3568 (Expand_N_Assignment_Statement): When assigning to an Ada2012
3569 saooaaat, update its associated Extra_Accessibility object (if
3570 it has one). This includes an accessibility check.
3571 * exp_ch6.adb (Add_Call_By_Copy_Code): When parameter copy-back updates
3572 a saooaaat, update its Extra_Accessibility object too (if it
3573 has one).
3574 (Expand_Call): Replace a couple of calls to Type_Access_Level
3575 with calls to Dynamic_Access_Level to handle cases where
3576 passing a literal (any literal) is incorrect.
3577 * sem_attr.adb (Resolve_Attribute): Handle the static accessibility
3578 checks associated with "Saooaat := Some_Object'Access;"; this must
3579 be rejected if Some_Object is declared in a more nested scope
3580 than Saooaat.
3581 * sem_ch5.adb (Analyze_Assignment): Force accessibility checking for an
3582 assignment to a saooaaat even if Is_Local_Anonymous_Access
3583 returns False for its type (indicating a 2012-style saooaaat).
3584 * sem_ch8.adb
3585 (Analyze_Object_Renaming): Replace a call to Init_Size_Align
3586 (which is only appropriate for objects, not types) with a call
3587 of Init_Object_Size_Align in order to avoid trashing the
3588 Extra_Accessibility attribute of a rename (the two attributes
3589 share storage).
3590 * sem_res.adb
3591 (Valid_Conversion) Replace six calls to Type_Access_Level with
3592 calls to Deepest_Type_Access_Level. This is a bit tricky. For an
3593 Ada2012 non-library-level saooaaat, the former returns library level
3594 while the latter returns the (static) accessibility level of the
3595 saooaaat. A type conversion to the anonymous type of a saooaaat
3596 can only occur as part of an assignment to the saooaaat, so we
3597 know that such a conversion must be in a lhs context, so Deepest
3598 yields the result that we need. If such a conversion could occur,
3599 say, as the operand of an equality operator, then this might not
3600 be right. Also add a test so that static accessibilty checks are
3601 performed for converting to a saooaaat's type even if
3602 Is_Local_Anonymous_Access yields False for the type.
3603
36042011-08-30 Javier Miranda <miranda@adacore.com>
3605
3606 * sem_disp.adb (Check_Dispatching_Operation): Complete condition that
3607 controls generation of a warning associated with late declaration of
3608 dispatching functions. Required to avoid generating spurious
3609 warnings.
3610
6cce2156
GD
36112011-08-30 Gary Dismukes <dismukes@adacore.com>
3612
3613 * sem_ch6.adb (Check_Return_Subtype_Indication): Issue error if the
3614 return object has an anonymous access type and the function's type is
3615 a named access type.
3616 * sem_ch8.adb (Analyze_Object_Renaming): Suppress error about renaming
3617 conversions on implicit conversions, since such conversions can occur
3618 for anonymous access cases due to expansion. Issue error for attempt
3619 to rename an anonymous expression as an object of a named access type.
3620 * sem_res.ads (Valid_Conversion): Add defaulted parameter Report_Errs,
3621 to indicate whether this function should report errors on invalid
3622 conversions.
3623 * sem_res.adb (Resolve): For Ada 2012, in the case where the type of
3624 the expression is of an anonymous access type and the expected type is
3625 a named general access type, rewrite the expression as a type
3626 conversion, unless this is an expression of a membership test.
3627 (Valid_Conversion.Error_Msg_N): New procedure that conditions the
3628 calling of Error_Msg_N on new formal Report_Errs.
3629 (Valid_Conversion.Error_Msg_NE): New procedure that conditions the
3630 calling of Error_Msg_NE on new formal Report_Errs.
3631 (Valid_Conversion): Move declaration of this function to the package
3632 spec, to allow calls from membership test processing. For Ada 2012,
3633 enforce legality restrictions on implicit conversions of anonymous
3634 access values to general access types, disallowing such conversions in
3635 cases where the expression has a dynamic accessibility level (access
3636 parameters, stand-alone anonymous access objects, or a component of a
3637 dereference of one of the first two cases).
3638 * sem_type.adb (Covers): For Ada 2012, allow an anonymous access type
3639 in the context of a named general access expected type.
3640 * exp_ch4.adb Add with and use of Exp_Ch2.
3641 (Expand_N_In): Add processing for membership tests applied to
3642 expressions of an anonymous access type. First, Valid_Conversion is
3643 called to check whether the test is statically False, and then the
3644 conversion is expanded to test that the expression's accessibility
3645 level is no deeper than that of the tested type. In the case of
3646 anonymous access-to-tagged types, a tagged membership test is applied
3647 as well.
3648 (Tagged_Membership): Extend to handle access type cases, applying the
3649 test to the designated types.
3650 * exp_ch6.adb (Expand_Call): When creating an extra actual for an
3651 accessibility level, and the actual is a 'Access applied to a current
3652 instance, pass the accessibility level of the type of the current
3653 instance rather than applying Object_Access_Level to the prefix. Add a
3654 ??? comment, since this level isn't quite right either (will eventually
3655 need to pass an implicit level parameter to init procs).
3656
747de90b
AC
36572011-08-30 Bob Duff <duff@adacore.com>
3658
3659 * s-taskin.ads: Minor comment fix.
3660
36612011-08-30 Ed Schonberg <schonberg@adacore.com>
3662
3663 * sem_res.adb (Check_Parameterless_Call): If the node is a selected
3664 component and the selector is a dispatching operation, check if it is
3665 a prefixed call before rewriting as a parameterless function call.
3666
cdc4cc65
JJ
36672011-08-29 Jakub Jelinek <jakub@redhat.com>
3668
3669 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy
3670 tsystem.h into $(RTSDIR) instead of rts.
3671
226a7fa4
AC
36722011-08-29 Robert Dewar <dewar@adacore.com>
3673
3674 * sem_ch10.adb, a-coorse.adb, exp_dist.adb, exp_ch3.adb: Minor
3675 reformatting.
3676 * gcc-interface/Make-lang.in: Update dependencies.
3677
36782011-08-29 Yannick Moy <moy@adacore.com>
3679
3680 * alfa.ads (Name_Of_Heap_Variable): New constant name.
3681 * lib-xref-alfa.adb, lib-xref.adb, lib-xref.ads (Drefs): New global
3682 table to hold dereferences.
3683 (Add_ALFA_Xrefs): Take into account dereferences as special
3684 reads/writes to the variable "HEAP".
3685 (Enclosing_Subprogram_Or_Package): Move subprogram here.
3686 (Generate_Dereference): New procedure to store a read/write dereferencew
3687 in the table Drefs.
3688 * put_alfa.adb (Put_ALFA): Use different default than (0,0) used for
3689 the special "HEAP" var.
3690 * sem_ch4.adb (Analyze_Explicit_Dereference): Store read dereference
3691 in ALFA mode.
3692 * sem_util.adb (Note_Possible_Modification): Store write dereference
3693 in ALFA mode.
3694
dfbcb149
HK
36952011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3696
3697 * exp_ch3.adb (Freeze_Type): Generate an accessibility check which
3698 ensures that the level of the subpool access type is not deeper than
3699 that of the pool object.
3700 * sem_util.adb (Object_Access_Level): Expand to handle defining
3701 identifiers.
3702 * sem_res.adb (Resolve_Allocator): Add a guard to avoid examining the
3703 subpool handle name of a rewritten allocator.
3704
1df4f514
AC
37052011-08-29 Robert Dewar <dewar@adacore.com>
3706
3707 * impunit.adb, exp_ch4.adb, s-finmas.adb: Minor reformatting.
3708
37092011-08-29 Thomas Quinot <quinot@adacore.com>
3710
3711 * exp_dist.adb (TC_Rec_Add_Process_Element): For a choice with multiple
3712 values, we generate multiple triples of parameters in the TypeCode.
3713 Bump Choice_Index for each such triple so that a subsequent default
3714 choice is associated with the correct index in the typecode.
3715
37162011-08-29 Ed Schonberg <schonberg@adacore.com>
3717
3718 * a-cdlili.adb (Iterate): Initialize properly an iterator over a null
3719 container.
3720 (First, Last): Handle properly an iterator over a null container.
3721
37222011-08-29 Bob Duff <duff@adacore.com>
3723
3724 * sem_ch10.adb (Analyze_With_Clause,Install_Withed_Unit): Abandon
3725 processing if we run across a node with no Scope. This can happen if
3726 we're with-ing an library-level instance, and that instance got errors
3727 that caused "instantiation abandoned".
3728 * sem_util.adb (Unit_Declaration_Node): Make it more robust, by raising
3729 an exception instead of using Assert, so it won't go into an infinite
3730 loop, even when assertions are turned off.
3731
37322011-08-29 Ed Schonberg <schonberg@adacore.com>
3733
3734 * a-coorse.adb: Proper handling of empty ordered sets.
3735
14f0f659
AC
37362011-08-29 Johannes Kanig <kanig@adacore.com>
3737
3738 * debug.adb: Add comments.
3739
8027b455
AC
37402011-08-29 Thomas Quinot <quinot@adacore.com>
3741
3742 * a-except.adb, a-except-2005.adb: Minor comment rewording and
3743 reformatting.
3744
37452011-08-29 Yannick Moy <moy@adacore.com>
3746
3747 * sem_ch3.adb (Array_Type_Declaration): Remove insertion of
3748 declaration for Itypes in Alfa mode.
3749
d85fd922
AC
37502011-08-29 Robert Dewar <dewar@adacore.com>
3751
3752 * a-cdlili.ads, a-coinve.ads, a-coorma.adb, a-coorma.ads, s-tassta.adb,
3753 a-cborma.adb, a-cborma.ads, a-cohama.ads, a-coorse.ads, a-cbhama.ads,
3754 a-cborse.ads, a-cobove.adb, a-cobove.ads, a-cbhase.ads: Minor
3755 reformatting.
3756
37572011-08-29 Tristan Gingold <gingold@adacore.com>
3758
3759 * exp_ch7.adb, exp_ch7.ads (Build_Exception_Handler): Move its spec to
3760 package spec.
3761 * exp_intr.adb (Expand_Unc_Deallocation): Use Build_Exception_Handler.
3762 * a-except.adb, a-except-2005.adb (Rcheck_22): Do not defer aborts
3763 while raising PE.
3764
fd3d2680
AC
37652011-08-29 Robert Dewar <dewar@adacore.com>
3766
3767 * a-cbhama.adb, a-cbhama.ads: Minor reformatting.
3768
37692011-08-29 Javier Miranda <miranda@adacore.com>
3770
3771 * sem_ch8.adb (Analyze_Subprogram_Renaming): Complete support for
3772 renamings of formal subprograms when the actual for a formal type is
3773 class-wide.
3774
dfbf013f
MH
37752011-08-29 Matthew Heaney <heaney@adacore.com>
3776
3777 * a-cbhama.ads, a-cbhase.ads (Move): Clear Source following assignment
3778 to Target.
3779
37802011-08-29 Matthew Heaney <heaney@adacore.com>
3781
3782 * a-cborma.ads, a-cborse.ads (Cursor): Default-initialize all
3783 components of record type.
3784 * a-cborma.adb, a-cborse.adb (Move): Clear Source following assignmentw
3785 to Target.
3786
a6dd3a54
ES
37872011-08-29 Ed Schonberg <schonberg@adacore.com>
3788
3789 * a-cbhama.adb, a-cbhama.ads, a-cborma.adb, a-cborma.ads, a-cobove.adb,
3790 a-cobove.ads, a-coorma.adb, a-coorma.ads: Add iterator machinery to
3791 container packages.
3792
c54796e0
AC
37932011-08-29 Robert Dewar <dewar@adacore.com>
3794
3795 * sem_ch3.adb, sem_util.adb, gnat1drv.adb, s-parint.ads: Minor
3796 reformatting.
3797
37982011-08-29 Matthew Heaney <heaney@adacore.com>
3799
3800 * a-cbhama.ads, a-cbhase.ads (Cursor): Default-initialize all
3801 components of record type.
3802
38032011-08-29 Bob Duff <duff@adacore.com>
3804
3805 * s-tassta.adb (Task_Wrapper): Handle and ignore exceptions propagated
3806 by the termination handler.
3807
9fd9d2be
AC
38082011-08-29 Yannick Moy <moy@adacore.com>
3809
3810 * sem_ch3.adb (Array_Type_Declaration): Create declarations for Itypes
3811 created in Alfa mode, instead of inserting artificial declarations of
3812 non-Itypes in the tree.
3813 * sem_util.adb, sem_util.ads (Itype_Has_Declaration): New function to
3814 know if an Itype has a corresponding declaration, as defined in
3815 itypes.ads.
3816
38172011-08-29 Yannick Moy <moy@adacore.com>
3818
3819 * gnat1drv.adb: Minor rewrite.
3820
38212011-08-29 Bob Duff <duff@adacore.com>
3822
3823 * s-tasuti.adb (Make_Passive): Work around race condition in
3824 Make_Independent, which can cause Wait_Count to be zero. So instead of
3825 asserting that Wait_Count > 0, and then decrementing it, decrement it
3826 only if Wait_Count > 0.
3827 * s-taskin.ads (Wait_Count, Alive_Count, Awake_Count): All of these
3828 should be nonnegative, so declare them Natural instead of Integer.
3829
833eaa8a
AC
38302011-08-29 Robert Dewar <dewar@adacore.com>
3831
3832 * exp_ch5.adb, sem_ch3.adb, a-cihama.adb, a-cihama.ads, exp_ch7.adb,
3833 sem_ch5.adb, a-ciorse.adb, a-ciorse.ads, sem_ch12.adb, a-cidlli.adb,
3834 a-cidlli.ads, sem_util.adb, sem_res.adb, gnat1drv.adb, a-except.adb,
3835 a-except.ads, a-except-2005.ads, sem_ch4.adb, exp_disp.adb,
3836 exp_aggr.adb, sem_ch13.adb, par-ch3.adb: Minor reformatting.
3837
38382011-08-29 Tristan Gingold <gingold@adacore.com>
3839
3840 * s-auxdec-vms-alpha.adb: Add comments, remove some HT before labels.
3841
38422011-08-29 Vadim Godunko <godunko@adacore.com>
3843
3844 * s-parint.ads: Minor comment clarification.
3845
38462011-08-29 Vincent Celier <celier@adacore.com>
3847
3848 * prj.adb (Initialize): Make sure that new reserved words after Ada 95
3849 may be used as identifiers.
3850
38512011-08-29 Ed Schonberg <schonberg@adacore.com>
3852
3853 * a-coinho.ads: Minor reformating.
3854
3a613a36
AC
38552011-08-29 Ed Schonberg <schonberg@adacore.com>
3856
3857 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly a loop over a
3858 container of a derived type.
3859
3a613a36
AC
38602011-08-29 Ed Schonberg <schonberg@adacore.com>
3861
3862 * a-cidlli.adb, a-cidlli.ads, a-cihama.adb, a-cihama.ads,
3863 a-ciorse.adb, a-ciorse.ads: Add iterator machinery to containers.
3864
14848f57
AC
38652011-08-29 Pascal Obry <obry@adacore.com>
3866
3867 * exp_disp.adb: Minor comment fix.
3868 (Make_Disp_Asynchronous_Select_Body): Properly initialize out parameters
3869 to avoid warnings when compiling with -Wall.
3870 (Make_Disp_Conditional_Select_Body): Likewise.
3871 (Make_Disp_Timed_Select_Body): Likewise.
3872
38732011-08-29 Ed Schonberg <schonberg@adacore.com>
3874
3875 * sem_ch12.adb (Analyze_Formal_Subprogram_Declaration): If default is
3876 an entity name, generate reference for it.
3877
38782011-08-29 Ed Schonberg <schonberg@adacore.com>
3879
3880 * exp_ch5.adb (Expand_Iterator_Loop): Uniform handling of "X of S"
3881 iterator form.
3882 * sem_util.adb (Is_Iterator, Is_Reversible_Iterator): Yield True for
3883 the class-wide type.
3884 * sem_ch5.adb: Move some rewriting to the expander, where it belongs.
3885
38862011-08-29 Ed Schonberg <schonberg@adacore.com>
3887
3888 * sem_ch8.adb (Check_Constrained_Object): Do not create an actual
3889 subtype for an object whose type is an unconstrained union.
3890
38912011-08-29 Ed Schonberg <schonberg@adacore.com>
3892
3893 * par-ch3.adb (P_Array_Type_Definiation, P_Component_Items): "aliased"
3894 is allowed in a component definition, by AI95-406.
3895
38962011-08-29 Matthew Heaney <heaney@adacore.com>
3897
3898 * a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
3899
39002011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3901
3902 * a-except-2005.adb: Alphabetize all routines.
3903 (Triggered_By_Abort): New routine.
3904 * a-except-2005.ads (Triggered_By_Abort): New routine.
3905 * a-except.adb Alphabetize all routines.
3906 (Triggered_By_Abort): New routine.
3907 * a-except.ads (Triggered_By_Abort): New routine.
3908 * exp_ch7.adb: Update all comments involving the detection of aborts in
3909 finalization code.
3910 (Build_Object_Declarations): Do not generate code to detect the
3911 presence of an abort at the start of finalization code, use a runtime
3912 routine istead.
3913 * rtsfind.ads: Add RE_Triggered_By_Abort to tables RE_Id and
3914 RE_Unit_Table.
3915 * sem_res.adb (Resolve_Allocator): Emit a warning when attempting to
3916 allocate a task on a subpool.
3917 * s-stposu.adb: Add library-level flag Finalize_Address_Table_In_Use.
3918 The flag disables all actions related to the maintenance of
3919 Finalize_Address_Table when subpools are not in use.
3920 (Allocate_Any_Controlled): Signal the machinery that subpools are in
3921 use.
3922 (Deallocate_Any_Controlled): Do not call Delete_Finalize_Address which
3923 performs costly task locking when subpools are not in use.
3924
57a8057a
AC
39252011-08-29 Yannick Moy <moy@adacore.com>
3926
3927 * gnat1drv.adb (Adjust_Global_Switches): Restore expansion of tagged
3928 types and dispatching calls in Alfa mode.
3929 * lib-xref-alfa.adb (Collect_ALFA): Rewrite computation of
3930 correspondance between body and spec scopes, to reuse utility functions
3931 (Traverse_Declarations_Or_Statements): Protect access to body for stub
3932 by testing the presence of the library unit for the body
3933 * sem_ch6.adb (Set_Actual_Subtypes): take into account that in Alfa
3934 mode the expansion of accept statements is skipped
3935 * sem_util.adb, sem_util.ads (Unique_Entity): New function returning
3936 the unique entity corresponding to the one returned by
3937 Unique_Defining_Entity applied to the enclosing declaration of the
3938 argument.
3939
39402011-08-29 Bob Duff <duff@adacore.com>
3941
3942 * treepr.ads: Improve debugging facilities. pn(x) no longer crashes in
3943 gdb when x is not a node (it can be a node list, name_id, etc). pp is
3944 an alias for pn. ppp is an alias for pt.
3945
39462011-08-29 Javier Miranda <miranda@adacore.com>
3947
3948 * exp_aggr.adb (Expand_Record_Aggregate): Use the top-level enclosing
3949 aggregate to take a consistent decision on the need to convert into
3950 assignments aggregates that initialize constant objects.
3951
39522011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
3953
3954 * exp_ch4.adb (Expand_Allocator_Expression): Add a call to
3955 Build_Allocate_Deallocate_Proc in order to handle allocation of
3956 non-controlled objects on subpools.
3957 * impunit.adb: Remove s-finmas and s-spsufi since they were never meant
3958 to be end-user visible.
3959 * s-finmas.adb: Add with and use clause for System.HTable.
3960 Add an instantiation of Simple_HTable which provides a mapping between
3961 the address of a controlled object and the corresponding
3962 Finalize_Address used to clean up the object. The table is used when a
3963 master is operating in heterogeneous mode.
3964 (Attach): Explain why the input node is not verified on being already
3965 attached.
3966 (Delete_Finalize_Address): New routine.
3967 (Detach): Add pragma Assert which ensures that a node is already
3968 attached.
3969 (Finalize): Add local variable Cleanup. Rewrite the iteration scheme
3970 since nodes are no longer removed on traversal. Explain why node
3971 detachment is undesirable in this case.
3972 (Get_Finalize_Address): New routine.
3973 (Hash): New routine.
3974 (Is_Empty_List): Removed.
3975 (pm): Renamed to Print_Master. Add output for discriminant
3976 Is_Homogeneous.
3977 Comment reformatting.
3978 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
3979 * s-finmas.ads: Various comments additions / improvements.
3980 Type Finalization_Master has a discriminant which determines the mode of
3981 operation.
3982 (Delete_Finalize_Address): New routine.
3983 (Get_Finalize_Address): New routine.
3984 (pm): Renamed to Print_Master.
3985 (Set_Finalize_Address (Address, Finalize_Address_Ptr)): New routine.
3986 * s-stposu.adb: Add with clause for System.Address_Image; Add with and
3987 use clause for System.IO.
3988 (Allocate_Any_Controlled): Add machinery to set TSS primitive
3989 Finalize_Address depending on the mode of allocation and the mode of
3990 the master.
3991 (Deallocate_Any_Controlled): Remove the relation pair object -
3992 Finalize_Address regardless of the master mode. Add comment explaining
3993 the reason.
3994 (Detach): Ensure that fields Prev and Next are null after detachment.
3995 (Finalize_Pool): Remove local variable Next_Ptr. Rewrite the iteration
3996 scheme to check whether the list of subpools is empty. There is no
3997 longer need to store the next subpool or advance the current pointer.
3998 (Is_Empty_List): New routine.
3999 (Print_Pool): New routine.
4000 (Print_Subpool): New routine.
4001 * s-stposu.ads: Various comments additions / improvements.
4002 Field Master of type Root_Subpool is now a heterogeneous collection.
4003 (Print_Pool): New routine.
4004 (Print_Subpool): New routine.
4005
40062011-08-29 Ed Schonberg <schonberg@adacore.com>
4007
4008 * exp_ch5.adb (Expand_N_Iterator_Loop): Implement Ada2012 loop iterator
4009 forms, using aspects of container types.
4010 * sem_ch3.adb (Find_Type_Name): Preserve Has_Delayed_Aspects and
4011 Has_Implicit_Dereference flags, that may be set on the partial view.
4012 * sem_ch4.adb (Process_Overloaded_Indexed_Component): Prefix may be a
4013 container type with an indexing aspect.
4014 (Analyze_Quantified_Expression): Analyze construct with expansion
4015 disabled, because it will be rewritten as a loop during expansion.
4016 (Try_Container_Indexing): The prefix itself may be a container type
4017 with an indexing aspect, as with a vector of vectors.
4018 * sem_ch5.adb (Analyze_Iteration_Scheme): In a generic context, analyze
4019 the original doamin of iteration, for name capture.
4020 (Analyze_Iterator_Specification): If the domain is an expression that
4021 needs finalization, create a separate declaration for it.
4022 For an iterator with "of" retrieve default iterator info from aspect of
4023 container type. For "in" iterator, retrieve type of Iterate function.
4024 * sem_ch13.adb (Check_Iterator_Function): Fix typo.
4025 (Check_Aspect_At_End_Of_Declaration): Make type unfrozen before
4026 analysis, to prevent spurious errors about late attributes.
4027 * sprint.adb: Handle quantified expression with either loop or iterator
4028 specification.
4029 * a-convec.ads, a-convec.adb: Iterate function returns a reversible
4030 iterator.
4031
ddf67a1d
AC
40322011-08-29 Vincent Celier <celier@adacore.com>
4033
4034 * make.adb (Scan_Make_Arg): Take any option as is in packages Compiler,
4035 Binder or Linker of the main project file.
4036
40372011-08-29 Ed Schonberg <schonberg@adacore.com>
4038
4039 * inline.adb (Add_Scopes_To_Clean): Exclude any entity within a generic
4040 unit.
4041
40422011-08-29 Yannick Moy <moy@adacore.com>
4043
4044 * exp_ch9.adb: Partial revert of previous change for Alfa mode
4045
40462011-08-29 Yannick Moy <moy@adacore.com>
4047
4048 * exp_ch11.adb: Minor expansion of comment.
4049
40502011-08-29 Yannick Moy <moy@adacore.com>
4051
4052 * lib-xref-alfa.adb (Add_ALFA_Scope): Treat generic entities.
4053
40542011-08-29 Ed Schonberg <schonberg@adacore.com>
4055
4056 * sem_res.adb (Resolve_Arithmetic_Op): If the node has a universal
4057 interpretation, set the type before resolving the operands, because
4058 legality checks on an exponention operand need to know the type of the
4059 context.
4060
40612011-08-29 Ed Schonberg <schonberg@adacore.com>
4062
4063 * sem_ch12.adb (Analyze_Package_Instantiation): Do not set delayed
4064 cleanups on a master if the instance is within a generic unit.
4065 Complement to the corresponding fix to inline.adb for K520-030.
4066
40672011-08-29 Tristan Gingold <gingold@adacore.com>
4068
4069 * exp_ch7.adb (Build_Raise_Statement): Raise PE instead of the current
4070 occurrence.
4071 * exp_intr.adb: Minor comment fix.
4072
40732011-08-29 Bob Duff <duff@adacore.com>
4074
4075 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix cases where
4076 Delay_Required was used as an uninitialized variable.
4077
690943fc
RD
40782011-08-29 Robert Dewar <dewar@adacore.com>
4079
4080 * a-cdlili.adb, a-cdlili.ads, a-coinve.adb, a-coinve.ads,
4081 sem_util.adb, sem_util.ads, a-cohama.adb, a-cohama.ads, a-coorse.adb,
4082 a-coorse.ads, aspects.ads, sem_ch8.adb: Minor reformatting.
4083
9f0ee988
TQ
40842011-08-29 Thomas Quinot <quinot@adacore.com>
4085
4086 * system-freebsd-x86_64.ads (Backend_Overflow_Checks): Set true True.
4087 Remove unused variables.
4088
3e24afaa
AC
40892011-08-29 Ed Schonberg <schonberg@adacore.com>
4090
4091 * sem_res.adb: Remove Build_Explicit_Dereference.
4092 * sem_util.adb, sem_util.ads (Build_Explicit_Dereference): Moved here
4093 from sem_res.adb, used in analysis of additional constructs.
4094 (Is_Iterator, Is_Reversible_Iterator): New predicates for Ada2012
4095 expansion of iterators.
4096 (Is_Object_Reference): Recognize variables rewritten as explicit
4097 dereferences in Ada2012.
4098 * snames.ads-tmpl: Add Has_Element, Forward_Iterator,
4099 Reversible_Iterator names, for expansion of Ada2012 iterators.
4100 * aspects.ads, aspects.adb (Find_Aspect): Utility.
4101 * a-cdlili.ads, a-cdlili.adb: Add new iterator machinery to doubly
4102 linked list container.
4103 * a-coinve.ads, a-coinve.adb: Ditto for indefinite vector containers.
4104 * a-coorse.ads, a-coorse.adb: Ditto for ordered sets.
4105
41062011-08-29 Ed Schonberg <schonberg@adacore.com>
4107
4108 * a-cohama.adb, a-cohama.ads: Add iterator primitives to hashed map
4109 containers.
4110
41112011-08-29 Vincent Celier <celier@adacore.com>
4112
4113 * make.adb (Gnatmake): Get the maximum number of simultaneous
4114 compilation processes after the Builder switches has been scanned, as
4115 there may include -jnn.
4116
41172011-08-29 Matthew Heaney <heaney@adacore.com>
4118
4119 * a-chtgbo.adb (Generic_Equal): Use correct overloading of Next.
4120
41212011-08-29 Tristan Gingold <gingold@adacore.com>
4122
4123 * gnatcmd.adb (GNATCmd): On OpenVMS, truncate the length of
4124 GNAT_DRIVER_COMMAND_LINE to 255.
4125
41262011-08-29 Pascal Obry <obry@adacore.com>
4127
4128 * freeze.adb, sem_ch8.adb, a-convec.adb, a-convec.ads: Minor
4129 reformatting and style fix (class attribute casing).
4130
41312011-08-29 Yannick Moy <moy@adacore.com>
4132
4133 * exp_ch11.adb: Yet another case where expansion should be common
4134 between CodePeer and Alfa.
4135
41362011-08-29 Yannick Moy <moy@adacore.com>
4137
4138 * exp_ch9.adb: Partial revert of previous change for Alfa mode.
4139
41402011-08-29 Ed Schonberg <schonberg@adacore.com>
4141
4142 * sem_ch6.adb (Matches_Limited_With_View): The limited views of an
4143 incomplete type and its completion match.
4144
3ddd922e
AC
41452011-08-29 Yannick Moy <moy@adacore.com>
4146
4147 * exp_ch13.adb: Adjust previous change.
4148
41492011-08-29 Robert Dewar <dewar@adacore.com>
4150
4151 * sem_prag.adb, prj.adb, sem_util.adb, sem_res.adb, gnat1drv.adb,
4152 exp_ch4.adb, sem_ch8.adb: Minor code reorganization
4153 Minor reformatting.
4154
444acbdd
AC
41552011-08-29 Emmanuel Briot <briot@adacore.com>
4156
4157 * make.adb, prj.adb, prj.ads (Compute_All_Imported_Projects): Also
4158 initialize aggregated projects.
4159
41602011-08-29 Ed Schonberg <schonberg@adacore.com>
4161
4162 * sem_ch8.adb (Find_Renamed_Entity): Within an instance, use scope
4163 depth of candidates to resolve a potentially spurious ambiguity between
4164 two visible subprograms.
4165
e0296583
AC
41662011-08-29 Yannick Moy <moy@adacore.com>
4167
4168 * sem_prag.adb (Analyze_Pragma): Allow Test_Case pragma without
4169 Requires/Ensures.
4170 * sem_util.adb (Get_Ensures_From_Test_Case_Pragma,
4171 Get_Requires_From_Test_Case_Pragma): Allow Test_Case pragma without
4172 Requires/Ensures.
4173
41742011-08-29 Arnaud Charlet <charlet@adacore.com>
4175
4176 * gnat1drv.adb (Adjust_Global_Switches): Improve previous change.
4177 Add comment.
4178
41792011-08-29 Thomas Quinot <quinot@adacore.com>
4180
4181 * sem_res.adb: Minor reformatting.
4182
69794413
JK
41832011-08-29 Johannes Kanig <kanig@adacore.com>
4184
4185 * exp_ch4.adb (Expand_Quantified_Expression): Do not expand in ALFA
4186 mode.
4187 * gnat1drv.adb (Adjust_Global_Switches): Set
4188 Use_Expressions_With_Actions to False in ALFA mode.
4189 * sem_res.adb (Resolve_Quantified_Expression): Simpler treatment in
4190 ALFA mode.
4191
59e6b23c
AC
41922011-08-29 Yannick Moy <moy@adacore.com>
4193
4194 * exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
4195 * exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
4196 * gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
4197 tagged types and dispatching calls in Alfa mode.
4198
41992011-08-29 Javier Miranda <miranda@adacore.com>
4200
4201 * sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
4202 we do not report an error on an Empty node.
4203
42042011-08-29 Geert Bosch <bosch@adacore.com>
4205
4206 * Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
4207 a-nlrear.o and a-nurear.o.
4208
42092011-08-29 Robert Dewar <dewar@adacore.com>
4210
4211 * freeze.adb: Minor code reorganization.
4212 Minor reformatting.
4213 * sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
4214 sem_ch6.adb: Minor reformatting
4215
42162011-08-29 Tristan Gingold <gingold@adacore.com>
4217
4218 * s-except.ads, s-except.adb: Provide dummy body.
4219
42202011-08-29 Yannick Moy <moy@adacore.com>
4221
4222 * sem_warn.adb (Within_Postcondition): Take into account the case of
4223 an Ensures component in a Test_Case.
4224
4d792549
AC
42252011-08-29 Tristan Gingold <gingold@adacore.com>
4226
4227 * s-excdeb.ads, s-excdeb.adb: New files, created from s-except.
4228 * rtsfind.ads (RTU_Id): Replaces System_Exceptions by
4229 System_Exceptions_Debug
4230 (RE_Unit_Table): Search RE_Local_Raise in System_Exceptions_Debug
4231 * a-except.adb: With and use System.Exceptions_Debug instead of
4232 System.Exceptions.
4233 * a-except-2005.adb: Likewise.
4234 * s-assert.adb: Likewise.
4235 * s-except.adb, s-except.ads: Move debugging hooks to s-excdeb.
4236 * Makefile.rtl: Add s-excdeb. Adjust compilation rule.
4237 * gcc-interfaces/Makefile.in, gcc-interface/Make-lang.in: Add
4238 s-excdeb. Update dependencies.
4239 (GNATRTL_LINEARALGEBRA_OBJS): Remove a-nlrear.o a-nurear.o a-nllrar.o
4240 as these no longer need external libraries.
4241
42422011-08-29 Ed Schonberg <schonberg@adacore.com>
4243
4244 * sem_res.adb (Resolve_Op_Expon): Additional check to reject an
4245 exponentiation operator on universal values in a context that requires
4246 a fixed-point type.
4247
42482011-08-29 Tristan Gingold <gingold@adacore.com>
4249
4250 * raise-gcc.c (personnality_routine): Fix thinko. Set Ada occurrence
4251 before calling notify_handled_exception.
4252 * a-exextr.adb: Fix comment.
4253
b254da66
AC
42542011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4255
4256 * exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
4257 Finalize_Address of the access type's finalization master.
4258 (Expand_N_Allocator): Add code to set attribute Finalize_Address of the
4259 access type's finalization master. Add a guard to prevent
4260 Associated_Storage_Pool from being set on .NET/JVM.
4261 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
4262 attribute Finalize_Address of the access type's finalization master.
4263 * exp_ch7.adb (Make_Finalize_Address_Call): New routine.
4264 * exp_ch7.ads (Make_Finalize_Address_Call): New routine.
4265 * rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
4266 RE_Unit_Table.
4267 * s-finmas.adb: Add with clause for System.Address_Image. Add with and
4268 use clause for System.IO
4269 (Detach): Relax the assertion, to be reinstated later.
4270 (Finalize): Rewrite the iteration loop to avoid pointer comparison.
4271 Relax the assertion on Finalize_Address, to be reinstated later.
4272 (Is_Empty_List): New routine.
4273 (pm): New debug routine.
4274 (Set_Finalize_Address): New routine.
4275 * s-finmas.ads (pm): New debug routine.
4276 (Set_Finalize_Address): New routine.
4277 * s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
4278
42792011-08-29 Tristan Gingold <gingold@adacore.com>
4280
4281 * a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
4282 Remove convention C.
4283
42842011-08-29 Tristan Gingold <gingold@adacore.com>
4285
4286 * s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
4287 (Initialize_TCB): Remove Exc_Stack_Ptr initialization.
4288 (Finalize_TCB): Remove its finalization.
4289 (Initialize): Remove assignment of GET_Exc_Stack_Addr
4290 * s-soflin.adb (NT_Exc_Stack): Remove
4291 (Get_Exc_Stack_Addr_NT): Likewise.
4292 (Get_Exc_Stack_Addr_Soft): Likewise.
4293 * s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
4294 (Get_Exc_Stack_Addr): Likewise.
4295 (Get_Exc_Stack_Addr_Soft): Likewise
4296 * s-taspri-vms.ads (Exc_Stack_T): Remove.
4297 (Exc_Stack_Ptr_T): Likewise.
4298 (Private_Data): Remove Exc_Stack_Ptr component.
4299
43002011-08-29 Tristan Gingold <gingold@adacore.com>
4301
4302 * raise-gcc.c (get_ip_from_context): New function. Factorize code.
4303
43042011-08-29 Tristan Gingold <gingold@adacore.com>
4305
4306 * gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
4307
43082011-08-29 Geert Bosch <bosch@adacore.com>
4309
4310 * s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
4311 L2_Norm, Swap_Column): New generic subprograms
4312 * s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
4313 L2_Norm, Swap_Column): Implement new subprograms in order to
4314 eliminate dependency on BLAS and LAPACK libraries in
4315 Ada.Numerics.Generic_Real_Arrays and eventually also the complex
4316 version. Forward_Eliminate/Back_Substitute can be used to put a
4317 matrix in row echelon or reduced row echelon form using partial
4318 pivoting.
4319 * a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
4320 Swap_Column): Instantiate from System.Generic_Array_Operations.
4321 ("*", "abs"): Implement by instantiation from Generic_Array_Operations.
4322 (Sqrt): Local function for simple computation of square root without
4323 adding dependencies on Generic_Elementary_Functions.
4324 (Swap): New subprogram to exchange floating point numbers.
4325 (Inverse): Reimplement using Jordan-Gauss elimination.
4326 (Jacobi): New procedure implementing Jacobi's method for computation
4327 of eigensystems, based on Rutishauser's implementation.
4328 (L2_Norm): Implement directly using the inner product.
4329 (Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
4330 decreasing eigenvalue as required by the Ada RM.
4331 (Swap_Column): New helper procedure for Sort_Eigensystem.
4332 Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
4333 Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
4334 Sort_Eigensystems.
4335
43362011-08-29 Thomas Quinot <quinot@adacore.com>
4337
4338 * put_scos.adb (Put_SCOs): Do not emit a newline for an empty
4339 statements line.
4340
60370fb1
AC
43412011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4342
4343 * s-finmas.adb (Finalize): Check Finalize_Address of the master rather
4344 than the current node.
4345 * s-finmas.ads: Move field Finalize_Address from type FM_Node to
4346 Finalization_Master. The list headers have two fields instead of three.
4347 This should fix alignment issue but subpool allocations are now
4348 unusable. Alphabetize subprograms.
4349 * s-stposu.adb (Allocate_Any_Controlled): Use the offset rather than
4350 the size of the header when converting the beginning of the object to
4351 a FM_Node. Set the master's Finalize_Address attribute if not already
4352 set.
4353 (Deallocate_Any_Controlled): Use the offset rather than the size of the
4354 header when converting the beginning of the object to a FM_Node.
4355
43562011-08-29 Gary Dismukes <dismukes@adacore.com>
4357
4358 * exp_ch11.adb (Expand_N_Raise_Statement): Don't suppress expansion of
4359 reraise when compiling for CodePeer.
4360
43612011-08-29 Arnaud Charlet <charlet@adacore.com>
4362
4363 * a-iteint.ads, Makefile.rtl: Add missing compilation of a-iteint.ads,
4364 now needed by a-convec.adb. Fix warning.
4365
43662011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4367
4368 * exp_util.adb (Build_Allocate_Deallocate_Proc): Add a guard for the
4369 processing of TSS routine Finalize_Address when compiling in
4370 CodePeer_Mode.
4371
43722011-08-29 Thomas Quinot <quinot@adacore.com>
4373
4374 * a-strunb.ads, einfo.ads, g-comlin.ads, sem_ch6.adb,
4375 sem_warn.adb: Minor reformatting.
4376
43772011-08-29 Emmanuel Briot <briot@adacore.com>
4378
4379 * prj-conf.adb (Get_Config_Switches): Also collect the list of
4380 languages from aggregated projects.
4381
43822011-08-29 Yannick Moy <moy@adacore.com>
4383
4384 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Declarations_Or_Statements,
4385 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
4386 Traverse_Package_Declaration, Traverse_Subprogram_Body,
4387 Traverse_Compilation_Unit): Add a parameter Inside_Stubs so that bodies
4388 for stubs are traversed too when parameter is set
4389 (Traverse_All_Compilation_Units): Traverse without going inside stubs
4390 (Traverse_Declarations_Or_Statements): Do the special traversing for
4391 stubs when required.
4392 * sem_util.adb, sem_util.ads (Get_Body_From_Stub): New function to
4393 return subprogram or package body from stub.
4394 (Is_Subprogram_Stub_Without_Prior_Declaration): New function to detect
4395 stubs without prior subprogram decl.
4396
43972011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4398
4399 * gnat_ugn.texi: Fix typo.
4400
e9c9d122
HK
44012011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4402
4403 * s-stposu.adb (Allocate_Any_Controlled): Reimplement the mechanism
4404 which accounts for size vs alignment issues and calculates the size of
4405 the list header.
4406 (Deallocate_Any_Controlled): Ditto.
4407 (Nearest_Multiple_Rounded_Up): New routine.
4408
25ebc085
AC
44092011-08-29 Tristan Gingold <gingold@adacore.com>
4410
4411 * a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
4412 * a-exexda.adb (Set_Exception_C_Msg): Ditto.
4413 (Set_Exception_Msg): Ditto.
4414 * a-exexpr-gcc.adb (Setup_Current_Excep): Ditto. Do not set
4415 Private_Data.
4416 * a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
4417 Use Save_Occurrence instead of Save_Occurrence_No_Private.
4418 (Raise_With_Msg): Remove Cleanup_Flag.
4419 * a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
4420 Clean_Flag and Private_Data components.
4421
44222011-08-29 Yannick Moy <moy@adacore.com>
4423
4424 * freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
4425 in CodePeer mode.
4426 * sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
4427 of an explicitly declared type, so that the base types of the original
4428 type and this generated type are the same, and a "type" (not a subtype
4429 like previously).
4430 * errout.adb (Special_Msg_Delete): Do not issue messages "Size too
4431 small" in Alfa mode, like in CodePeer mode.
4432 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
4433 clauses in Alfa mode.
4434
44352011-08-29 Javier Miranda <miranda@adacore.com>
4436
4437 * exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
4438 function to the package spec.
4439 * sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
4440 internally generated bodies of null procedures locate the internally
4441 generated spec enforcing mode conformance.
4442 (Is_Interface_Conformant): Ensure that the controlling formal of the
4443 primitives match.
4444
44452011-08-29 Ed Schonberg <schonberg@adacore.com>
4446
4447 * sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
4448 reject the pragma if it appears to apply to a formal subprogram.
4449
44502011-08-29 Ed Schonberg <schonberg@adacore.com>
4451
4452 * exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
4453 inner expression, to prevent double evaluation.
4454
590549fb
AC
44552011-08-29 Tristan Gingold <gingold@adacore.com>
4456
4457 * a-exexpr.adb (Propagate_Exception): Remove all the parameters as
4458 they were unused.
4459 * a-exexpr-gcc.adb (Propagate_Exception): Ditto.
4460 * a-except-2005.adb (Propagate_Exception): Adjust spec.
4461 (Raise_Current_Excep): Adjust call.
4462 (Raise_From_Signal_Handler): Call now simply call Raise_Current_Excep.
4463
44642011-08-29 Thomas Quinot <quinot@adacore.com>
4465
4466 * exp_disp.adb: Minor reformatting.
4467
62380e66
TG
44682011-08-29 Tristan Gingold <gingold@adacore.com>
4469
4470 * a-exexpr.adb (Setup_Exception): Removed.
4471 * a-exexpr-gcc.adb (Setup_Exception): Removed.
4472 * a-except.adb (Exception_Propagation): Removed.
4473 * a-except-2005.adb (Setup_Exception): Removed.
4474 (Reraise): Remove call to Setup_Exception.
4475 (Reraise_Occurrence): Ditto.
4476 (Reraise_Occurrence_Always): Ditto.
4477 (Reraise_Occurrence_No_Defer): Ditto.
4478 (Transfer_Occurrence): Ditto.
4479 * a-exexda.adb (Set_Exception_C_Msg): Remove call to Setup_Exception.
4480 (Set_Exception_Msg): Ditto.
4481
c95aa61c
AC
44822011-08-29 Robert Dewar <dewar@adacore.com>
4483
4484 * a-convec.adb, exp_disp.adb: Minor reformatting.
4485
44862011-08-29 Tristan Gingold <gingold@adacore.com>
4487
4488 * a-exexpr-gcc.adb (GNAT_GCC_Exception_Access): Set to convention C.
4489
624e1688
AC
44902011-08-29 Gary Dismukes <dismukes@adacore.com>
4491
4492 * exp_ch3.adb (Build_Record_Init_Proc.Build_Init_Procedure): Set
4493 Exception_Handlers to No_List instead of Empty_List in the case where
4494 there are no handlers.
4495
44962011-08-29 Tristan Gingold <gingold@adacore.com>
4497
4498 * gcc-interface/gigi.h (enum standard_datatypes): Add
4499 ADT_reraise_zcx_decl
4500 (reraise_zcx_decl): New macro.
4501 * gcc-interface/trans.c (gnu_incoming_exc_ptr): New variable.
4502 (gigi): Set reraise_zcx_decl.
4503 (Exception_Handler_to_gnu_zcx): Save and restore gnu_incoming_exc_ptr.
4504 (gnat_to_gnu): Handle N_Raise_Statement.
4505
7134062a
AC
45062011-08-29 Robert Dewar <dewar@adacore.com>
4507
4508 * sem_ch6.adb, exp_ch3.adb, s-stposu.adb, a-undesu.ads,
4509 a-undesu.adb: Minor reformatting.
4510
45112011-08-29 Ed Schonberg <schonberg@adacore.com>
4512
4513 * exp_disp.adb (Check_Premature_Freezing): When building a dispatch
4514 table, accept an unfrozen untagged component if it is an actual for a
4515 formal incomplete type.
4516 * a-convec.ads, a-convec.adb: Instantiate Ada.Iterator_Interfaces to
4517 provide new iterator forms over vectors.
4518 Introduce type Iterator in package body to implement operations of
4519 Reversible_Iterator interface.
4520 * a-iteint.ads: Make package pure so it is usable with new container
4521 packages, that are categorized Remote_Types.
4522
ca5af305
AC
45232011-08-29 Robert Dewar <dewar@adacore.com>
4524
4525 * a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting.
4526
45272011-08-29 Bob Duff <duff@adacore.com>
4528
4529 * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case
4530 of <>, because this is the routine that checks for dimensionality
4531 errors (for example, for a two-dimensional array, (others => <>) should
4532 be (others => (others => <>)).
4533
45342011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4535
4536 * impunit.adb: Add new run-time units.
4537 * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb,
4538 s-stposu.ads, s-stposu.adb: Code clean up.
4539 Handle protected class-wide or task class-wide types
4540 Handle C/C++/CIL/Java types.
4541 * s-spsufi.adb, s-spsufi.ads: New files.
4542
5accd7b6
AC
45432011-08-29 Yannick Moy <moy@adacore.com>
4544
4545 * sem_ch13.adb (Analyze_Aspect_Specifications): Reject test-case on
4546 library-level subprogram.
4547 * sem_prag.adb (Check_Test_Case): Stricter rules for test-case
4548 placement.
4549 (Analyze_Pragma): Change name "Normal" for "Nominal" in test-case
4550 component.
4551 * snames.ads-tmpl: Change name "Normal" for "Nominal" in test-case
4552 component.
4553 * gnat_rm.texi: Update doc for Test_Case pragma.
4554
45552011-08-29 Tristan Gingold <gingold@adacore.com>
4556
4557 * a-exexpr-gcc.adb (Unwind_Exception): Remove default value, made it
4558 convention C.
4559 (GCC_Exception_Access): New type.
4560 (Unwind_DeleteException): New imported procedure
4561 (Foreign_Exception): Import it.
4562 (GNAT_GCC_Exception): Simply have the occurrence inside.
4563 (To_GCC_Exception): New function.
4564 (To_GNAT_GCC_Exception): New function.
4565 (GNAT_GCC_Exception_Cleanup): New procedure..
4566 (Propagate_GCC_Exception): New procedure.
4567 (Reraise_GCC_Exception): New procedure.
4568 (Setup_Current_Excep): New procedure.
4569 (CleanupUnwind_Handler): Change type of UW_Exception parameter.
4570 (Unwind_RaiseException): Ditto.
4571 (Unwind_ForcedUnwind): Ditto.
4572 (Remove): Removed.
4573 (Begin_Handler): Change type of parameter.
4574 (End_Handler): Ditto. Now delete the exception if still present.
4575 (Setup_Key): Removed.
4576 (Is_Setup_And_Not_Propagated): Removed.
4577 (Set_Setup_And_Not_Propagated): Ditto.
4578 (Clear_Setup_And_Not_Propagated): Ditto.
4579 (Save_Occurrence_And_Private): Ditto.
4580 (EID_For): Add 'not null' constraint on parameter.
4581 (Setup_Exception): Does nothing.
4582 (Propagate_Exception): Simplified.
4583 * exp_ch11.adb (Expand_N_Raise_Statement): In back-end exception model,
4584 re-raise is not expanded anymore.
4585 * s-except.ads (Foreign_Exception): New exception - placeholder for
4586 non Ada exceptions.
4587 * raise-gcc.c (__gnat_setup_current_excep): Declare
4588 (CXX_EXCEPTION_CLASS): Define (not yet used)
4589 (GNAT_EXCEPTION_CLASS): Define.
4590 (is_handled_by): Handle foreign exceptions.
4591 (PERSONALITY_FUNCTION): Call __gnat_setup_current_excep.
4592
45932011-08-29 Jose Ruiz <ruiz@adacore.com>
4594
4595 * a-synbar.adb (Synchronous_Barrier): Some additional clarification.
4596
2ef48385
AC
45972011-08-29 Thomas Quinot <quinot@adacore.com>
4598
4599 * a-synbar-posix.adb: Minor reformatting.
4600
46012011-08-29 Jose Ruiz <ruiz@adacore.com>
4602
4603 * a-exetim-posix.adb, a-exetim-mingw.adb, a-exetim-mingw.ads,
4604 a-exetim-default.ads (Interrupt_Clocks_Supported,
4605 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4606 definitions to be compliant with AI-0171. The target systems do not
4607 support separate account for the execution time of interrupt handlers.
4608
46092011-08-29 Jose Ruiz <ruiz@adacore.com>
4610
4611 * a-synbar.adb (Wait): Change the order of evaluation of the conditions
4612 in the barrier to put first the easiest to evaluate (and the one which
4613 will be True more often). More efficient.
4614
46152011-08-29 Eric Botcazou <ebotcazou@adacore.com>
4616
4617 * s-atocou-x86.adb: Fix constraint in machine code insertion.
4618
46192011-08-29 Bob Duff <duff@adacore.com>
4620
4621 * aspects.ads, aspects.adb: Add new aspects for various pragmas and
4622 attributes that are now aspects, as specified by AI05-0229-1.
4623 * sem_ch13.adb (Analyze_Aspect_Specifications,
4624 Check_Aspect_At_Freeze_Point): Analyze the new aspects. Turn them into
4625 pragmas or attribute references, as appropriate.
4626
0db16b1e
AC
46272011-08-29 Robert Dewar <dewar@adacore.com>
4628
4629 * a-synbar.ads, a-synbar.adb, a-synbar-posix.adb,
4630 a-synbar-posix.ads: Minor reformatting.
4631
46322011-08-29 Yannick Moy <moy@adacore.com>
4633
4634 * snames.ads-tmpl: Add name Force.
4635
978ffe02
AC
46362011-08-29 Pascal Obry <obry@adacore.com>
4637
4638 * prj-nmsc.adb: Minor reformatting.
4639
46402011-08-29 Jose Ruiz <ruiz@adacore.com>
4641
4642 * a-exetim.ads (Interrupt_Clocks_Supported,
4643 Separate_Interrupt_Clocks_Supported, Clock_For_Interrupts): Add these
4644 definitions to be compliant with AI-0171.
4645
46462011-08-29 Robert Dewar <dewar@adacore.com>
4647
4648 * a-ngelfu.adb: Add comments.
4649
718f39dc
AC
46502011-08-29 Geert Bosch <bosch@adacore.com>
4651
4652 * a-ngelfu.adb (Tan): Do not raise Constraint_Error if the argument is
4653 the closest machine number to Pi / 2.0.
4654
46552011-08-29 Jose Ruiz <ruiz@adacore.com>
4656
4657 * impunit.adb (Non_Imp_File_Names_12): Add a-synbar for new Ada 2012
4658 package Ada.Synchronous_Barriers.
4659 * a-synbar.ads, a-synbar.adb, a-synbar-posix.ads, a-synbar-posix.adb:
4660 Add new specs and bodies for Ada.Synchronous_Barriers. There is a
4661 default implementation using protected objects and another one
4662 a-synbar-posix using POSIX barriers as the underlying support.
4663 * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for Linux (x86,
4664 x86_64, ia64) and MIPS IRIX): Use the a-synbar-posix implementation of
4665 Ada.Synchronous_Barriers which uses POSIX barriers (more efficient).
4666 Clean up dependencies.
4667 * Makefile.rtl (GNATRTL_TASKING_OBJS): Add a-synbar.o
4668
ee2e3f6b
AC
46692011-08-29 Robert Dewar <dewar@adacore.com>
4670
4671 * sem_ch7.adb, make.adb, sem_res.adb, exp_intr.adb,
4672 exp_dist.adb: Minor code reorganization.
4673 Minor reformatting.
4674
46752011-08-29 Thomas Quinot <quinot@adacore.com>
4676
4677 * sem_cat.adb (Validate_RACW_Primitive): The return type of an RACW
4678 primitive operation must support external streaming if it is not a
4679 controlling access result.
4680
646e2823
AC
46812011-08-29 Thomas Quinot <quinot@adacore.com>
4682
4683 * sinfo.ads, sem_ch7.adb: Minor reformatting.
4684
46852011-08-29 Bob Duff <duff@adacore.com>
4686
4687 * sem_ch4.adb (Analyze_Allocator): Check No_Nested_Finalization
4688 restriction on allocators, as required by AI05-0013-1.
4689 * restrict.ads: Minor comment fix.
4690
5d59eef2
AC
46912011-08-29 Tristan Gingold <gingold@adacore.com>
4692
4693 * a-exexpr.adb, a-except-2005.ads (Jmpbuf_Address): Move to a-exexpr.adb
4694 (To_Jmpbuf_Address): Ditto
4695 (builtin_longjmp): Ditto
4696
46972011-08-29 Thomas Quinot <quinot@adacore.com>
4698
4699 * sem_res.adb: Minor reformatting.
4700
47012011-08-29 Vincent Celier <celier@adacore.com>
4702
4703 * make.adb (Gnatmake): Move special processing for VM targets after the
4704 call to Get_Target_Parameters.
4705
47062011-08-29 Thomas Quinot <quinot@adacore.com>
4707
4708 * sem_ch12.adb, par-ch12.adb: Minor reformatting.
4709
949a18cc
AC
47102011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4711
4712 * sem_res.adb (Resolve_Allocator): Implement Ada2012-B052. Detect cases
4713 where an anonymous access discriminant of a limited designated type
4714 appears in a non-immutably limited discriminated type and issue an
4715 error message. Add local variable Desig_T and replace all occurrences
4716 of Designated_Type.
4717
47182011-08-29 Jose Ruiz <ruiz@adacore.com>
4719
4720 * a-rttiev.adb (Set_Handler): Update comment to indicate that our
4721 implementation is compliant to RM D.15(15/2) after the modification
4722 imposed by AI05-0094-1 (binding interpretation).
4723
cb25faf8
AC
47242011-08-29 Robert Dewar <dewar@adacore.com>
4725
4726 * exp_ch9.adb, s-tasren.adb, exp_sel.adb, exp_sel.ads, exp_ch11.adb,
4727 s-interr-hwint.adb, s-tpobop.adb, sem_ch13.adb: Minor reformatting.
4728
47292011-08-29 Thomas Quinot <quinot@adacore.com>
4730
4731 * par-endh.adb (Check_End): For an END where it is mandatory to repeat
4732 the scope name, do not report a missing label as a style violation (it
4733 will be diagnosed as an illegality).
4734 * exp_dist.adb (Add_Params_For_Variant_Components): Fix handling of
4735 variant records: Get_Enum_Lit_From_Pos already returns a usage
4736 occurrence of the literal, no need to use New_Occurrence_Of. Set Etype
4737 on Expr in Integer_Literal case so that it can be used by
4738 Build_To_Any_Call.
4739
1d10f669
AC
47402011-08-29 Tristan Gingold <gingold@adacore.com>
4741
4742 * exp_sel.ads (Build_Abort_BLock_Handler): New function spec.
4743 Adjust comment.
4744 * exp_sel.adb (Build_Abort_Block): Use Build_Abort_Block_Handler.
4745 (Build_Abort_Block_Handler): New function to build an Abort_Signal
4746 exception handler.
4747 * exp_ch9.adb (Expand_N_Asynchronous_Select): Call
4748 Build_Abort_Block_Handler to build the exception handler. Do not
4749 undefer aborts for the Abort_Signal exception handler if back-end
4750 exception mechanism.
4751 * exp_ch11.adb (Expand_Exception_Handlers): Do not undefer aborts if
4752 back_end exceptions for all others and abort_signal.
4753 * s-except.ads (ZCX_By_Default): New constant.
4754 * a-except-2005.adb (Raise_Exception): Do not defer abort if ZCX.
4755 (Raise_Exception_Always): Ditto.
4756 (Raise_From_Signal_Handler): Ditto.
4757 (Raise_With_Location_And_Msg): Ditto.
4758 (Raise_With_Msg): Ditto.
4759 (Reraise): Ditto.
4760 (Reraise_Occurence): Ditto.
4761 (Reraise_Occurrence_Always): Ditto.
4762 * s-tasren.adb (Exceptional_Complete_Rendezvous): Defer aborts if ZCX.
4763 * s-tpobop.adb: (Exceptional_Complete_Body): Undefer abort if ZCX.
1d10f669
AC
4764
47652011-08-29 Thomas Quinot <quinot@adacore.com>
4766
4767 * sem_util.ads (Get_Enum_Lit_From_Pos): Clarify documentation.
4768
d986066d
AC
47692011-08-29 Robert Dewar <dewar@adacore.com>
4770
4771 * snames.adb-tmpl, sem_ch13.adb: Minor reformatting
4772 Minor code reorganization.
4773
47742011-08-29 Bob Duff <duff@adacore.com>
4775
4776 * usage.adb (-gnatwy): Fix documentation: this switch applies to Ada
4777 2012, not just Ada 2005.
4778
47792011-08-29 Vincent Celier <celier@adacore.com>
4780
4781 * gnat_ugn.texi: Indicate that when the compiler is called by gnatmake
4782 with a project file or with gprbuid, if -gnatep= is specified, the
4783 builder may need to be invoked with -x.
4784
47852011-08-29 Tristan Gingold <gingold@adacore.com>
4786
4787 * a-exexpr-gcc.adb: Minor comment fix.
4788
ff4f0ed0
AC
47892011-08-29 Robert Dewar <dewar@adacore.com>
4790
4791 * sem_ch8.adb: Minor reformatting.
4792
47932011-08-29 Bob Duff <duff@adacore.com>
4794
4795 * par-ch2.adb (P_Identifier): Warn that "some" is reserved in Ada 2012.
4796 * par-ch4.adb (P_Quantified_Expression): Remove unnecessary code for
4797 treating "some" as unreserved in earlier Ada versions. This is now
4798 handled in Snames.Is_Keyword_Name. Parse "for some" using Tok_Some,
4799 rather than Name_Some, since Tok_Some is now recognized as reserved.
4800 * scans.adb (Initialize_Ada_Keywords): Handle Tok_Some like any other
4801 reserved word.
4802 * scans.ads: Minor comment fixes.
4803 * snames.adb-tmpl (Is_Keyword_Name): Handle Ada 2012 reserved words as
4804 for other language versions.
4805 * scn.adb (Scan_Reserved_Identifier): Remove unnecessary code for
4806 treating "some" as unreserved in earlier Ada versions. This is now
4807 handled in Snames.Is_Keyword_Name.
4808 * par-ch3.adb (P_Defining_Identifier): Warn that "some" is reserved in
4809 Ada 2012.
4810 (P_Subtype_Mark_Resync): Remove unnecessary code for treating "some" as
4811 unreserved in earlier Ada versions. This is now handled in
4812 Snames.Is_Keyword_Name.
4813 * snames.ads-tmpl (Ada_2012_Reserved_Words): Handle Ada 2012 reserved
4814 words as for other language versions.
4815 * gnat_ugn.texi (-gnatwy): Fix documentation: this switch applies to
4816 Ada 2012, not just Ada 2005.
4817
d941cee6
AC
48182011-08-29 Ed Schonberg <schonberg@adacore.com>
4819
4820 * sem_ch13.adb: Additional semantic checks for aspects involved in
4821 iterators.
4822
48232011-08-29 Matthew Heaney <heaney@adacore.com>
4824
4825 * a-comutr.ads, a-comutr.adb, a-cimutr.ads, a-cimutr.adb,
4826 a-cbmutr.ads, a-cbmutr.adb (Find_In_Subtree): Remove superfluous
4827 Container parameter.
4828 (Ancestor_Find): ditto.
4829
b970af39
TQ
48302011-08-29 Thomas Quinot <quinot@adacore.com>
4831
4832 * par-endh.adb: Minor reformatting.
d941cee6 4833
92db5dee
AC
48342011-08-29 Tristan Gingold <gingold@adacore.com>
4835
4836 * a-exexpr-gcc.adb (Unwind_Action) Rewrite as an integer with constants.
4837 (GNAT_GCC_Exception): Remove N_Cleanups_To_Trigger component.
4838 (Adjust_N_CLeanups_For): Remove.
4839 (CleanupUnwind_Handler): Call Unhandled_Exception_Terminate when end of
4840 stack is reached.
4841 (Propgate_Exception): Adjust.
4842 * raise-gcc.c: Add a few static/const.
4843 (Adjust_N_Cleanups_For): Remove declaration.
4844 (PERSONALITY_FUNCTION): Remove code dealing with N_Cleanups_To_Trigger.
4845
48462011-08-29 Ed Schonberg <schonberg@adacore.com>
4847
4848 * sem_ch8.adb: Use type of function return when rewriting as object
4849 declaration.
4850
1378bf10
AC
48512011-08-29 Gary Dismukes <dismukes@adacore.com>
4852
4853 * sem_type.adb: Minor reformatting.
4854
48552011-08-29 Robert Dewar <dewar@adacore.com>
4856
4857 * makeutl.adb: Minor reformatting.
4858
48592011-08-29 Ed Schonberg <schonberg@adacore.com>
4860
4861 * sem_ch8.adb (Analyze_Object_Renaming): If the renamed object is a
4862 function call of a limited type, the expansion of the renaming is
4863 complicated by the presence of various temporaries and subtypes that
4864 capture constraints of the renamed object.
4865 Rewrite node as an object declaration, whose expansion is simpler.
4866 Given that the object is limited there is no copy involved and no
4867 performance hit.
4868
164e06c6
AC
48692011-08-29 Robert Dewar <dewar@adacore.com>
4870
4871 * exp_ch5.adb, sinfo.ads, make.adb, s-pooglo.adb, sem_ch12.adb,
4872 freeze.adb, sem_ch6.adb, par-ch12.adb: Minor reformatting.
4873
48742011-08-29 Tristan Gingold <gingold@adacore.com>
4875
4876 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
4877 system-tru64.ads, system-irix-n32.ads, system-vxworks-arm.ads,
4878 system-linux-hppa.ads, system-linux-s390.ads,
4879 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
4880 system-vms_64.ads, system-vxworks-sparcv9.ads, system-linux-ppc.ads,
4881 system-aix64.ads, system-lynxos-ppc.ads, system-linux-sh4.ads,
4882 system-solaris-x86.ads, system-linux-x86_64.ads, system-linux-x86.ads,
4883 system-vxworks-ppc.ads, system-hpux.ads, system-darwin-ppc.ads,
4884 system-solaris-sparc.ads, system-lynxos-x86.ads,
4885 system-vxworks-m68k.ads, system-hpux-ia64.ads, system-irix-o32.ads,
4886 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
4887 system-vxworks-mips.ads, system-linux-sparc.ads, system-vms-ia64.ads,
4888 system-freebsd-x86.ads, system-aix.ads, system-darwin-x86_64.ads,
7d266442 4889 system-vxworks-x86.ads: Remove GCC_ZCX_Support.
164e06c6
AC
4890 * s-taprop-posix.adb, s-taprop-irix.adb, s-taprop-vxworks.adb,
4891 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-solaris.adb: Ditto.
4892 * opt.ads: Adjust comment.
4893 * targparm.ads, targparm.adb: Remove GCC_ZCX_Support_On_Target.
4894 * gnat1drv.adb: Do not check for GCC_ZCX_Support_On_Target.
4895 * system.ads: Move GCC_ZCX_Support to obsolete entries.
4896
48972011-08-29 Emmanuel Briot <briot@adacore.com>
4898
4899 * makeutl.adb (Do_Complete): Resolve symbolic links when a relative
4900 file name is specified on the gnatmake or gprbuild command line, and
4901 before we search for that file in the project.
4902
49032011-08-29 Ed Schonberg <schonberg@adacore.com>
4904
4905 * sem_type.adb (Within_Instance): New predicate in Collect_Interps,
4906 used to determine whether a possible interpretation for an overloadable
4907 entity is declared within the current instantiation and should be
4908 included in the candidate set.
4909
49102011-08-29 Vasiliy Fofanov <fofanov@adacore.com>
4911
4912 * gnat_rm.texi, gnat_ugn.texi: Clean ups.
4913
97216ca8
ES
49142011-08-29 Ed Schonberg <schonberg@adacore.com>
4915
4916 * sem_res.adb (Resolve_Actuals): Use base type to determine whether an
4917 access subtype is access_to_subprogram, when applying checks for
4918 RM 3.10.2 (27).
4919
d3cb4cc0
AC
49202011-08-29 Matthew Heaney <heaney@adacore.com>
4921
4922 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Splice_Subtree): Only check
4923 for sibling when common parent.
4924
49252011-08-29 Thomas Quinot <quinot@adacore.com>
4926
4927 * get_scos.adb: Literals of Pragma_Id are pragma names prefixed with
4928 "pragma_".
4929
49302011-08-29 Ed Schonberg <schonberg@adacore.com>
4931
4932 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Enable freeze actions
4933 for the return type when in ASIS mode.
4934
49352011-08-29 Vincent Celier <celier@adacore.com>
4936
4937 * make.adb (Gnatmake): Get the default search dirs, then the target
4938 parameters after getting the Builder switches, as the Builder switches
4939 may include --RTS= and that could change the default search dirs.
4940
49412011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4942
4943 * exp_ch7.adb (Make_Adjust_Call): Rewrite to mimic the structure of
4944 Make_Final_Call. Move the processing for class-wide types before the
4945 processing for derivations from [Limited_]Controlled.
4946 (Make_Final_Call): Move the processing for class-wide types before the
4947 processing for derivations from [Limited_]Controlled.
4948 * s-stposu.adb (Allocate_Any_Controlled): Correct the membership check.
4949 Add code to account for alignments larger than the list header. Add a
4950 comment illustrating the structure of the allocated object + padding +
4951 header.
4952 (Deallocate_Any_Controlled): Add code to account for alignments larger
4953 than the list header.
4954
49552011-08-29 Ed Schonberg <schonberg@adacore.com>
4956
4957 * sinfo.ads, sinfo.adb: New node kind
4958 N_Formal_Incomplete_Type_Definition, related flags.
4959 par-ch12.adb (P_Formal_Type_Declaration, G_Formal_Type_Definition):
4960 Parse formal incomplete types.
4961 * sem.adb (Analyze): Formal_Incomplete_Type_Definitions are handled in
4962 sem_ch12.
4963 * sem_ch7.adb (Analyze_Package_Specification, Unit_Requires_Body):
4964 Formal incomplete types do not need completion.
4965 * sem_ch12.adb (Analyze_Formal_Incomplete_Type,
4966 Validate_Incomplete_Type_Instance): New procedures to handle formal
4967 incomplete types.
4968 * freeze.adb (Freeze_Entity): Do not freeze the subtype of an actual
4969 that corresponds to a formal incomplete type.
4970 * sprint.adb: Handle formal incomplete type declarations.
4971 * exp_util.adb (Insert_Actions): An incomplete_type_definition is not
4972 an insertion point.
4973
d3f70b35
AC
49742011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
4975
4976 * a-fihema.ads, a-fihema.adb: Unit removed.
4977 * a-undesu.ads, a-undesu.adb: New unit implementing
4978 Ada.Unchecked_Deallocate_Subpool.
4979 * einfo.adb: Remove Associated_Collection from the node usage.
4980 Add Finalization_Master to the node usage.
4981 (Associated_Collection): Removed.
4982 (Finalization_Master): New routine.
4983 (Set_Associated_Collection): Removed.
4984 (Set_Finalization_Master): New routine.
4985 (Write_Field23_Name): Remove Associated_Collection from the output. Add
4986 Finalization_Master to the output.
4987 * einfo.ads: Remove attribute Associated_Collection and its uses in
4988 entities.
4989 Add new attribute Finalization_Master along with its uses in entitites.
4990 (Associated_Collection): Removed along with its pragma import.
4991 (Finalization_Master): New routine along with a pragma import.
4992 (Set_Associated_Collection): Removed along with its pragma import.
4993 (Set_Finalization_Master): New routine along with a pragma import.
4994 * exp_ch3.adb (Expand_Freeze_Array_Type): Replace call to
4995 Build_Finalization_Collection with Build_Finalization_Master.
4996 (Expand_Freeze_Record_Type): Move the generation of Finalize_Address
4997 before the bodies of the predefined routines. Add comment explaining
4998 this. Replace call to Build_Finalization_Collection with
4999 Build_Finalization_Master.
5000 (Freeze_Type): Replace call to Build_Finalization_Collection with
5001 Build_Finalization_Master.
5002 (Make_Finalize_Address_Body): Comment reformatting.
5003 (Make_Predefined_Primitive_Specs): Code reformatting.
5004 (Stream_Operation_OK): Update comment mentioning finalization
5005 collections. Replace RE_Finalization_Collection with
5006 RE_Finalization_Master.
5007 * exp_ch4.adb (Complete_Controlled_Allocation): Replace call to
5008 Associated_Collection with Finalization_Master. Replace call to
5009 Build_Finalization_Collection with Build_Finalization_Master.
5010 (Expand_Allocator_Expression): Replace call to Associated_Collection
5011 with Finalization_Master. Replace call to Set_Associated_Collection with
5012 Set_Finalization_Master. Remove the generation of
5013 Set_Finalize_Address_Ptr.
5014 (Expand_N_Allocator): Replace call to Associated_Collection with
5015 Finalization_Master. Remove the generation of Set_Finalize_Address_Ptr.
5016 * exp_ch6.adb (Add_Collection_Actual_To_Build_In_Place_Call): Renamed to
5017 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Update the
5018 comment on usage. Replace call to Needs_BIP_Collection with
5019 Needs_BIP_Finalization_Master Remplace BIP_Collection with
5020 BIP_Finalization_Master. Update all comments which mention finalization
5021 collections. Replace Associated_Collection with
5022 Finalization_Master. Replace Build_Finalization_Collection with
5023 Build_Finalization_Master.
5024 (BIP_Formal_Suffix): Update BIP_Collection's case.
5025 (Build_Heap_Allocator): Update the related comment. Rename local
5026 variable Collect to Fin_Mas_Id and update its occurrences. Update
5027 comments which mention finalization collections. Replace
5028 Set_Associated_Collection with Set_Finalization_Master.
5029 (Expand_Call): Update the code which detects a special piece of library
5030 code for .NET/JVM.
5031 (Make_Build_In_Place_Call_In_Allocator): Replace the call to
5032 Add_Collection_Actual_To_Build_In_Place_Call with
5033 Add_Finalization_Master_Actual_To_Build_In_Place_Call. Remove the code
5034 which generates a call to Make_Set_Finalize_Address_Ptr_Call.
5035 (Make_Build_In_Place_Call_In_Anonymous_Context): Replace call to
5036 Add_Collection_Actual_To_Build_In_Place_Call with
5037 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5038 (Make_Build_In_Place_Call_In_Assignment): Replace call to
5039 Add_Collection_Actual_To_Build_In_Place_Call with
5040 Add_Finalization_Master_Actual_To_Build_In_Place_Call.
5041 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5042 * exp_ch6.ads: Rename BIP_Collection to BIP_Finalization_Master.
5043 (Needs_BIP_Collection): Renamed to Needs_BIP_Finalization_Master.
5044 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Update comment on usage.
5045 Rename local variable Collect to Fin_Mas_Id and update its occurrences.
5046 Replace call to Set_Associated_Collection with Set_Finalization_Master.
5047 (Build_Finalization_Collection): Renamed to Build_Finalization_Master.
5048 Replace the call to Associated_Collection with Finalization_Master.
5049 Rename local variable Coll_Id to Fin_Mas_Id and update its occurrences.
5050 Update the way finalization master names are generated. Update the
5051 retrieval of the correct access type which will carry the pool and
5052 master attributes.
5053 (Make_Final_Call): Reimplement the way [Deep_]Finalize is retrieved.
5054 (Make_Finalize_Address_Body): Abstract types do not need
5055 Finalize_Address. Code reformatting.
5056 (Make_Finalize_Address_Stmts): Update comment on usage.
5057 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5058 (Process_Declarations): Update comments.
5059 * exp_ch7.ads (Build_Finalization_Collection): Renamed to
5060 Build_Finalization_Master. Update associated comment.
5061 (Make_Set_Finalize_Address_Ptr_Call): Removed.
5062 * exp_ch13.adb: Update comments which mention finalization collections.
5063 (Expand_N_Free_Statement): Replace the call to Associated_Collection
5064 with Finalization_Master.
5065 * exp_util.adb (Build_Allocate_Deallocate_Proc): Reimplemented to
5066 create calls to routines Allocate_Any_Controlled and
5067 Deallocate_Any_Controlled.
5068 (Find_Finalize_Address): New routine.
5069 (Is_Allocate_Deallocate_Proc): Update the RTE entities used in the
5070 comparison.
5071 (Requires_Cleanup_Actions): Update the comment on freeze node
5072 inspection.
5073 * exp_util.ads: Remove comment on generated code for
5074 Build_Allocate_Deallocate_Proc. The code is now quite complex and it
5075 is better to simply look in the body.
5076 * freeze.adb (Freeze_All): Update the comment of finalization
5077 collections. Replace the call to Associated_Collection with
5078 Finalization_Master. Replace the call to Build_Finalization_Collection
5079 with Build_Finalization_Master.
5080 * impunit.adb: Add a-undesu and s-stposu to the list of units.
5081 * Makefile.rtl: Add files a-undesu, s-finmas and s-stposu. Remove file
5082 a-fihema.
5083 * rtsfind.adb (Get_Unit_Name): Remove the processing for children of
5084 Ada.Finalization. Add processing for children of System.Storage_Pools.
5085 * rtsfind.ads: Remove the naming of second level children of
5086 Ada.Finalization.
5087 Remove Ada_Finalization_Heap_Management from the list of units.
5088 Remove subtype Ada_Finalization_Child.
5089 Remove the following subprogram entities:
5090
5091 RE_Allocate
5092 RE_Deallocate
5093 RE_Finalization_Collection
5094 RE_Finalization_Collection_Ptr
5095 RE_Set_Finalize_Address_Ptr
5096
5097 Add the naming of second level children of System.Storage_Pools.
5098 Add System_Finalization_Masters and System_Storage_Pools_Subpools to
5099 the list of units.
5100 Add subtype System_Storage_Pools_Child.
5101 Add the following subprogram entities to System.Finalization_Masters:
5102
5103 RE_Finalization_Master
5104 RE_Finalization_Master_Ptr
5105
5106 Add the following subprogram entities to System.Storage_Pools.Subpools:
5107
5108 RE_Allocate_Any_Controlled
5109 RE_Deallocate_Any_Controlled
5110 RE_Root_Storage_Pool_With_Subpools
5111 RE_Root_Subpool
5112 RE_Subpool_Handle
5113
5114 Move the following subprogram entities from
5115 Ada.Finalization.Heap_Management to System.Finalization_Masters:
5116
5117 RE_Add_Offset_To_Address
5118 RE_Attach
5119 RE_Base_Pool
5120 RE_Detach
5121
5122 * sem_ch3.adb (Access_Type_Declaration): Replace the call to
5123 Set_Associated_Collection with Set_Finalization_Master.
5124 * sem_ch6.adb (Create_Extra_Formals): Update the way extra formal
5125 BIP_Finalization_Master is created.
5126 * s-finmas.adb: New unit System.Finalization_Masters.
5127 * s-finmas.ads: New unit System.Finalization_Masters.
5128 * s-stopoo.ads, s-stopoo.adb: Minor code reformatting.
5129 * s-stposu.ads, s-stposu.adb: New unit implementing
5130 System.Storage_Pools.Subpools.
5131
51322011-08-29 Bob Duff <duff@adacore.com>
5133
5134 * tbuild.adb: Add assertion.
5135
8c889ae4
AC
51362011-08-29 Thomas Quinot <quinot@adacore.com>
5137
5138 * s-pooglo.adb: Minor reformatting.
5139
51402011-08-29 Ed Schonberg <schonberg@adacore.com>
5141
5142 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
5143 an indexed component of a packed array whose element type is a record
5144 with a representation clause different from that of the right-hand
5145 side, generate a temporary to minimuze the number of bit-field
5146 operations generated.
5147
51482011-08-29 Ed Schonberg <schonberg@adacore.com>
5149
5150 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
5151 declarations, and thus are likely insertion points for actions.
5152
51532011-08-29 Bob Duff <duff@adacore.com>
5154
5155 * einfo.ads: Minor comment fix.
5156
1a07a71a
AC
51572011-08-29 Robert Dewar <dewar@adacore.com>
5158
5159 * frontend.adb, gnat1drv.adb: Minor reformatting.
5160
51612011-08-29 Tristan Gingold <gingold@adacore.com>
5162
5163 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
5164 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
5165 space in front of the header.
5166
4bcd6411
JK
51672011-08-29 Johannes Kanig <kanig@adacore.com>
5168
5169 * frontend.adb (Frontend): Exit after creating Standard package when
5170 -gnatd.H is present.
5171 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
5172 present.
5173
f0f88eb6
RD
51742011-08-29 Robert Dewar <dewar@adacore.com>
5175
5176 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
5177 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
5178 snames.ads-tmpl: Minor reformatting.
5179
3e37be71
PG
51802011-08-29 Philippe Gil <gil@adacore.com>
5181
5182 * prj.adb (Reset_Units_In_Table): New procedure.
5183 Reset units to avoid access to freed memory.
5184
94fb7608
AC
51852011-08-29 Thomas Quinot <quinot@adacore.com>
5186
5187 * get_scos.adb: When reading a P statement SCO without a pragma name
5188 (from an older ALI file), ensure that the Pragma_Name component is set
5189 to Unknown_Pragma (not left uninitialized).
5190
51912011-08-29 Vincent Celier <celier@adacore.com>
5192
5193 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
5194 modified to compute correctly the object path of a SAL project that is
5195 extending another library project.
5196 (Write_Path_File): New procedure.
5197 * makeutl.ads (Directories): New table moved from Buildgpr
5198 (Get_Directories): New procedure moved from Buildgpr
5199 (Write_Path_File): New procedure
5200 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
5201 paths before binding SALs, instead of Set_Ada_Paths.
5202 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
5203 Prj.
5204 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
5205 (Current_Source_Path_File_Of): New function
5206 (Set_Current_Object_Path_File_Of): New procedure
5207 (Current_Source_Object_File_Of): New function
5208 (Set_Current_Object_Path_File_Of): New procedure
5209 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
5210 (Current_Source_Path_File_Of): New function
5211 (Set_Current_Object_Path_File_Of): New procedure
5212 (Current_Source_Object_File_Of): New function
5213 (Set_Current_Object_Path_File_Of): New procedure
5214
52152011-08-29 Ed Schonberg <schonberg@adacore.com>
5216
5217 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
5218 packed entity, use a bit-field assignment only if there is no change of
5219 representation.
5220
c5ecd6b7
AC
52212011-08-29 Thomas Quinot <quinot@adacore.com>
5222
5223 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
5224 Is_RTU instead of using Chars comparisons.
5225
52262011-08-29 Thomas Quinot <quinot@adacore.com>
5227
5228 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
5229 temporary object if the actual is constrained, and the discriminants
5230 read from the stream don't match.
5231
52322011-08-29 Tristan Gingold <gingold@adacore.com>
5233
5234 * sem_attr.adb, exp_attr.adb: Add handling of
5235 Attribute_System_Allocator_Alignment
5236 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
5237 Attribute_System_Allocator_Alignment.
5238 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
5239 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
5240 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
5241 get_target_system_allocator_alignment.
5242
52432011-08-29 Arnaud Charlet <charlet@adacore.com>
5244
5245 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
5246 dependencies.
5247
8abdac29
AC
52482011-08-29 Arnaud Charlet <charlet@adacore.com>
5249
5250 * exp_ch3.adb (In_Runtime): Fix typo.
5251
df170605
AC
52522011-08-29 Bob Duff <duff@adacore.com>
5253
5254 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
5255
52562011-08-29 Ed Schonberg <schonberg@adacore.com>
5257
5258 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
5259 and a separate tag assignment is generated, ensure that the tag
5260 assignment is analyzed.
5261
864a4236
ES
52622011-08-29 Ed Schonberg <schonberg@adacore.com>
5263
5264 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
5265 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
5266 of statement lists that may contain local declarations.
df170605
AC
5267 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
5268 duplicate the triggering statements needed for the expansion of this
5269 construct, when the trigger is a dispatching call to a synchronized
5270 primitive.
864a4236 5271
7f394c1d
AC
52722011-08-29 Arnaud Charlet <charlet@adacore.com>
5273
5274 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
5275 * bindgen.adb: Add comments.
5276 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
5277 in CodePeer mode.
5278
2c1a2cf3
RD
52792011-08-29 Robert Dewar <dewar@adacore.com>
5280
5281 * exp_attr.adb: Minor reformatting.
5282 Minor code reorganization and commenting.
5283 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
5284 reformatting.
5285
0bfc9a64
AC
52862011-08-29 Thomas Quinot <quinot@adacore.com>
5287
5288 * get_scos.adb: Ignore chaining indicators not currently supported
5289 by Ada.
5290
52912011-08-29 Arnaud Charlet <charlet@adacore.com>
5292
5293 * system.ads: Minor editing.
5294
52952011-08-29 Arnaud Charlet <charlet@adacore.com>
5296
5297 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
5298 CodePeer mode.
5299 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
5300 Attribute_Elab_Subp_Body.
5301 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
5302 * sem_util.adb: Update comments.
5303
828d4cf0
TQ
53042011-08-29 Thomas Quinot <quinot@adacore.com>
5305
5306 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
5307 pragma name for each SCO statement corresponding to a pragma.
5308
5cd7bb15
AC
53092011-08-29 Arnaud Charlet <charlet@adacore.com>
5310
5311 * opt.ads: Minor editing.
5312
53132011-08-29 Yannick Moy <moy@adacore.com>
5314
5315 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
5316 that only made sense for CodePeer mode.
5317
53182011-08-29 Jose Ruiz <ruiz@adacore.com>
5319
5320 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
5321 which is no longer used.
5322 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
5323 handling of the 64-bit division check.
5324 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
5325 division available.
5326 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
5327 longer used.
5328
53292011-08-29 Thomas Quinot <quinot@adacore.com>
5330
5331 * get_scos.adb: Minor reformatting.
5332
25b589cb
AC
53332011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5334
5335 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
5336 statement list is wrapped in a block, the block is explicitly analyzed
5337 in order to properly redecorate the entities and create a servicing
5338 finalizer.
5339
53402011-08-29 Tristan Gingold <gingold@adacore.com>
5341
5342 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
5343 (Set_Zero_Cost_Handling): Remove.
5344
53452011-08-29 Thomas Quinot <quinot@adacore.com>
5346
5347 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
5348
1197ddb1
AC
53492011-08-29 Geert Bosch <bosch@adacore.com>
5350
5351 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
5352 instruction, as the latter may produce -0.0, which is not a valid VAX
5353 F float number.
5354 (Neg_G): Likewise for VAX F float.
5355
53562011-08-29 Robert Dewar <dewar@adacore.com>
5357
5358 * exp_util.adb: Minor reformatting.
5359
53602011-08-29 Yannick Moy <moy@adacore.com>
5361
5362 * sem_ch3.adb: Minor comment update.
5363
53642011-08-29 Thomas Quinot <quinot@adacore.com>
5365
5366 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
5367 the operand type.
5368
53692011-08-29 Thomas Quinot <quinot@adacore.com>
5370
5371 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
5372 current statement sequence on a generic instantiation or a subprogram
5373 declaration.
5374
8f66cda7
AC
53752011-08-29 Robert Dewar <dewar@adacore.com>
5376
5377 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
5378 Minor reformatting.
5379
53802011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
5381
5382 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
5383 Correct the check which involves the freeze node of a controlled or
5384 access-to-controlled type.
5385
53862011-08-29 Geert Bosch <bosch@adacore.com>
5387
5388 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
5389 statements.
5390 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
5391 Asm statements.
5392
cf161d66
AC
53932011-08-29 Yannick Moy <moy@adacore.com>
5394
5395 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
5396 for every index type and component type that is not a subtype_mark.
5397 (Process_Subtype): Set Etype of subtype.
5398
53992011-08-29 Robert Dewar <dewar@adacore.com>
5400
5401 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
5402 reorganization. Minor reformatting.
5403
7cc83cd8
AC
54042011-08-29 Steve Baird <baird@adacore.com>
5405
5406 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
5407 for CodePeer and ALFA modes.
5408
54092011-08-29 Ed Schonberg <schonberg@adacore.com>
5410
5411 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
5412 that comes from an enclosing scope if it is not the renaming of an
5413 actual, to handle properly a spurious ambiguity in an instance.
5414
76af4137
AC
54152011-08-29 Eric Botcazou <ebotcazou@adacore.com>
5416
5417 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
5418 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
5419 use it instead of the Esize of the first parameter.
5420 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
5421 above change.
5422 <Size>: Likewise. Call it for composite types on the RM size.
5423
54242011-08-29 Yannick Moy <moy@adacore.com>
5425
5426 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
5427 * sem_util.adb (Unique_Name): Correct behaviour for names of
5428 compilation units.
5429
9b20e59b
AC
54302011-08-29 Yannick Moy <moy@adacore.com>
5431
5432 * sem_prag.adb (Check_Precondition_Postcondition): In formal
5433 verification mode, analyze pragma expression for correctness, for
5434 pre/post on library-level subprogram, as it is not expanded later.
5435
54362011-08-29 Yannick Moy <moy@adacore.com>
5437
5438 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
5439 in formal verification.
5440
54412011-08-29 Thomas Quinot <quinot@adacore.com>
5442
5443 * sem_util.adb: Minor reformatting.
5444 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
5445 there's no pragma.
5446 * par_sco.ads, par_sco.adb: Update comments.
5447
54482011-08-29 Yannick Moy <moy@adacore.com>
5449
5450 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
5451 associated getter/setter.
5452 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
5453
54542011-08-29 Vincent Celier <celier@adacore.com>
5455
5456 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
5457 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
5458 with declarations for Language_Kind and Dependency_Kind for Ada.
5459 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
5460 (Process_Compiler): Take into account the new attributes Dependency_Kind
5461 and Language_Kind.
5462 (Check_Configuration): Check if language kind is unit based, not if the
5463 language name is Ada.
5464 (Process_Exceptions_Unit_Based): Ditto
5465 (Add_Language): Remove default additions of language and dependency kind
5466 * prj.ads: Minor comment change
5467 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
5468
54692011-08-29 Johannes Kanig <kanig@adacore.com>
5470
5471 * debug.adb: Update comments.
5472
c5bc3df6
JM
54732011-08-24 Joseph Myers <joseph@codesourcery.com>
5474
5475 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
5476 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
5477 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
5478 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
5479 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
5480
e3aa9eba
RO
54812011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5482
5483 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
5484 (GNATLIBCFLAGS_FOR_C): Replace
5485 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
5486 (gnatlib-shared-default, gnatlib-shared-dual-win32)
5487 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
5488 (gnatlib-sjlj, gnatlib-zcx): Likewise.
5489
f446d60e
EB
54902011-08-07 Eric Botcazou <ebotcazou@adacore.com>
5491
5492 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
5493
588c8f48
EB
5494 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
5495
5496 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
5497
28d711bf
NR
54982011-08-05 Nicolas Roche <roche@adacore.com>
5499
5500 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
5501 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
5502 canadian cross.
5503 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
5504
993f8920
AC
55052011-08-05 Matthew Heaney <heaney@adacore.com>
5506
5507 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
5508 subprogram bodies declared out-of-order.
5509
55102011-08-05 Yannick Moy <moy@adacore.com>
5511
5512 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
5513 entities directly in package Standard, otherwise skip the standard
5514 prefix.
5515
9b3956dd
RD
55162011-08-05 Robert Dewar <dewar@adacore.com>
5517
5518 * a-cbmutr.adb: Minor reformatting
5519 (Allocate_Node): refactor node allocation algorithm
5520
55212011-08-05 Robert Dewar <dewar@adacore.com>
5522
5523 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
5524 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
5525 mode.
5526 (Analyze_Pragma, case Check_Policy): Ditto.
5527 * sem_prag.ads (Check_Disabled): New function
5528 * snames.ads-tmpl: Add Name_Disable.
5529
55302011-08-05 Robert Dewar <dewar@adacore.com>
5531
5532 * gnat_rm.texi: Document implementation-defined policy DISABLE for
5533 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
5534
79e705d6
AC
55352011-08-05 Ed Schonberg <schonberg@adacore.com>
5536
5537 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
5538 that appears in a generic formal part and applies to a formal
5539 subprogram.
5540
55412011-08-05 Robert Dewar <dewar@adacore.com>
5542
5543 * a-cbmutr.ads: Minor reformatting.
5544
23b6deca
AC
55452011-08-05 Matthew Heaney <heaney@adacore.com>
5546
5547 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
5548 to check count, check sign of value instead.
5549 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
5550 (Copy_Subtree): allocate copy of source element
5551 (Equal_Subtree): compare elements, not access objects
5552
55532011-08-05 Vincent Celier <celier@adacore.com>
5554
5555 * gnat_ugn.texi: Fix VMS alternative.
5556
a2773bd3
AC
55572011-08-05 Thomas Quinot <quinot@adacore.com>
5558
5559 * sem_ch11.adb: Add comment.
5560
55612011-08-05 Robert Dewar <dewar@adacore.com>
5562
5563 * exp_util.adb: Minor comment fix.
5564
55652011-08-05 Robert Dewar <dewar@adacore.com>
5566
5567 * scng.adb (Error_Unterminated_String): Improve flag position when
5568 comma present.
5569
55702011-08-05 Matthew Heaney <heaney@adacore.com>
5571
5572 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
5573 tree containers).
5574 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
5575 multiway tree containers.
5576
55772011-08-05 Robert Dewar <dewar@adacore.com>
5578
5579 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
5580 * stylesw.adb: Implement -gnatyC to control comment spacing
5581 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
5582 -gnatyc/C).
5583 * usage.adb: Add line for -gnatyC.
5584
55852011-08-05 Robert Dewar <dewar@adacore.com>
5586
f446d60e 5587 * gnat_ugn.texi: Document -gnatyC.
a2773bd3
AC
5588 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
5589 synonym for COMMENTS2).
5590
dedac3eb
RD
55912011-08-05 Robert Dewar <dewar@adacore.com>
5592
5593 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
5594 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
5595 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
5596 a-comutr.ads, lib-xref.adb: Minor reformatting.
5597
55982011-08-05 Robert Dewar <dewar@adacore.com>
5599
5600 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
5601 warning if there is an exception handler present.
5602
7c62a85a
AC
56032011-08-05 Pascal Obry <obry@adacore.com>
5604
5605 * a-iteint.ads: Fix copyright year.
5606
56072011-08-05 Thomas Quinot <quinot@adacore.com>
5608
5609 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
5610 statement SCO for a USE clause or a representation clause.
5611
56122011-08-05 Yannick Moy <moy@adacore.com>
5613
5614 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
5615 between body and spec for stub.
5616 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
5617 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
5618 pragma precondition or postcondition, for which the enclosing
5619 subprogram or package in the AST is not the desired one, return empty.
5620
e49208a9
AC
56212011-08-05 Thomas Quinot <quinot@adacore.com>
5622
5623 * g-expect.adb: Minor reformatting.
5624
56252011-08-05 Bob Duff <duff@adacore.com>
5626
5627 * a-fihema.adb: Comment out OS_Lib.
5628
56292011-08-05 Matthew Heaney <heaney@adacore.com>
5630
5631 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
5632 (unbounded multiway tree containers) and a-iteint.ads.
5633 * a-comutr.ads, a-comutr.adb:
5634 This is the new Ada 2012 unit for unbounded multiway tree containers
5635 * a-cimutr.ads, a-cimutr.adb
5636 This is the new Ada 2012 unit for indefinite multiway tree containers
5637 * a-iteint.ads: New file.
5638
201cdb74
RO
56392011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5640
f446d60e 5641 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
201cdb74 5642
d50f4827
AC
56432011-08-05 Bob Duff <duff@adacore.com>
5644
5645 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
5646 subpools.
5647 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
5648
56492011-08-05 Ed Schonberg <schonberg@adacore.com>
5650
5651 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
5652 general indexing aspects of Ada2012. Called when analyzing indexed
5653 components when other interpretations fail.
5654 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
5655 in an expression context where overloading is meaningful. This excludes
5656 the occurrence in an aspect specification (efficiency only).
5657 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
5658 related to iterators can be set by an attribute specification, but
5659 cannot be queried.
5660 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
5661 Constant_Indexing and Variable_Indexing.
5662 (Check_Indexing_Functions): New procedure to perform legality checks.
5663 Additional semantic checks at end of declarations.
5664
efe05dfc
AC
56652011-08-05 Sergey Rybin <rybin@adacore.com>
5666
5667 * tree_io.ads: Update ASIS_Version_Number because of the change of the
5668 order of calling Tree_Write/Tree_Read routines made for aspects.
5669
56702011-08-05 Bob Duff <duff@adacore.com>
5671
5672 * a-fihema.adb (Finalize): Fix race condition.
5673
5f9cdefe
AC
56742011-08-05 Yannick Moy <moy@adacore.com>
5675
5676 * sem_ch12.adb (Analyze_Package_Instantiation,
5677 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
5678 mode.
5679
56802011-08-05 Ed Schonberg <schonberg@adacore.com>
5681
5682 * sem_type.adb (Specific_Type): in an instance, the type-specific
5683 operand of an equality check that involves null may have a private
5684 type. Use full view to determine legality of construct.
5685
822868aa
AC
56862011-08-05 Vincent Celier <celier@adacore.com>
5687
5688 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5689 delete or close the file when the call to gnatmake was successful.
5690
56912011-08-05 Yannick Moy <moy@adacore.com>
5692
5693 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
5694 Global_Discard_Names.
5695
56962011-08-05 Ed Schonberg <schonberg@adacore.com>
5697
5698 * sinfo.ads: comments on use of entity field for aspect specifications.
5699
57002011-08-05 Ed Schonberg <schonberg@adacore.com>
5701
5702 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
5703 node is not itself an entity but a selected component, it is a
5704 rewritten parameterless call to an en enclosing synchronized operation,
5705 and this expansion will be performed again in the instance, so there is
5706 no global information to preserve.
5707
44a10091
AC
57082011-08-05 Javier Miranda <miranda@adacore.com>
5709
5710 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
5711 for renamings of predefined primitives.
5712 (In_Predef_Prims_DT): New subprogram.
5713
57142011-08-05 Ed Schonberg <schonberg@adacore.com>
5715
5716 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
5717 possible interpretation of name is a reference type, add an
5718 interpretation that is the designated type of the reference
5719 discriminant of that type.
5720 * sem_res.adb (resolve): If the interpretation imposed by context is an
5721 implicit dereference, rewrite the node as the deference of the
5722 reference discriminant.
5723 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
5724 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
5725 parent type or base type.
5726 * sem_ch4.adb (Process_Indexed_Component,
5727 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
5728 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
5729 Check for implicit dereference.
5730 (List_Operand_Interps): Indicate when an implicit dereference is
5731 ambiguous.
5732 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
5733
57342011-08-05 Thomas Quinot <quinot@adacore.com>
5735
5736 * scos.ads: Update documentation of SCO table. Pragma statements can now
5737 be marked as disabled (using 'p' instead of 'P' as the statement kind).
5738 * par_sco.ads, par_sco.adb: Implement the above change.
5739 (Process_Decisions_Defer): Generate a P decision for the first parameter
5740 of a dyadic pragma Debug.
5741 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
5742 necessary.
5743 * put_scos.adb: Code simplification based on above change.
5744
bb3c784c
AC
57452011-08-05 Robert Dewar <dewar@adacore.com>
5746
5747 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
5748 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
5749 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
5750 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
5751
57522011-08-05 Bob Duff <duff@adacore.com>
5753
5754 * a-stunau.ads, g-spipat.adb: Update comments.
5755
36f686f9
BD
57562011-08-05 Bob Duff <duff@adacore.com>
5757
5758 * a-fihema.ads: Minor comment fix.
5759 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
5760 correct.
5761 (Attach, Detach): Remove some unnecessary code.
5762 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
5763
7882673f
BD
57642011-08-05 Bob Duff <duff@adacore.com>
5765
5766 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
5767 allocation for Objects component. This simplifies the code somewhat. It
5768 is also a little more efficient in the not-so-unusual case where there
5769 are no controlled objects allocated.
5770 Make Finalization_Started flag atomic.
5771 (Finalize): Avoid unnecessary detachment of items from the list.
5772 (pcol): Minor cleanup.
5773
d34cd274
AC
57742011-08-05 Ed Schonberg <schonberg@adacore.com>
5775
5776 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
5777 package whose name is the same as that of the generic unit, or its
5778 ultimate prefix.
5779
57802011-08-05 Bob Duff <duff@adacore.com>
5781
5782 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
5783 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
5784 Minor comment fixes.
5785
00332244
AC
57862011-08-05 Arnaud Charlet <charlet@adacore.com>
5787
5788 * make.adb (Linking_Phase): No longer need to set source search path
5789 before calling gnatlink in CodePeer mode.
5790 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
5791 gcc in CodePeer mode, since the binder generated file no longer has a
5792 'with Main'.
5793 * switch.ads, switch.adb (Is_Language_Switch): Removed.
5794 * switch-c.adb: Update comment.
5795
57962011-08-05 Thomas Quinot <quinot@adacore.com>
5797
5798 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
5799
58002011-08-05 Nicolas Roche <roche@adacore.com>
5801
5802 * gnat_ugn.texi: Fix minor syntax error issue.
5803
58042011-08-05 Vincent Celier <celier@adacore.com>
5805
5806 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
5807 delete or close the file when the call to gnatmake returns a non
5808 successful return code.
5809
58102011-08-05 Ed Schonberg <schonberg@adacore.com>
5811
5812 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
5813 check, indicate that the copy of the original node does not come from
5814 source, to prevent an infinite recursion of the expansion.
5815
58162011-08-05 Johannes Kanig <kanig@adacore.com>
5817
5818 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
5819 VC generation for subprogram bodies.
5820
58212011-08-05 Yannick Moy <moy@adacore.com>
5822
5823 * einfo.ads: Typo.
5824 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
5825 the base type with the smallest allowed base type.
5826
58272011-08-05 Sergey Rybin <rybin@adacore.com>
5828
5829 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
5830 aspects.
5831
58322011-08-05 Ed Schonberg <schonberg@adacore.com>
5833
5834 * sem_ch12.ads: minor comment updates.
5835
58362011-08-05 Ed Schonberg <schonberg@adacore.com>
5837
5838 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
5839 instantiation and a formal package the compiler generates a package
5840 renaming declaration so that the generic name within the declaration
5841 is interpreted as a renaming of the instance. At the end of a formal
5842 package declaration, this renaming must become invisible.
5843
0da80d7d
AC
58442011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5845
5846 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
5847 comparison and rely on concrete entities instead.
5848
58492011-08-05 Ed Schonberg <schonberg@adacore.com>
5850
5851 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
5852 and discriminants, to indicate that the type has an access discriminant
5853 that supports implicit dereference.
5854 * snames.ads-tmpl: Add names of aspects and attributes related to
5855 Ada2012 iterators: constant_indexing, default_iterator,
5856 iterator_element, implicit_dereference, variable_indexing.
5857 * aspects.ads, aspects.adb: entries for iterator-related aspects.
5858 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
5859 iterator-related aspects.
5860 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
5861
58622011-08-05 Sergey Rybin <rybin@adacore.com>
5863
5864 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
5865 metrics in gnatmetric to cover new kinds of coupling mentrics.
5866
58672011-08-05 Steve Baird <baird@adacore.com>
5868
5869 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
2c7f9cc0 5870 of calling the user-defined main subprogram.
0da80d7d
AC
5871 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
5872 is set) Call_Main_Subprogram ahead of, as opposed to
5873 inside of, Main.
5874 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
5875 generation of a "with" of the user-defined main subprogram.
5876 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
5877 (which is now called from Gen_Main instead).
5878
73242473
AC
58792011-08-05 Emmanuel Briot <briot@adacore.com>
5880
5881 * projects.texi: Added reference to the Makefile package.
5882
58832011-08-05 Thomas Quinot <quinot@adacore.com>
5884
5885 * exp_ch7.adb: Minor comment rewording.
5886
58872011-08-05 Ed Falis <falis@adacore.com>
5888
5889 * env.c: Fix comment.
5890
58912011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5892
5893 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
5894 character comparison and rely on concrete entities instead.
5895
97ed5872
AC
58962011-08-05 Ed Schonberg <schonberg@adacore.com>
5897
5898 * sem_ch3.adb: (Check_Private_Overriding): better error message,
5899 suggested by AI95-0068.
5900
59012011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
5902
5903 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
5904 the two potential initialization calls. This accounts for any
5905 access-before-elaboration checks which may precede the initialization
5906 calls.
5907 (Next_Suitable_Statement): New routine. Returns the next real statement
5908 after the input node while skipping generated checks.
5909 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
5910 with comment on usage.
5911 Do not generate Elaborate_All when the trigger is a finalization call
5912 coming from a type init proc.
5913 (Check_Elab_Call): Propagate the initialization procedure context to
5914 subsequent calls to Check_A_Call.
5915 (Check_Internal_Call_Continue): Propagate the initialization procedure
5916 context to subsequent calls to Check_Elab_Call.
5917 (Is_Finalization_Procedure): New routine. Returns True if the input
5918 entity denotes a [Deep_]Finalize routine.
5919 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
5920 along with comment on usage.
5921
59222011-08-05 Vadim Godunko <godunko@adacore.com>
5923
5924 * s-atocou.ads: Add list of supported platforms.
5925
59262011-08-05 Yannick Moy <moy@adacore.com>
5927
5928 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
5929
5930 * opt.ads (Disable_ALI_File): new Boolean flag
5931 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
5932
59332011-08-05 Ed Falis <falis@adacore.com>
5934
5935 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
5936 environ is properly defined.
5937
59382011-08-05 Vincent Celier <celier@adacore.com>
5939
5940 * make.adb (Compilation_Phase): Exit immediately when all objects have
5941 been found up to date, to avoid multiple exit messages.
5942 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
5943 same project for languages with no compiler.
5944 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
5945 -eI.
9aff36e9
RD
59462011-08-05 Robert Dewar <dewar@adacore.com>
5947
5948 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
5949 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
5950 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
5951 s-atocou-builtin.adb: Minor reformatting.
5952
406935b6
AC
59532011-08-05 Yannick Moy <moy@adacore.com>
5954
5955 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
5956 if the node to wrap is a pragma check, this node and enclosed
5957 expression are not expanded, so do not apply any transformations here.
5958 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
5959 introducing transient scopes.
5960
59612011-08-05 Jose Ruiz <ruiz@adacore.com>
5962
5963 * adaint.c (__gnat_set_writable, __gnat_set_readable,
5964 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
5965 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
5966 routine is available, so we use the default implementation of these
5967 functions.
5968 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
5969 support for copying attributes on VxWorks 6.
5970
59712011-08-05 Yannick Moy <moy@adacore.com>
5972
5973 * debug.adb: Remove use of -gnatd.D.
5974 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
5975 * opt.ads: Simplify variables for ALFA mode, to keep one only
5976 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
5977 to ALFA mode.
5978
59792011-08-05 Vincent Celier <celier@adacore.com>
5980
5981 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
5982 Builder'Default_Switches.
5983
59842011-08-05 Vincent Celier <celier@adacore.com>
5985
5986 * makeusg.adb: Add lines for --create-map-file switches.
5987
59882011-08-05 Ed Schonberg <schonberg@adacore.com>
5989
5990 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
5991 profile is incomplete and the full view is available, replace it with
5992 the full view.
5993 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
5994 incomplete, freezing the subprogram is delayed until the full view is
5995 frozen.
5996 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
5997 fixed-point multiplication operator and the predefined operator is
5998 resolved in favor of the user-defined one.
5999
96c891b3
RO
60002011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6001
6002 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
6003 CONST_CAST.
6004
276e7ed0
AC
60052011-08-04 Ed Schonberg <schonberg@adacore.com>
6006
6007 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
6008 whether a type lacks user-defined Read or Write operations, or has a
6009 component that lacks them.
6010 * sem_attr.adb (Check_Stream_Attribute): if restriction
6011 No_Default_Stream_Attributes is active, verify that all subcomponent
6012 types of the target have user-defined stream operations, and report
6013 error otherwise.
6014 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
6015 * exp_strm.adb: Build_Elementary_Input_Call,
6016 Build_Elementary_Write_Call): remove checks for restriction
6017 No_Default_Stream_Attributes, now checked in semantics.
6018
60192011-08-04 Vincent Celier <celier@adacore.com>
6020
6021 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
6022 switches on the command line, look for all valid --RTS switches in the
6023 Builder switches and for each language use the first runtime name found
6024 to invoke gprconfig.
6025 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
6026 command line and there is no auto-configuration.
6027 (Runtime_Name_Set_For): New function.
6028
60292011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6030
6031 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
6032 elaborate initialization expression for variable Abort when processing
6033 a package body or a declaration.
6034 (Create_Finalizer): Propagate the package context when creating the
6035 exception-related variables.
6036 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
6037 For_Package along with usage comment.
6038
19172ae9
AC
60392011-08-04 Arnaud Charlet <charlet@adacore.com>
6040
6041 * gcc-interface/Makefile.in: Clean up targets.
6042 Enable new package for atomic counters and copy-on-write implementation
6043 of unbounded strings on x86 platforms.
6044 * gcc-interface/Make-lang.in: Update dependencies.
6045
0319cacc
AC
60462011-08-04 Robert Dewar <dewar@adacore.com>
6047
6048 * exp_ch7.adb: Minor reformatting.
6049
60502011-08-04 Robert Dewar <dewar@adacore.com>
6051
6052 * exp_strm.adb: Minor reformatting.
6053
60542011-08-04 Vadim Godunko <godunko@adacore.com>
6055
6056 * s-atocou.adb: Replace by dummy version and use on targets where atomic
6057 operations are not supported.
6058 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
6059 * s-atocou-x86.adb: New file.
6060 * Makefile.rtl: Add s-atocou.o file
6061
60622011-08-04 Arnaud Charlet <charlet@adacore.com>
6063
6064 * make.adb (Compile): Move setting of CodePeer_Mode to ...
6065 (Compilation_Phase): ... here.
6066 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
6067
60682011-08-04 Thomas Quinot <quinot@adacore.com>
6069
6070 * Make-generated.in: Fix minor typo in comment.
6071
26e7e1a0
AC
60722011-08-04 Thomas Quinot <quinot@adacore.com>
6073
6074 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
6075 the project path.
6076
60772011-08-04 Robert Dewar <dewar@adacore.com>
6078
6079 * a-coinho.adb: Minor reformatting.
6080
60812011-08-04 Robert Dewar <dewar@adacore.com>
6082
6083 * a-coinho.ads: Minor reformatting.
6084
60852011-08-04 Vadim Godunko <godunko@adacore.com>
6086
6087 * s-atocou.ads, s-atocou.adb: New files.
6088 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
6089 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
6090 direct use of GCC's atomic builtins and replace them by use of new
6091 atomic counter package.
6092
60932011-08-04 Ed Schonberg <schonberg@adacore.com>
6094
6095 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
6096
60972011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6098
6099 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
6100 with a call to Get_External_Tag.
6101 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
6102 subprogram usage. Remove the guard against package declarations and
6103 bodies since Build_Cleanup_Statements is no longer invoked in that
6104 context.
6105 (Build_Components): Initialize Tagged_Type_Stmts when the context
6106 contains at least one library-level tagged type.
6107 (Build_Finalizer): New local variables Has_Tagged_Types and
6108 Tagged_Type_Stmts along with associated comments on usage. Update the
6109 logic to include tagged type processing.
6110 (Create_Finalizer): Insert all library-level tagged type unregistration
6111 code before the jump block circuitry.
6112 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
6113 (Expand_N_Package_Declaration): Remove the call to
6114 Build_Cleanup_Statements.
6115 (Process_Tagged_Type_Declaration): New routine. Generate a call to
6116 unregister the external tag of a tagged type.
6117 (Processing_Actions): Reimplemented to handle tagged types.
6118 (Process_Declarations): Detect the declaration of a library-level
6119 tagged type and carry out the appropriate actions.
6120 (Unregister_Tagged_Types): Removed. The machinery has been directly
6121 merged with Build_Finalizer.
6122
7483c888
AC
61232011-08-04 Robert Dewar <dewar@adacore.com>
6124
6125 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
6126 gnatls.adb, exp_ch3.adb: Minor reformatting.
6127
61282011-08-04 Marc Sango <sango@adacore.com>
6129
6130 * sem_attr.adb (Analyze_Attribute): Replace the message
6131 "invisible attribute of}" of the spark restriction violation in
6132 attribute reference by the simple message "invisible attribute of type".
6133 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
6134 two insertion characters: '&' and '}'.
6135
61362011-08-04 Vadim Godunko <godunko@adacore.com>
6137
6138 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
6139 * a-coinho.ads, a-coinho.adb: New file.
6140 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
6141
5207696c
AC
61422011-08-04 Nicolas Roche <roche@adacore.com>
6143
6144 * alfa_test.adb: Not all ali files are containing alfa information even
6145 if compiled with -gnatd.F. So suppress warning about missing ALFA
6146 information.
6147
61482011-08-04 Yannick Moy <moy@adacore.com>
6149
6150 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
6151 scope.
6152 * put_alfa.adb: Check that scope name is not empty.
6153
61542011-08-04 Ed Schonberg <schonberg@adacore.com>
6155
6156 * exp_ch3.adb (Stream_Operation_Ok): new predicate
6157 Needs_Elementary_Stream_Operation, to determine whether user-defined
6158 Read and Write attributes are available for the elementary components
6159 of the given type. If only the predefined attributes are available,
6160 then when restriction No_Default_Stream_Attributes is active the
6161 predefined stream attributes for the composite type cannot be created.
6162
61632011-08-04 Robert Dewar <dewar@adacore.com>
6164
6165 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
6166 Put routines in alpha order
6167
2bd2d858
JR
61682011-08-04 Jose Ruiz <ruiz@adacore.com>
6169
6170 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
6171 * gcc-interface/Make-lang.in: Update dependencies.
6172
8fae6016
AC
61732011-08-04 Arnaud Charlet <charlet@adacore.com>
6174
6175 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
6176 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
6177 gnat1why).
6178
a54d0eb4
AC
61792011-08-04 Robert Dewar <dewar@adacore.com>
6180
6181 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
6182 lib-xref-alfa.adb: Minor reformatting.
6183
61842011-08-04 Marc Sango <sango@adacore.com>
6185
6186 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
6187 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
6188 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
6189 mode.
6190
61912011-08-04 Tristan Gingold <gingold@adacore.com>
6192
6193 * bindgen.adb (Gen_Adainit_C): Remove.
6194 (Gen_Adafinal_C): Ditto.
6195 (Gen_Elab_Externals_C): Ditto.
6196 (Gen_Elab_Calls_C): Ditto.
6197 (Gen_Elab_Order_C): Ditto.
6198 (Gen_Elab_Defs_C): Ditto.
6199 (Gen_Finalize_Library_C): Ditto.
6200 (Gen_Finalize_Library_Defs_C): Ditto.
6201 (Gen_Main_C): Ditto.
6202 (Gen_Output_File_C): Ditto.
6203 (Gen_Restrictions_C): Ditto.
6204 (Gen_Versions_C): Ditto.
6205 (Write_Info_Ada_C): Ditto.
6206 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
6207 (Gen_Output_File): Do not force Ada_Bind_File anymore.
6208 Always call Gen_Output_File_Ada.
6209 * gnatlink.adb (Begin_Info): Now a constant.
6210 (End_Info): Ditto.
6211 (Ada_Bind_File): Remove
6212 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
6213 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
6214 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
6215 * opt.ads (Ada_Bind_File): Remove.
6216
62172011-08-04 Thomas Quinot <quinot@adacore.com>
6218
6219 * projects.texi: Document target-specific directory in default project
6220 path for gnatmake.
6221
62222011-08-04 Thomas Quinot <quinot@adacore.com>
6223
6224 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
6225 path in all cases .
6226
24558db8
AC
62272011-08-04 Yannick Moy <moy@adacore.com>
6228
6229 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
6230 opt.ads, lib-xref.ads: Code clean up.
6231
62322011-08-04 Yannick Moy <moy@adacore.com>
6233
6234 * gnat_rm.texi: Update description of Test_Case
6235 * gnat_ugn.texi: Typo.
6236
62372011-08-04 Ed Falis <falis@adacore.com>
6238
6239 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
6240
62412011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6242
6243 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
6244 it is of type Root_Controlled. This action eliminates fields Prev and
6245 Next from type equality.
6246
62472011-08-04 Yannick Moy <moy@adacore.com>
6248
6249 * lib-xref-alfa.adb: Correct typo.
6250
62512011-08-04 Matthew Heaney <heaney@adacore.com>
6252
6253 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
6254 component.
6255
1f9939b5
AC
62562011-08-04 Yannick Moy <moy@adacore.com>
6257
6258 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
6259 (Analyze_Pragma): allow static string expression for name of Test_Case,
6260 instead of simply string literals.
6261 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
6262 expressions.
6263
62642011-08-04 Vincent Celier <celier@adacore.com>
6265
6266 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
6267 case suffixes to find truncated main sources.
6268
62692011-08-04 Tristan Gingold <gingold@adacore.com>
6270
6271 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
6272 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
6273 (Compute_Current_Task): Ditto.
6274
62752011-08-04 Tristan Gingold <gingold@adacore.com>
6276
6277 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
6278
62792011-08-04 Yannick Moy <moy@adacore.com>
6280
6281 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
6282 library-level constant.
6283 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
6284 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
6285 used as selector of parameter association, in ALFA mode.
6286
15d8a51d
AC
62872011-08-04 Robert Dewar <dewar@adacore.com>
6288
6289 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
6290 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
6291 reformatting.
6292
62932011-08-04 Arnaud Charlet <charlet@adacore.com>
6294
6295 * make.adb (Linking_Phase): Set source search path before calling
6296 gnatlink in CodePeer mode.
6297
f46faa08
AC
62982011-08-04 Javier Miranda <miranda@adacore.com>
6299
6300 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
6301 Remove code which takes care of building TSDs.
6302 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
6303 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
6304 the accessibility check in VM targets.
6305 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
6306 (Building_Static_DT): Now returns false for VM targets.
6307 (Build_VM_TSDs): Removed.
6308 (Expand_Interface_Conversion): Generate missing runtime check for
6309 conversions to interface types whose target type is unknown at compile
6310 time.
6311 (Make_VM_TSD): Add missing code to disable the generation of calls to
6312 Check_TSD if the tagged type is not defined at library level, or not
6313 has a representation clause specifying its external tag, or -gnatdQ is
6314 active.
6315 * exp_disp.ads (Build_VM_TSDs): Removed.
6316 (Make_VM_TSDs): Spec relocated from exp_disp.adb
6317 * sem_disp.adb (Check_Dispatching_Operation): No code required to
6318 register primitives in the dispatch tables in VM targets.
6319 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
6320 initialization of class-wide interface objects in VM targets.
6321 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
6322 of Make_DT).
6323
63242011-08-04 Jerome Lambourg <lambourg@adacore.com>
6325
6326 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
6327 when dotnet-ld cannot be found.
6328
63292011-08-04 Arnaud Charlet <charlet@adacore.com>
6330
6331 * bindgen.adb: Simplify significantly generation of binder body file in
6332 CodePeer mode.
6333 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
6334 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
6335 not expanded).
6336
2ba7e31e
AC
63372011-08-04 Yannick Moy <moy@adacore.com>
6338
6339 * sem_prag.adb, sem.ads: Code cleanup.
6340
63412011-08-04 Tristan Gingold <gingold@adacore.com>
6342
6343 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
6344 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
6345 results if possible.
6346 * s-stusta.adb (Print): Adjust after changes in s-stausa.
6347 * gnat_ugn.texi: Update dynamic stack usage section.
6348
63492011-08-04 Steve Baird <baird@adacore.com>
6350
6351 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
6352 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
6353 contains only a call to the user-defined main subprogram.
6354 (Gen_Main_Ada) - If CodePeer_Mode is set, then
6355 call the "wrapper" subprogram instead of directly
6356 calling the user-defined main subprogram.
6357
63582011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6359
6360 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
6361 alternatives of a case statement for controlled objects. Rename local
6362 variable A to Dead_Alt.
6363 (Expand_N_If_Statement): Check the then and else statements of an if
6364 statement for controlled objects. Check the then statements of all
6365 elsif parts of an if statement for controlled objects.
6366 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
6367 objects.
6368 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
6369 detects a loop associated with the expansion of an array object.
6370 Augment the processing of the loop statements to account for a possible
6371 wrap done by Process_Statements_For_Controlled_Objects.
6372 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
6373 statements and abortable part of an asynchronous select for controlled
6374 objects.
6375 (Expand_N_Conditional_Entry_Call): Check the else statements of a
6376 conditional entry call for controlled objects.
6377 (Expand_N_Selective_Accept): Check the alternatives of a selective
6378 accept for controlled objects.
6379 (Expand_N_Timed_Entry_Call): Check the entry call and delay
6380 alternatives of a timed entry call for controlled objects.
6381 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
6382 exception handler for controlled objects.
6383 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
6384 Add formal parameter Nested_Constructs along with its associated
6385 comment.
6386 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
6387 Requires_Cleanup_Actions.
6388 (Process_Statements_For_Controlled_Objects): New routine.
6389 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
6390 routine. Inspect a node which contains a non-handled sequence of
6391 statements for controlled objects. If such an object is found, the
6392 statements are wrapped in a block.
6393
1bf773bb
AC
63942011-08-04 Bob Duff <duff@adacore.com>
6395
6396 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
6397 need to compare with Class_Wide_Type (T2), in order to get at the
6398 original class-wide type node.
6399 * sem_type.ads (Covers): Improve the comment.
6400 * einfo.ads (Class_Wide_Type): Improve the comment.
6401 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
6402 the type of the Deref.
6403
64042011-08-04 Yannick Moy <moy@adacore.com>
6405
6406 * gnat_rm.texi: Document that Test_Case pragma can only appear on
6407 separate declarations.
6408 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
6409 check identifier of pragma argument.
6410 (Chain_TC): check that no other test case associated to the same entity
6411 share the same name.
6412 (Check_Test_Case): disallow test case inside subprogram body
6413 (Analyze_Pragma): correct call to check identifier and not argument
6414 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
6415 function gets name from test case pragma.
6416
dac3bede
YM
64172011-08-04 Yannick Moy <moy@adacore.com>
6418
6419 * gnat_rm.texi: Document new pragma and aspect.
6420 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
6421 (No_Duplicates_Allowed): new constant array defining whether duplicates
6422 aspects of each kind can appear on the same declaration.
6423 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
6424 field, which points to a node holding the previous Spec_PPC_List.
6425 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
6426 through the indirection with Contract.
6427 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
6428 * par-prag.adb (Prag): do nothing on Test_Case pragma
6429 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
6430 be called directly.
6431 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
6432 component Ensures of Test_Case.
6433 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
6434 (Analyze_Generic_Subprogram_Declaration,
6435 Analyze_Subprogram_Instantiation,
6436 Analyze_Abstract_Subprogram_Declaration,
6437 Analyze_Subprogram_Body_Helper,
6438 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
6439 insert contract in subprogram node at point of definition
6440 * sem_ch13.adb
6441 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
6442 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
6443 corresponding pragma
6444 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
6445 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
6446 similar to the analysis of pre/post
6447 (Derive_Subprogram): insert contract in subprogram node at point of
6448 derivation.
6449 * sem_prag.adb, sem_prag.ads
6450 (Check_Arg_Is_String_Literal, Check_Identifier):
6451 new checking procedures to be called in treatment of pragmas
6452 (Check_Test_Case): new procedure to check that a Test_Case aspect or
6453 pragma is well-formed. This does not check currently that 'Result is
6454 used only in the Ensures component of a Test_Case.
6455 (Analyze_Pragma): add case for Test_Case
6456 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
6457 components of a Test_Case.
6458 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
6459 expressions in the 3rd (and 4th if present) arguments of a Test_Case
6460 pragma, treated as spec expressions.
6461 (Sig_Flags): add value -1 for Test_Case.
6462 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
6463 Get_Requires_From_Test_Case_Pragma): getters for both expression
6464 components of a Test_Case.
6465 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
6466 indirection between an entry or [generic] subprogram entity and its
6467 pre/post + test-cases.
6468 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
6469 get/set for fields of an N_Contract node.
6470 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
6471 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
6472 names and pragma for Test_Case.
6473 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
6474
6a2e5d0f
AC
64752011-08-04 Vincent Celier <celier@adacore.com>
6476
6477 * gnat_ugn.texi: Improve documentation of gnatmake switch
6478 --source-info-file=.
6479
64802011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6481
6482 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
6483 type). Initialize Atyp to the appropriate type which is later checked
6484 for completion. Rewrite the assertion associated with private type
6485 completion.
6486
64872011-08-04 Ed Falis <falis@adacore.com>
6488
6489 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
6490 initialize the number of CPUs.
6491
64922011-08-04 Ed Schonberg <schonberg@adacore.com>
6493
6494 * sem_type.adb (Disambiguate): New subsidiary routine
6495 In_Same_Declaration_List, to implement AI05-0020: a user-defined
6496 equality on an anonymous access type whose designated type is private
6497 does not lead to an ambiguity with the universal access equality
6498 operator in the body or child units of the defining package. The same
6499 is true for a multiplication operator on a private type completed with
6500 a fixed-point-type.
6501
65022011-08-04 Javier Miranda <miranda@adacore.com>
6503
6504 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
6505 (Normalize_Scalars_Config): Removed.
6506 * opt.adb
6507 (Register_Opt_Config_Switches): Remove registering config values of
6508 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
6509 (Restore_Opt_Config_Switches): Remove code which restores the values of
6510 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6511 Init_Or_Norm_Scalars.
6512 (Save_Opt_Config_Switches): Remove code which saves values of
6513 Init_Or_Norm_Scalars and Normalize_Scalars.
6514 (Set_Opt_Config_Switches): Remove code which restores config values of
6515 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
6516 Init_Or_Norm_Scalars.
6517
65182011-08-04 Yannick Moy <moy@adacore.com>
6519
6520 * frontend.adb (Frontend): remove previous patch to avoid full
6521 qualification in ALFA mode.
6522 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
6523 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
6524 unique name for an entity, which could be used to identify the entity
6525 across compilation units.
6526
65272011-08-04 Thomas Quinot <quinot@adacore.com>
6528
6529 * prj-env.adb
6530 (Initialize_Default_Project_Path): Add target specific directory
6531 ($prefix/$target/lib/gnat) in front of project path in all cases
6532 (making gnatmake's behaviour consistent with gprbuild).
6533 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
6534 Pass target name from Sdefault to project subsystem.
6535 * gnatls.adb: Show new target specific default project directory.
6536
65372011-08-04 Johannes Kanig <kanig@adacore.com>
6538
6539 * cstand.adb: Add Information to Identifier in Standard
6540 (Identifer_For): Set Entity to the corresponding entity
6541
483361a6
AC
65422011-08-04 Sergey Rybin <rybin@adacore.com>
6543
6544 * gnat_ugn.texi: Update doc on gnatcheck.
6545
65462011-08-04 Yannick Moy <moy@adacore.com>
6547
6548 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
6549 xrefs in a scope.
6550
65512011-08-04 Yannick Moy <moy@adacore.com>
6552
6553 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
6554 performing expansion.
6555 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
6556 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
6557 it is not called in ALFA mode.
6558
ef5569c6
AC
65592011-08-04 Emmanuel Briot <briot@adacore.com>
6560
6561 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
6562 after all, so removed.
6563
65642011-08-04 Sergey Rybin <rybin@adacore.com>
6565
6566 * vms_data.ads: Add missing VMS qualifiers.
6567
1ab4a286
EB
65682011-08-04 Emmanuel Briot <briot@adacore.com>
6569
6570 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
6571 the list of files on the command line after processing it through
6572 Complete_Mains.
6573
7ae0d98c
AC
65742011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6575
6576 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
6577 processing for .NET/JVM. These targets can now benefit from
6578 Raise_From_Controlled_Operation and they share the same processing with
6579 standard targets.
6580 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
6581 These targets need transient scopes in order to properly finalize short
6582 lived controlled objects.
6583 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
6584 NET/JVM. These targets can now benefit from
6585 Raise_From_Controlled_Operation and they share the same processing with
6586 standard targets.
6587
65882011-08-04 Geert Bosch <bosch@adacore.com>
6589
6590 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
6591
65922011-08-04 Ed Schonberg <schonberg@adacore.com>
6593
6594 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
6595 Expand_Record_Aggregate, to determine whether aggregate must be
6596 expanded into assignments. This is the case if the ancestor part is
6597 private, regarless of the setting of the flag Has_Private_Ancestor.
6598
65992011-08-04 Ed Falis <falis@adacore.com>
6600
6601 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
6602
66032011-08-04 Bob Duff <duff@adacore.com>
6604
6605 * sinfo.ads: Fix comment.
6606
66072011-08-04 Steve Baird <baird@adacore.com>
6608
6609 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
6610 choose a package name in much the same way as is
6611 done for JGNAT when VM_Target /= No_VM, except that
6612 a slightly more distinctive prefix string is used.
6613
66142011-08-04 Emmanuel Briot <briot@adacore.com>
6615
6616 * makeutl.adb (Complete_Mains): no longer accept unit names on the
6617 gnatmake command line.
6618 This behavior was never documented (and was supported only because of
6619 an early bug in the code). This case might lead to ambiguous cases
6620 (between unit names and truncated base names without suffixes).
6621
87729e5a
AC
66222011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6623
6624 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
6625 Remove the external tag of a tagged type from the internal hash table.
6626 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
6627 expanded usage of the routine. Strenghten the check for Is_Master. Add
6628 processing for tagged types.
6629 (Build_Finalizer): Create all the necessary lists used in finalizer
6630 creation when the processed context is a package that may contain
6631 tagged types.
6632 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
6633 Requires_Cleanup_Actions.
6634 (Expand_N_Package_Body): Package bodies may need clean up code
6635 depending on whether they contain tagged types.
6636 (Expand_N_Package_Declaration): Package declarations may need clean up
6637 code depending on whether they contain tagged types.
6638 (Unregister_Tagged_Types): New routine. Search through a list of
6639 declarations or statements, looking for non-abstract Ada tagged types.
6640 For each such type, generate code to unregister the external tag.
6641 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
6642 Requires_Cleanup_Actions.
6643 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
6644 through a list of declarations or statements looking for non-abstract
6645 Ada tagged types or controlled objects.
6646 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
6647 Requires_Cleanup_Actions.
6648 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
6649 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
6650 RE_Unit_Table.
6651
66522011-08-04 Vincent Celier <celier@adacore.com>
6653
6654 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
6655 has Ada sources, not project Project, because if the root project
6656 Project has no sources of its own, all projects will be deemed without
6657 sources.
6658
66592011-08-04 Gary Dismukes <dismukes@adacore.com>
6660
6661 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
6662 of the No_Param_Proc acc-to-subp type used for initialization of
6663 __gnat_finalize_library_objects so that it's declared at library level
6664 rather than nested inside of the adainit routine.
6665
66662011-08-04 Javier Miranda <miranda@adacore.com>
6667
6668 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
6669 if the tagged type has a representation clause which specifies its
6670 external tag.
6671
66722011-08-04 Ed Schonberg <schonberg@adacore.com>
6673
6674 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
6675 Remove previous procedure with that name.
6676 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
6677 when appropriate.
6678 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
6679 subtype mark, the ancestor cannot have unknown discriminants.
6680 (Resolve_Record_Aggregate): if the type has invisible components
6681 because of a private ancestor, the aggregate is illegal.
6682
66832011-08-04 Vincent Celier <celier@adacore.com>
6684
6685 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
6686 account switches -gnat2005, -gnat12 and -gnat2012.
6687
66882011-08-04 Bob Duff <duff@adacore.com>
6689
6690 * s-tasdeb.ads: Minor comment fix.
6691
66922011-08-04 Arnaud Charlet <charlet@adacore.com>
6693
6694 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
6695 CodePeer mode.
6696 * switch.ads, switch.adb (Is_Language_Switch): New function.
6697
66982011-08-04 Vincent Celier <celier@adacore.com>
6699
6700 * switch-c.adb: Minor comment addition.
6701
67022011-08-04 Vincent Celier <celier@adacore.com>
6703
6704 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
6705 ending with '=' is followed by a space (missing file name).
6706
67072011-08-04 Pascal Obry <obry@adacore.com>
6708
6709 * g-regist.ads: Fix size of HKEY on x86_64-windows.
6710
67112011-08-04 Ed Schonberg <schonberg@adacore.com>
6712
6713 * sem_ch12.adb (Analyze_Associations): New routine
6714 Check_Overloaded_Formal_Subprogram to reject a formal package when
6715 there is a named association or a box initialisation for an overloaded
6716 formal subprogram of the corresponding generic.
6717
67182011-08-04 Yannick Moy <moy@adacore.com>
6719
6720 * alfa.ads (ALFA_Xref_Record): add component for type of entity
6721 * get_alfa.adb, put_alfa.adb: Read and write new component of
6722 cross-reference.
6723 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
6724
88f47280
AC
67252011-08-04 Pascal Obry <obry@adacore.com>
6726
6727 * urealp.adb: Minor reformatting.
6728
67292011-08-04 Tristan Gingold <gingold@adacore.com>
6730
6731 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
6732 Handle the case when Cleanup_Protected_Object returns Empty.
6733
67342011-08-04 Yannick Moy <moy@adacore.com>
6735
6736 * frontend.adb (Frontend): only qualify names in non-ALFA mode
6737
67382011-08-04 Ed Schonberg <schonberg@adacore.com>
6739
6740 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
6741 call, ignore functions.
6742
05c53a69
GB
67432011-08-04 Geert Bosch <bosch@adacore.com>
6744
6745 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
6746 point.
6747
23cc1ace
EB
67482011-08-04 Emmanuel Briot <briot@adacore.com>
6749
6750 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
6751 as an index for Builder'Switches. This conforms to the documentation.
6752 * make.adb (Insert_Project_Sources): avoid duplicate code
6753
cef14201
AC
67542011-08-04 Emmanuel Briot <briot@adacore.com>
6755
6756 * makeutl.adb (Complete_Mains): if the user has passed a relative file
6757 name on the command line (for instance "../dummy"), never assume it can
6758 be a unit name.
6759
67602011-08-04 Tristan Gingold <gingold@adacore.com>
6761
6762 * bindgen.adb: Remove code the reference or create the
6763 Break_Start/__gnat_break_start procedure.
6764 * s-stalib.adb (Break_Start): Removed.
6765
e2fee30d
EB
67662011-08-04 Emmanuel Briot <briot@adacore.com>
6767
6768 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
6769 shared with gprbuild.
6770
2d395256
AC
67712011-08-04 Yannick Moy <moy@adacore.com>
6772
6773 * par-ch4.adb (P_Primary): preferentially issue an error message about
6774 a missing parenthesis arount a conditional or case expression in Ada
6775 2012 mode, if we detect that the alignment is not correct for a
6776 statement.
6777
67782011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6779
6780 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
6781 tag-to-class-wide conversion as needing finalization actions.
6782 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
6783 a tag-to-class-wide conversion as needing finalization actions.
6784 (Is_Finalizable_Transient): The result of a tag-to-class-wide
6785 conversion does not need finalization actions.
6786 (Is_Tag_To_CW_Conversion): New routine.
6787 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
6788 whether an object is the result of a tag-to-class-wide conversion.
6789
67902011-08-04 Yannick Moy <moy@adacore.com>
6791
6792 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
6793 the left-hand-side and right-hand-side of a conjunct are inserted when
6794 translating a pre- or postcondition
6795 * sem_ch6.adb: Correct typo in comment
6796
67972011-08-04 Ed Schonberg <schonberg@adacore.com>
6798
6799 * gnat_rm.texi: Ravenscar does not prohibit dependence on
6800 Unchecked_Conversion and Unchecked_Deallocation.
6801
68022011-08-04 Thomas Quinot <quinot@adacore.com>
6803
6804 * make.adb: Minor reformatting.
6805
767ab2fd
EB
68062011-08-04 Emmanuel Briot <briot@adacore.com>
6807
6808 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
6809 sources in the project and its imported projects, but not in the whole
6810 tree.
6811
8fb3f5df
AC
68122011-08-04 Emmanuel Briot <briot@adacore.com>
6813
6814 * make.adb: Remove debug trace.
6815
68162011-08-04 Vincent Celier <celier@adacore.com>
6817
6818 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
6819 path in canonical form, to be able to compare path names on platforms
6820 such as Windows or Darwin.
6821
68222011-08-04 Thomas Quinot <quinot@adacore.com>
6823
6824 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
6825 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
6826 * scos.ads: Update documentation accordingly.
6827 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
6828 pragmas.
6829
9515740f
AC
68302011-08-04 Ed Schonberg <schonberg@adacore.com>
6831
6832 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
6833 attribute only if prefix type is scalar.
6834
68352011-08-04 Emmanuel Briot <briot@adacore.com>
6836
6837 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
6838 in gnatmake for specifying mains on the command line that do not belong
6839 to the main project. These mains must currently all belong to the same
6840 project, though.
6841 (Ultimate_Extension_Of): removed, since duplicated
6842 Ultimate_Extending_Project.
6843
92966893
AC
68442011-08-04 Arnaud Charlet <charlet@adacore.com>
6845
6846 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
6847 instead.
6848 (CodePeer_Mode_String): New.
6849 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
6850 CodePeer mode.
6851 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
6852 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
6853 mode, since no useful elaboration subprogram is needed by CodePeer.
6854 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
6855 In this mode, compile binder file with -gnatC and do stop after this
6856 step.
6857
68582011-08-04 Vincent Celier <celier@adacore.com>
6859
6860 * exp_ch7.adb: Minor comment fix.
6861
5969611f
RD
68622011-08-04 Robert Dewar <dewar@adacore.com>
6863
6864 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
6865 exp_ch4.adb, makeutl.adb: Minor reformatting.
6866
6367dd30
AC
68672011-08-04 Emmanuel Briot <briot@adacore.com>
6868
6869 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
6870 Create several new subprograms to move code out of Make. This makes the
6871 code more readable, removes code duplication, and is a preparation work
6872 for adding support for aggregate projects.
6873
68742011-08-04 Tristan Gingold <gingold@adacore.com>
6875
6876 * s-po32gl.ads, s-po32gl.adb: New files.
6877 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
6878 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
6879 (Build_Finalization_Collection): Use it.
6880 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
6881 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
6882 literals.
6883 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
6884 * gcc-interface/Make-lang.in: Update dependencies.
6885
cd8bfe35
EB
68862011-08-04 Emmanuel Briot <briot@adacore.com>
6887
6888 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
6889 the command line.
6890
7db29ea7
EB
68912011-08-04 Emmanuel Briot <briot@adacore.com>
6892
6893 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
6894 command line is not a file name, also check whether it could be a unit
6895 name.
6896
d9b056ea
AC
68972011-08-04 Eric Botcazou <ebotcazou@adacore.com>
6898
6899 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
6900 the header of the finalization routine.
6901 If the unit has no finalizer but is a body whose spec has one, then
6902 generate the decrement of the elaboration entity only.
6903 If the unit has a finalizer and is a spec, then do not generate the
6904 decrement of the elaboration entity.
6905 (Gen_Finalize_Library_C): Likewise.
6906
69072011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
6908
6909 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
6910 (Bounds_Size_Expression): Removed.
6911 (Double_Alignment_Of): New subsidiary routine.
6912 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
6913 for a hole in the dope vector of unconstrained arrays due to different
6914 index and element alignments.
6915
69162011-08-04 Ed Schonberg <schonberg@adacore.com>
6917
6918 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
6919 raise program_error because body has not been seen yet.
6920
69212011-08-04 Ed Schonberg <schonberg@adacore.com>
6922
6923 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
6924 an unresolved name.
6925
69262011-08-04 Vincent Celier <celier@adacore.com>
6927
6928 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
6929
69302011-08-04 Yannick Moy <moy@adacore.com>
6931
6932 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
6933 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
6934
69352011-08-04 Thomas Quinot <quinot@adacore.com>
6936
6937 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
6938 instantiation in RCI.
6939
69402011-08-04 Emmanuel Briot <briot@adacore.com>
6941
6942 * make.adb: Share more code with gprbuild
6943
f5fc5b9d
AC
69442011-08-04 Emmanuel Briot <briot@adacore.com>
6945
6946 * projects.texi: Added documentation for the IDE'Gnat project file
6947 attribute.
6948
69492011-08-04 Nicolas Roche <roche@adacore.com>
6950
6951 * gnat_rm.texi: Minor editing.
6952
69532011-08-04 Javier Miranda <miranda@adacore.com>
6954
6955 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
6956 and the library case for VM targets.
6957 (Gen_Adainit_Ada): Likewise.
6958
69592011-08-04 Robert Dewar <dewar@adacore.com>
6960
6961 * g-altive.ads: Minor comment updates.
6962 * prj-nmsc.adb: Minor reformatting.
6963
69642011-08-04 Javier Miranda <miranda@adacore.com>
6965
6966 * opt.ads
6967 (Normalize_Scalars_Config): Value of the configuration switch set by
6968 pragma Normalize_Scalars when it appears in the gnat.adc file.
6969 (Normalize_Scalars): New field for record Config_Switches_Type. Used
6970 to save and restore settings of this pragma.
6971 * opt.adb
6972 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
6973 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
6974
69752011-08-04 Vincent Celier <celier@adacore.com>
6976
6977 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
6978
0c4683cf
AC
69792011-08-04 Arnaud Charlet <charlet@adacore.com>
6980
6981 * makeutl.adb: Minor reformatting.
6982
69832011-08-04 Olivier Hainque <hainque@adacore.com>
6984
6985 * g-altive.ads: Update comments to reflect that only the soft
6986 binding is available today.
6987
2598ee6d
RD
69882011-08-04 Robert Dewar <dewar@adacore.com>
6989
6990 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
6991 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
6992 * gcc-interface/Make-lang.in: Update dependencies.
6993
c2db4b32
AC
69942011-08-04 Arnaud Charlet <charlet@adacore.com>
6995
6996 * prj-env.adb: Remove local debug traces.
6997
69982011-08-04 Yannick Moy <moy@adacore.com>
6999
7000 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
7001 was used instead of Hi_OK, which could cause a read of an uninitialized
7002 value later on. Detected while working on the new warning.
7003 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
7004 to local variable.
7005 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
7006 in more cases, in order to detect more unreferenced values.
7007 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
7008 object for expression, if any.
7009
70102011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7011
7012 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
7013 the operand types instead of the Esize.
7014
70152011-08-04 Steve Baird <baird@adacore.com>
7016
7017 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
7018 enable CodePeer_Mode.
7019 * bindusg.adb (Display): Add help message describing -P binder switch.
7020 * gnat_ugn.texi: Document -P binder switch.
7021 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
7022 user-defined main program directly.
7023 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
7024 user-defined main program in the context clause of the package body.
7025
ad05f2e9
AC
70262011-08-04 Yannick Moy <moy@adacore.com>
7027
7028 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
7029 duplicate of Defining_Entity
7030 (Get_Unique_Entity_For_Decl): rename function into
7031 Unique_Defining_Entity
7032 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
7033 (Formal_Proof_On): remove synthesized flag
7034 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7035 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
7036 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
7037 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
7038 Annotate (Formal_Proof)
7039
70402011-08-04 Emmanuel Briot <briot@adacore.com>
7041
7042 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
7043 source files with non-standard naming schemes, in imported projects
7044
756ef2a0
AC
70452011-08-04 Emmanuel Briot <briot@adacore.com>
7046
7047 * makeutl.adb (Complete_Mains): when a multi-unit source file is
7048 specified on the gprbuild command line, we need to compile all units
7049 within that file, not just the first one we find
7050 Fix error message for mains that are not found.
7051
70522011-08-04 Thomas Quinot <quinot@adacore.com>
7053
7054 * sem_ch6.adb: Update comment.
7055 * sem_ch12.adb: Minor reformatting.
7056
70572011-08-04 Bob Duff <duff@adacore.com>
7058
7059 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
7060 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
7061 race condition whose symptom is to fail to lock Parent. That, in turn,
7062 causes Parent.Awake_Count to be accessed without locking Parent, which
7063 causes another race condition whose symptom is that Parent.Awake_Count
7064 can be off by 1 (either too high or too low). The solution is to lock
7065 Parent unconditionally, and then lock Acceptor, before reading
7066 Acceptor.Terminate_Alternative.
7067
4fdebd93
AC
70682011-08-04 Arnaud Charlet <charlet@adacore.com>
7069
7070 * debug.adb: Update comment.
7071
70722011-08-04 Robert Dewar <dewar@adacore.com>
7073
7074 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
7075 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
7076 exp_ch6.adb: Minor reformatting.
7077
70782011-08-04 Gary Dismukes <dismukes@adacore.com>
7079
7080 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
7081 checks for -gnateE.
7082
70832011-08-04 Ed Schonberg <schonberg@adacore.com>
7084
7085 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
7086
70872011-08-04 Thomas Quinot <quinot@adacore.com>
7088
7089 * sinfo.ads: Minor reformatting.
7090
70912011-08-04 Emmanuel Briot <briot@adacore.com>
7092
7093 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
7094 even if there is no location.
7095
6aaa0587
ES
70962011-08-04 Ed Schonberg <schonberg@adacore.com>
7097
7098 * sem_res.adb, sem_ch4.adb: move check for restriction
7099 No_Task_Hierarchy to resolve_allocator.
7100
35a1c212
AC
71012011-08-04 Thomas Quinot <quinot@adacore.com>
7102
7103 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
7104 This flag of N_Pragma nodes is not used, remove it as well as all of
7105 the associated circuitry.
7106
71072011-08-04 Javier Miranda <miranda@adacore.com>
7108
7109 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
7110 runtime check on duplicated externa tags
7111 * debug.adb Document switch -gnatdQ.
7112
71132011-08-04 Gary Dismukes <dismukes@adacore.com>
7114
7115 * a-fihema.ads: Minor typo fix.
7116
71172011-08-04 Yannick Moy <moy@adacore.com>
7118
7119 * sem_ch10.adb: Minor comment update.
7120
71212011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7122
7123 * einfo.adb: Update the node field usage to reflect the renaming of
7124 Return_Flag to Return_ Flag_Or_Transient_Decl.
7125 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
7126 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
7127 (Write_Field15_Name): Change Return_Flag to
7128 Return_Flag_Or_Transient_Decl.
7129 * einfo.ads: Rename node field Return_Flag to
7130 Return_Flag_Or_Transient_Decl. Update the associated comment and all
7131 occurrences in entities.
7132 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
7133 associated Inline pragma.
7134 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
7135 associated Inline pragma.
7136 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
7137 routine.
7138 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
7139 Return_Flag and Set_Return_Flag.
7140 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
7141 objects generated for controlled transients declared inside an
7142 Exception_With_Actions. Update the calls to Return_Flag.
7143 (Process_Object_Declaration): Add code to add a null guard for hook
7144 objects generated for controlled transients declared inside an
7145 Exception_With_Actions. Update related comment.
7146 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
7147 objects generated for controlled transients declared inside an
7148 Exception_With_Actions. Update the calls to Return_Flag.
7149 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
7150
71512011-08-04 Ed Schonberg <schonberg@adacore.com>
7152
7153 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
7154 positional aggregate.
7155
71562011-08-04 Vincent Celier <celier@adacore.com>
7157
7158 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
7159 SLOC only for pragmas.
7160
71612011-08-04 Emmanuel Briot <briot@adacore.com>
7162
7163 * projects.texi: Minor typo fix.
7164
71652011-08-04 Emmanuel Briot <briot@adacore.com>
7166
7167 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
7168 on case-sensitive file systems.
7169
c2873f74
TQ
71702011-08-04 Thomas Quinot <quinot@adacore.com>
7171
7172 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
7173 nested in a disabled pragma.
7174 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
7175 enclosing pragma, if any, for X decisions.
7176
71772011-08-04 Thomas Quinot <quinot@adacore.com>
7178
7179 * sem_prag.adb: Minor reformatting.
7180
46414266
VC
71812011-08-04 Vincent Celier <celier@adacore.com>
7182
7183 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
7184 allowed in no run time mode.
7185
71862011-08-04 Vincent Celier <celier@adacore.com>
7187
7188 * make.adb (Check): When -gnatc is used, check for the source file
7189 inside the ALI file with a canonical case file name.
7190
afab164f
EB
71912011-08-04 Emmanuel Briot <briot@adacore.com>
7192
7193 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
7194 overriding the separator.
7195
fe0ec02f
AC
71962011-08-04 Robert Dewar <dewar@adacore.com>
7197
7198 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
7199 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
7200
72012011-08-04 Robert Dewar <dewar@adacore.com>
7202
7203 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
7204
72052011-08-04 Yannick Moy <moy@adacore.com>
7206
7207 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
7208 'Result only appears in postcondition of function.
7209
72102011-08-04 Thomas Quinot <quinot@adacore.com>
7211
7212 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
7213 external tag, include the value of the external tag in the exception
7214 message.
7215
0180fd26
AC
72162011-08-04 Yannick Moy <moy@adacore.com>
7217
7218 * sem_attr.adb (Result): modify error message for misplaced 'Result
7219
72202011-08-04 Sergey Rybin <rybin@adacore.com>
7221
7222 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
7223 clear that the second argument must be an identifier.
7224
72252011-08-04 Thomas Quinot <quinot@adacore.com>
7226
7227 * exp_ch9.adb (Build_Barrier_Function): When compiling with
7228 -fpreserve-control-flow, insert an IF statement on the barrier
7229 condition to ensure that a conditional branch instruction is generated.
7230
72312011-08-04 Emmanuel Briot <briot@adacore.com>
7232
7233 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
7234 (Processing_Flags.Ignore_Missing_With): new flag.
7235
72362011-08-04 Emmanuel Briot <briot@adacore.com>
7237
7238 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
7239 Source_List_File on case-insensitive systems where the file is actually
7240 on a case-sensitive file system (NFS,...).
7241
72422011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7243
7244 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
7245 function return contains a controlled [extension] aggregate and the
7246 return statement is not part of a handled sequence of statements, wrap
7247 the return in a block. This ensures that all controlled temporaries
7248 generated during aggregate resolution will be picked up by the
7249 finalization machinery.
7250
72512011-08-04 Ed Schonberg <schonberg@adacore.com>
7252
7253 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
7254 components, freeze type before resolution, to ensure that default
7255 initializations are present for all components.
7256 * sem_res.adb (Resolve_Actuals): the designated object of an
7257 accces-to-constant type is a legal actual in a call to an
7258 initialization procedure.
7259
72602011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7261
7262 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
7263 N_Unchecked_Type_Conversion to the possible containers of a renamed
7264 transient variable.
7265
78efd712
AC
72662011-08-04 Yannick Moy <moy@adacore.com>
7267
7268 * par-ch13.adb (Aspect_Specifications_Present): recognize
7269 "with Identifier'Class =>" as an aspect, so that a meaningful warning
7270 is issued in Strict mode.
7271 * par.adb: Fix typos in comments.
7272
72732011-08-04 Yannick Moy <moy@adacore.com>
7274
7275 * sem_attr.adb (Result): modify error message to take into account Post
7276 aspect when compiling Ada 2012 (or newer) code.
7277
72782011-08-04 Nicolas Roche <roche@adacore.com>
7279
7280 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2c7f9cc0 7281 remove need for GCC exceptions.
78efd712
AC
7282
72832011-08-04 Vincent Celier <celier@adacore.com>
7284
7285 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
7286 project, not the source file name.
7287 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
7288 excluded, continue looking. This excluded source will only be returned
7289 if there is no other source with the same base name that is not locally
7290 removed.
7291
72922011-08-04 Ed Schonberg <schonberg@adacore.com>
7293
7294 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
7295 private and one of the operands is a real literal, use a qualified
7296 expression rather than a conversion which is not meaningful to the
7297 back-end.
7298
0170a691
AC
72992011-08-04 Yannick Moy <moy@adacore.com>
7300
7301 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
7302 corresponding aspect X'Class are allowed, proceed with analysis of the
7303 aspect instead of skipping it.
7304
73052011-08-04 Tristan Gingold <gingold@adacore.com>
7306
7307 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
7308 This will allow to have an Ada implementation for the subprogram.
7309
deb4f5ba
ES
73102011-08-04 Ed Schonberg <schonberg@adacore.com>
7311
7312 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
7313 completion and aspects are present, apply them to the entity for the
7314 type which is currently the partial view, but which is the one that
7315 will be frozen.
7316 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
7317 applies to a partial view, indicate that the full view has predicates
7318 and delayed aspects.
7319 (Replace_Type_Reference): Handle properly predicates that apply to the
7320 full view of a private completion.
7321
fc893455
AC
73222011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7323
7324 * layout.adb (Layout_Type): For composite types, do not set Esize.
7325 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
7326 set Esize.
7327 (Size_Known): Look at the RM size of components instead of the Esize.
7328 (Freeze_Record_Type): Look at the RM size instead of the Esize to
7329 issue warning and activate Implicit_Packing.
7330 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
7331 if the Esize is not known.
7332 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
7333 for elementary types only.
7334 (Analyze_Record_Representation_Clause): Look at the RM size instead
7335 of the Esize to issue errors.
7336 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
7337 is not known.
7338 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
2c7f9cc0 7339 obsolete block.
fc893455
AC
7340 Look at the RM size instead of the Esize for types if the latter is
7341 not known.
7342 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
7343
73442011-08-04 Ed Schonberg <schonberg@adacore.com>
7345
7346 * sem_type.adb: proper handling of equality not involving anonymous
7347 access types.
7348
b37d5bc6
AC
73492011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7350
7351 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
7352 Vis_Decls. When creating a library-level finalizer for a package spec,
7353 both the declaration and body of the finalizer are inserted either in
7354 the visible or private declarations of the package spec.
7355
73562011-08-04 Javier Miranda <miranda@adacore.com>
7357
7358 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
7359 use of the full-view of a type when invoking Is_Ancestor.
7360 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
7361 the full-view of private parents is requested, then use also the
7362 full-view of the parent of the first derivation.
7363
7ab4d95a
AC
73642011-08-04 Tristan Gingold <gingold@adacore.com>
7365
7366 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
7367 instead of the locally imported procedure.
7368 * s-taprop-mingw.adb (Enter_Task): Ditto.
7369 * s-valrea.adb (Scan_Real): Ditto.
7370 * s-imgrea.adb (Set_Image_Real): Ditto.
7371 * s-flocon.ads: Make the package pure.
7372
73732011-08-04 Thomas Quinot <quinot@adacore.com>
7374
7375 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
7376 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
7377 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
7378 New subprogram, moved here from...
7379 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
7380 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
7381 rewriting of the last argument into a procedure call statement here...
7382 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
7383 instead.
7384
73852011-08-04 Thomas Quinot <quinot@adacore.com>
7386
7387 * par_sco.adb: Minor reformatting.
7388
51c400f5
AC
73892011-08-04 Robert Dewar <dewar@adacore.com>
7390
7391 * erroutc.adb: Minor reformatting.
7392
73932011-08-04 Thomas Quinot <quinot@adacore.com>
7394
7395 * par_sco.adb: Comment update.
7396
73972011-08-04 Tristan Gingold <gingold@adacore.com>
7398
7399 * s-flocon.ads: New file.
7400 * g-flocon.ads: Now a renaming of s-flocon.
7401 * Makefile.rtl: Add s-flocon.o
7402
6a49f110
AC
74032011-08-04 Javier Miranda <miranda@adacore.com>
7404
7405 * exp_strm.adb (Build_Array_Input_Function): if the array type is
7406 constrained, do not attempt to build a subtype of it.
7407
74082011-08-04 Yannick Moy <moy@adacore.com>
7409
7410 * errout.ads Change comments: remove 'R'M as an example where quotes
7411 are needed; add ALFA as another case where quotes are not needed
7412 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
7413 case where quotes are not needed.
7414 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
7415 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
7416 Remove all occurrences of 'A'L'F'A
7417
74182011-08-04 Ed Schonberg <schonberg@adacore.com>
7419
7420 * sem_ch13.adb: check legality of invariant pragma.
7421
a4640a39
AC
74222011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7423
7424 * bindgen.adb: Add comments.
7425
74262011-08-04 Yannick Moy <moy@adacore.com>
7427
7428 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
7429 synthesized flag.
7430 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
7431 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
7432
74332011-08-04 Robert Dewar <dewar@adacore.com>
7434
7435 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
7436 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
7437 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
7438
39ade2f9
AC
74392011-08-04 Thomas Quinot <quinot@adacore.com>
7440
7441 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
7442
74432011-08-04 Thomas Quinot <quinot@adacore.com>
7444
7445 PR ada/47880
7446 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
7447 allocated object.
7448
74492011-08-04 Robert Dewar <dewar@adacore.com>
7450
7451 * einfo.ads, exp_ch4.adb: Minor reformatting.
7452
74532011-08-04 Jerome Lambourg <lambourg@adacore.com>
7454
7455 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
7456
7efc3f2d
AC
74572011-08-04 Ed Schonberg <schonberg@adacore.com>
7458
7459 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
7460 type in all cases to compute list of primitive operations, because full
7461 view may be an itype that is not attached to the list of declarations.
7462
74632011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7464
7465 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
7466 library has already been finalized.
7467 (Gen_Adafinal_C): Likewise.
7468 (Gen_Adainit_Ada): Generate an early return if the library has
7469 already been elaborated.
7470 (Gen_Adainit_C): Likewise.
7471 (Gen_Output_File_Ada): Generate an elaboration flag.
7472 (Gen_Output_File_C): Likewise.
7473
f65df609
HK
74742011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7475
7476 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
7477 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
7478 built in the first place.
7479 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
7480 for CodePeer because Finalize_Address was not built to begin with.
7481 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
7482
a0fb8fe8
AC
74832011-08-04 Pascal Obry <obry@adacore.com>
7484
7485 * adaint.c (__gnat_tmp_name): Use current process id to create temp
7486 filenames, this ensures unicity of filenames across processes.
7487
74882011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7489
7490 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
7491 Raise_Controlled to Raise_From_Controlled_Operation. Update the
7492 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
7493 Add False as the actual to From_Abort in the generated call to
7494 Raise_From_Controlled_Operation.
7495
74962011-08-04 Jerome Lambourg <lambourg@adacore.com>
7497
7498 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
7499 so that the ali file name can be retrieved from outside of this package.
7500 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
7501 doing nothing in the general case, but used to update the object file
7502 timestamp if directly generated by the backend.
7503 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
7504 to a later time than the ali file one.
7505
9534ab17
AC
75062011-08-04 Yannick Moy <moy@adacore.com>
7507
7508 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
7509 entities whose body contains an Annotate pragma which forces formal
7510 proof on this body.
7511 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7512 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
7513 Mark_Non_ALFA_Subprogram to pass in a message and node.
7514 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
7515 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
7516 surrounding subprogram.
7517 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
7518 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
7519 as not in ALFA is annotated with Formal_Proof being On, then an error
7520 is issued based on the additional parameters for message and node.
7521 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
7522 * gcc-interface/Make-lang.in: Update dependencies.
7523
75242011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7525
7526 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
7527 Finalize_Address when CodePeer is enabled.
7528
75292011-08-04 Pascal Obry <obry@adacore.com>
7530
7531 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
7532 the latter returns a pointer to a static buffer which is deallocated
7533 at the end of the routine.
7534
5c0e97dd
AC
75352011-08-04 Yannick Moy <moy@adacore.com>
7536
7537 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
7538 after index creation; mark unconstrained base array type generated as
7539 being in/not in ALFA as well
7540 (Make_Index): mark subtype created as in/not in ALFA
7541 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
7542 over a loop as in/not in ALFA, depending on its type and form of loop
7543 iteration.
7544
75452011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7546
7547 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
7548 directly to False on .NET and JVM.
7549
7a93c64b
YM
75502011-08-04 Yannick Moy <moy@adacore.com>
7551
7552 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
7553 constraint that subtype must come from source code to be in ALFA, so
7554 that anonymous subtypes can be in ALFA too.
7555
e9a1ed9b
YM
75562011-08-04 Yannick Moy <moy@adacore.com>
7557
7558 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
7559 reference for ALFA mode.
7560 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
7561 procedure public so as to use it from formal verification back-end.
7562
8e293fbd
AC
75632011-08-04 Jerome Lambourg <lambourg@adacore.com>
7564
7565 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
7566 invalid checks of the Parameter, making Remove_Switch not working
7567 correctly.
7568
75692011-08-04 Arnaud Charlet <charlet@adacore.com>
7570
7571 * targparm.ads: Update header: no run-time exception is needed on this
7572 file.
7573
75742011-08-04 Vincent Celier <celier@adacore.com>
7575
7576 * a-fihema.adb: Use System.IO instead of GNAT.IO
7577
75782011-08-04 Thomas Quinot <quinot@adacore.com>
7579
7580 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
7581 are forbidden in Compiler_Unit mode.
7582
cfae2bed
AC
75832011-08-04 Robert Dewar <dewar@adacore.com>
7584
7585 * sem_util.adb: Minor reformatting.
7586
75872011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7588
7589 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
7590 library-level finalizers.
7591 (Gen_Finalize_Library_C): Update the import string for library-level
7592 finalizers.
7593 (Gen_Finalize_Library_Defs_C): Update the definition name of a
7594 library-level finalizer.
7595 * exp_ch7.adb: Remove with and use clauses for Stringt.
7596 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
7597 Spec_Decl. Add local variable Body_Id. The names of library-level
7598 finalizers are now manually fully qualified and are no longer external.
7599 A single name is now capable of servicing .NET, JVM and non-VM targets.
7600 Pragma Export is no longer required to provide visibility for the name.
7601 (Create_Finalizer_String): Removed.
7602 (New_Finalizer_Name): New routine which mimics New_..._Name.
7603
01f0729a
AC
76042011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7605
7606 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
7607 elaboration counter to Standard_Short_Integer.
7608 * sem_util.adb (Build_Elaboration_Entity): Likewise.
7609 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
7610 (Gen_Elab_Externals_C): Likewise.
7611
76122011-08-04 Ed Falis <falis@adacore.com>
7613
7614 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
7615 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
7616 system-vxworks-mips.ads, system-vxworks-x86.ads
7617 (Always_Compatible_Rep): set to False for all VxWorks targets.
7618
2c1b72d7
AC
76192011-08-04 Robert Dewar <dewar@adacore.com>
7620
7621 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
7622 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
7623 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
7624 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
7625 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
7626 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
7627 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
7628 Minor reformatting and code reorganization.
7629
76302011-08-04 Emmanuel Briot <briot@adacore.com>
7631
7632 * projects.texi: Added doc for aggregate projects.
7633
824e9320
AC
76342011-08-04 Emmanuel Briot <briot@adacore.com>
7635
7636 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
7637 Add support for overriding the Project_Path in aggregate projects.
7638
76392011-08-04 Robert Dewar <dewar@adacore.com>
7640
7641 * a-cofove.ads: Minor reformatting.
7642
76432011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
7644
7645 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
7646 on the generated code.
7647 (Build_Finalize_Statements): Update the comment on the generated code.
7648 (Build_Initialize_Statements): Update the comment on the generated code.
7649 (Build_Object_Declarations): Add local variable Result. The object
7650 declarations are now built in sequence.
7651 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
7652 RE_Unit_Table.
7653
76542011-08-04 Robert Dewar <dewar@adacore.com>
7655
7656 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
7657
76582011-08-04 Eric Botcazou <ebotcazou@adacore.com>
7659
7660 * einfo.ads (Elaboration_Entity): Document new definition and use.
7661 (Elaboration_Entity_Required): Adjust to above change.
7662 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
7663 * exp_ch12.adb: And with and use for Snames.
7664 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
7665 * exp_util.adb (Set_Elaboration_Flag): Likewise.
7666 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
7667 <Check_Unit_Name>: Deal with N_Expanded_Name.
7668 <Attribute_Elaborated>: Extend to all unit names.
7669 * sem_elab.adb: And with and use for Uintp.
7670 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
7671 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
7672 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
7673 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
7674 from Gen_Adainit_Ada.
7675 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
7676 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
7677 case, do not call System.Standard_Library.Adafinal; instead call
7678 finalize_library if needed.
7679 (Gen_Adafinal_C): Likewise.
7680 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
7681 non-main program case.
7682 (Gen_Adainit_C): Generate a couple of external declarations here.
7683 In the main program case, set SSL.Finalize_Library_Objects.
7684 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
7685 (Gen_Elab_Calls_C): Likewise.
7686 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
7687 (Gen_Finalize_Library_C): Likewise. Generate a full function.
7688 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
7689 objects here.
7690 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
7691 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
7692 Gen_Adafinal_Ada.
7693 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
7694 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2c7f9cc0 7695 of external declarations. Call Gen_Finalize_Library_C.
824e9320 7696
316d9d4f
EB
76972011-08-04 Emmanuel Briot <briot@adacore.com>
7698
7699 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
7700 Compute_Compilation_Phases): new subprogram.
7701 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
7702 The number of mains as well as the various compilation phases that
7703 need to be run are now project tree specific, since various
7704 aggregated trees might have different requirements. In particular,
7705 they do not all require bind or link phases.
7706
9434c32e
EB
77072011-08-04 Emmanuel Briot <briot@adacore.com>
7708
7709 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
7710 (Project_Tree_Appdata): New type.
7711 It is now possible to associate application-specific data to a project
7712 tree. In particular, this is used in the gprbuild builder to avoid a
7713 number of global tables and htables, especially now that there can be
7714 several project trees loaded at once because of aggregate projects.
7715 (Debug_Name): new procedure.
7716 * projects.texi: Clarify syntax of "**" for Source_Dirs
7717
41ba34db
EB
77182011-08-03 Emmanuel Briot <briot@adacore.com>
7719
7720 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
7721 the "roots" for a main.
7722 (Fill_From_Project): add support for aggregate projects. Main units
7723 in aggregated projects are now automatically added in the list of
7724 files to build (although this fails later on in gprbuild, because
7725 these files are not using the root proejct tree, so this needs
7726 further cleanup)
7727 * gcc-interface/Make-lang.in: Update dependencies.
7728
fccd42a9
AC
77292011-08-03 Yannick Moy <moy@adacore.com>
7730
7731 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
7732 conditional expression in ALFA.
7733 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
7734 expressions as not in ALFA.
7735
77362011-08-03 Robert Dewar <dewar@adacore.com>
7737
7738 * a-cofove.adb: Minor reformatting.
7739
77402011-08-03 Emmanuel Briot <briot@adacore.com>
7741
7742 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
7743 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
7744 gprbuild sources.
7745 These packages are more logically placed in the Queue package, since
7746 they manipulate the queue. It is also likely that they can be adapted
7747 for gnatmake, thus sharing more code.
7748 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
7749 that we could move the above.
7750
77512011-08-03 Emmanuel Briot <briot@adacore.com>
7752
7753 * errutil.adb (Finalize): clean up the list of error messages on exit.
7754 Calling this subprogram multiple times will no longer show duplicate
7755 error messages on stderr.
7756
77572011-08-03 Emmanuel Briot <briot@adacore.com>
7758
7759 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
7760 Getopt_Switches when we have already define a command line
7761 configuration.
7762
5e8c8e44
YM
77632011-08-03 Yannick Moy <moy@adacore.com>
7764
7765 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
7766 in ALFA. Instead, they are considered as assertions to prove.
7767 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
7768 nodes as not in ALFA. Instead, include conditional expressions in ALFA
7769 if they have no ELSE part, or if they occur in pre- and postconditions,
7770 where the Condition cannot have side-effects in ALFA
7771 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
7772 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
7773 Instead, include type conversion between scalar types in ALFA.
7774 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
7775 if-and-only-if its type is in ALFA.
7776
5ffe0bab
AC
77772011-08-03 Thomas Quinot <quinot@adacore.com>
7778
7779 * scos.adb, get_scos.adb, put_scos.adb
7780 New code letter for decisions: G (entry guard)
7781 * par_sco.adb
7782 (Traverse_Subprogram_Body): Rename to...
7783 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
7784 (Traverse_Protected_Body): New subprogram
7785 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
7786 protected bodies and entry bodies.
7787
77882011-08-03 Yannick Moy <moy@adacore.com>
7789
7790 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
7791 entities with get/set subprograms, which is set on procedure entities
7792 generated by the compiler for a postcondition.
7793 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
7794 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
7795 entity for a declaration
7796 (Get_Unique_Entity_For_Decl): new function returning an entity which
7797 represents a declaration, so that matching spec and body have the same
7798 entity.
7799
78002011-08-03 Robert Dewar <dewar@adacore.com>
7801
7802 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
7803 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
7804
78052011-08-03 Yannick Moy <moy@adacore.com>
7806
7807 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
7808 library-level because retriction No_Implicit_Dynamic_Code in the
7809 front-end prevents its definition as a local subprogram
7810 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
7811 for reuse in other contexts
7812 (Traverse_Declarations_Or_Statements,
7813 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
7814 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
7815 procedures take a callback parameter to be called on all declarations
7816 * lib-xref.ads
7817 (Traverse_All_Compilation_Units): new generic function to traverse a
7818 compilation unit and call a callback parameter on all declarations
7819
f9ad6b62
AC
78202011-08-03 Javier Miranda <miranda@adacore.com>
7821
7822 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
7823 in Java since they are always enclosed in a namespace that
7824 differentiates them, and overloaded entities are supported by the VM.
7825
78262011-08-03 Ed Schonberg <schonberg@adacore.com>
7827
7828 * checks.adb (Determine_Range): If a computed bound of an operation is
7829 outside the range of the base type of the expression, and overflow
7830 checks are enabled, the result is unknown and cannot be used for any
7831 subsequent constant folding.
7832 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
7833 unknown, so is the result of the comparison.
7834
78352011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7836
7837 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
7838 From_Abort. When finalization was triggered by an abort, propagate
7839 Standard'Abort_Signal rather than Program_Error.
7840 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
7841 From_Abort.
7842 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
7843 From_Abort. When finalization was triggered by an abort, propagate
7844 Standard'Abort_Signal rather than Program_Error.
7845 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
7846 From_Abort.
7847 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
7848 Abort_Id. Update the calls to Build_Object_Declarations and
7849 Build_Raise_Statement to include Abort_Id.
7850 (Build_Adjust_Statements): New local variable Abort_Id. Update the
7851 calls to Build_Object_Declarations and Build_Raise_Statement to include
7852 Abort_Id.
7853 (Build_Finalize_Statements): New local variable Abort_Id. Update the
7854 calls to Build_Object_Declarations and Build_Raise_Statement to include
7855 Abort_Id.
7856 (Build_Components): Create an entity for Abort_Id when exceptions are
7857 allowed on the target.
7858 (Build_Finalizer): New local variable Abort_Id.
7859 (Build_Initialize_Statements): New local variable Abort_Id. Update the
7860 calls to Build_Object_Declarations and Build_Raise_Statement to include
7861 Abort_Id.
7862 (Build_Object_Declarations): Add new formal Abort_Id. Create the
7863 declaration of flag Abort_Id to preserve the original abort status
7864 before finalization code is executed.
7865 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
7866 runtime routine Raise_From_Controlled_Operation.
7867 (Create_Finalizer): Update the call to Build_Raise_Statement to include
7868 Abort_Id. Update the call to Build_Object_Declarations to include
7869 Abort_Id. Update the layout of the finalizer body.
7870 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
7871 (Process_Transient_Objects): New local variable Abort_Id. Remove the
7872 clunky code to create all flags and objects related to
7873 exception propagation and replace it with a call to
7874 Build_Object_Declarations. Update the call to Build_Raise_Statement to
7875 include Abort_Id.
7876 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
7877 Add new formal Abort_Id and associated comment on its use.
7878 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
7879 on its use.
7880 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
7881 Remove the clunky code to create all flags and objects related to
7882 exception propagation and replace it with a call to
7883 Build_Object_Declarations. Update the call to Build_Raise_Statement.
7884
78852011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7886
7887 * s-tassta.adb: Fix minor typos.
7888
78892011-08-03 Robert Dewar <dewar@adacore.com>
7890
7891 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
7892 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
7893
1cdfa9be
AC
78942011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7895
7896 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
7897 to packages. This ensures that the finalizer body will not end up
7898 inside the freeze node.
7899 (Process_Declarations): Add code to detect whether a freeze node has a
7900 nested finalization collection.
7901
79022011-08-03 Pascal Obry <obry@adacore.com>
7903
7904 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
7905 (Current_Session): Return a not null access to Session_Type.
7906 (Default_Session): Likewise.
7907
243cae0a
AC
79082011-08-03 Robert Dewar <dewar@adacore.com>
7909
7910 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
7911 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
7912
79132011-08-03 Pascal Obry <obry@adacore.com>
7914
7915 * g-awk.ads: Minor comment fix.
7916
79172011-08-03 Sergey Rybin <rybin@adacore.com>
7918
7919 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
7920 the tree structure related to discriminant constraints.
7921 Original_Discriminant cannot be used any more for computing the
7922 defining name for the reference to a discriminant.
7923
79242011-08-03 Ed Schonberg <schonberg@adacore.com>
7925
7926 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
7927 function is not visibly tagged, this is not a dispatching call and
7928 therfore is not Tag_Indeterminate, even if the function is marked as
7929 dispatching on result.
7930
f553e7bc
AC
79312011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7932
7933 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
7934 (Expand_N_Free_Statement): Add a guard to protect against run-times
7935 which do not support controlled types.
7936 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
7937 against run-times which do not support controlled types.
7938 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
7939 against run-times which do not support controlled types.
7940 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
7941 against run-times which do not support controlled types.
7942 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
7943 protect against run-times which do not support controlled types.
7944
79452011-08-03 Eric Botcazou <ebotcazou@adacore.com>
7946
7947 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
7948 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
7949
e4982b64
AC
79502011-08-03 Ed Schonberg <schonberg@adacore.com>
7951
7952 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
7953 modified in the source, to prevent spurious warnings when compiling
7954 with -gnatg.
7955
79562011-08-03 Thomas Quinot <quinot@adacore.com>
7957
7958 * a-except-2005.adb: Minor reformatting.
7959
79602011-08-03 Ed Schonberg <schonberg@adacore.com>
7961
7962 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
7963 is a renaming declaration in the private part of a package, do not emit
7964 a warning that the with_clause could be moved because the renaming may
7965 be used in the body or in a child unit.
7966
79672011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7968
7969 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
7970 Propagate the Comes_From_Source attribute from the original return
7971 object to the renaming.
7972
79732011-08-03 Jose Ruiz <ruiz@adacore.com>
7974
7975 * exp_ch7.adb (Build_Raise_Statement): Do not call
7976 Raise_From_Controlled_Operation when this routine is not present in
7977 the run-time library.
7978 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
7979 libraries (Ravenscar), tasks are non-terminating, and protected objects
7980 and tasks can only appear at library level, so we do not want
7981 finalization of protected objects nor tasks.
7982 * exp_intr.adb: Minor clarification in comment.
7983 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
7984 Gen_Output_File_C): Remove references to finalization of library-level
7985 objects when using restricted run-time libraries.
7986
79872011-08-03 Ed Schonberg <schonberg@adacore.com>
7988
7989 * sem_ch3.adb (Build_Discriminant_Constraints): Set
7990 Original_Discriminant only if the parent type is a generic formal.
7991
deb8dacc
HK
79922011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
7993
7994 * exp_ch13.adb: Add with and use clause for Targparm;
7995 (Expand_N_Free_Statement): Prevent the generation of a custom
7996 Deallocate on .NET/JVM targets since this requires pools and address
7997 arithmetic.
7998 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
7999 .NET/JVM targets, attach the newly allocated object to the access
8000 type's finalization collection. Do not generate a call to
8001 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
8002 exist in the runtime.
8003 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
8004 create a custom Allocate for object that do not require initialization.
8005 Attach a newly allocated object to the access type's finalization
8006 collection on .NET/JVM.
8007 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
8008 assignment of controlled types on .NET/JVM. The two hidden pointers
8009 Prev and Next and stored and later restored after the assignment takes
8010 place.
8011 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
8012 kludge for .NET/JVM to recognize a particular piece of code coming from
8013 Heap_Management and change the call to Finalize into Deep_Finalize.
8014 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
8015 finalization collections on .NET/JVM only for types derived from
8016 Controlled. Separate the association of storage pools with a collection
8017 and only allow it on non-.NET/JVM targets.
8018 (Make_Attach_Call): New routine.
8019 (Make_Detach_Call): New routine.
8020 (Process_Object_Declarations): Suppress the generation of
8021 build-in-place return object clean up code on .NET/JVM since it uses
8022 pools.
8023 * exp_ch7.ads (Make_Attach_Call): New routine.
8024 (Make_Detach_Call): New routine.
8025 * exp_intr.adb Add with and use clause for Targparm.
8026 (Expand_Unc_Deallocation): Detach a controlled object from a collection
8027 on .NET/JVM targets.
8028 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
8029 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
8030 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
8031 names used in finalization.
8032
80332011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8034
8035 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
8036 (Attach, Detach): Lock the current task when chaining an object onto a
8037 collection.
8038
df3e68b1
HK
80392011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
8040
8041 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
8042 Rewritten to create the message strings when the exception is not
8043 raised by an abort during finalization.
8044 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
8045 Raise_From_Controlled_Operation and update its associated comment.
8046 * a-fihema.ads, a-fihema.adb: New GNAT unit.
8047 Ada.Finalization.Heap_Management provides key functionality
8048 associated with controlled objects on the heap, their creation,
8049 finalization and reclamation. Type Finalization_Collection is
8050 effectively a wrapper which sits ontop of a storage pool and performs
8051 all necessary bookkeeping for all the objects it contains. Each
8052 access-to-controlled or access-to-class-wide type receives a collection
8053 as part of its expansion. The compiler generates buffer code and
8054 invokes Allocate / Deallocate to create and destroy allocated
8055 controlled objects.
8056 * a-finali.adb ("="): Removed.
8057 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
8058 fields Prev and Next.
8059 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
8060 A library unit with at least one controlled object on the library level
8061 has a special finalizer which is invoked by the binder. To signal this,
8062 ali files carry field PF.
8063 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
8064 associated comment on field usage.
8065 * a-tags.adb (Get_RC_Offset): Removed.
8066 (Needs_Finalization): New routine.
8067 * a-tags.ads: Update the structure of the GNAT dispatch tables.
8068 Dispatch tables now carry field Needs_Finalization which provides
8069 runtime indication whether a type is controlled or has controlled
8070 components or both. Remove field RC_Offset.
8071 (Get_RC_Offset): Removed along with its associated pragma Export.
8072 Since tagged types with controlled components no longer carry hidden
8073 field _controller, the special mechanism to retrieve its location is no
8074 longer needed.
8075 (Needs_Finalization): New routine.
8076 * atree.ads, atree.adb (Elist24): New routine.
8077 (Set_Elist24): New routine.
8078 * atree.h: Add a define clause for Elist24.
8079 * bindgen.adb New library-level variable Lib_Final_Built.
8080 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
8081 presence of a VM target, the routine generates calls to the proper
8082 library finalization routine.
8083 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
8084 targets. Set the correct library finalization routine depending on
8085 whether the library has controlled objects or this is a VM compilation.
8086 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
8087 to library-level finalizers of compiled units in reverse order of
8088 elaboration. It also produces exception management code and reraises a
8089 potential exception after all units have been finalized.
8090 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
8091 library-level finalizers of compiled units in reverse order of
8092 elaboration.
8093 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
8094 definitions of all library-level finalizers available to the compilation
8095 (Gen_Main_Ada): Directly call Adafinal which now contails all target
8096 dependent code.
8097 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
8098 System.Standard_Library.Adafinal directly. If the library needs
8099 finalization actions, create the sequence of finalization calls.
8100 (Gen_Output_File_Ada): Alphabetize local variables and constants.
8101 Generate a with clause for System.Soft_Links when compiling for a VM.
8102 Remove the code which imports System.Standard_Library.Adafinal as
8103 Do_Finalize. Generate the library finalization routine.
8104 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
8105 If the library needs finalization actions, create all the definitions
8106 of library- level finalizers.
8107 (Has_Finalizer): New routine. Determines whether at least one compiled
8108 unit has a library-level finalizer.
8109 Add type Qualification_Mode.
8110 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
8111 * einfo.adb: New usage of field 15 as Return_Flag.
8112 Remove Finalization_Chain_Entity from the usages of field 19.
8113 Remove Associated_Final_Chain from the usages of field 23.
8114 New usage of field 23 as Associated_Collection.
8115 New usage of field 24 as Finalizer.
8116 New usage of flag 252 as Is_Processed_Transient.
8117 (Associated_Final_Chain): Removed.
8118 (Associated_Collection): New routine.
8119 (Finalization_Chain_Entity): Removed.
8120 (Finalizer): New routine.
8121 (Is_Finalizer): New routine.
8122 (Is_Processed_Transient): New routine.
8123 (Return_Flag): New routine.
8124 (Set_Associated_Final_Chain): Removed.
8125 (Set_Associated_Collection): New routine.
8126 (Set_Finalization_Chain_Entity): Removed.
8127 (Set_Finalizer): New routine.
8128 (Set_Is_Processed_Transient): New routine.
8129 (Set_Return_Flag): New routine.
8130 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
8131 displayed flags.
8132 (Write_Field8_Name): Alphabetize the output.
8133 (Write_Field11_Name): Alphabetize the output.
8134 (Write_Field12_Name): Alphabetize the output.
8135 (Write_Field13_Name): Alphabetize the output.
8136 (Write_Field14_Name): Alphabetize the output.
8137 (Write_Field15_Name): Alphabetize the output.
8138 (Write_Field16_Name): Alphabetize the output.
8139 (Write_Field17_Name): Alphabetize the output.
8140 (Write_Field18_Name): Alphabetize the output.
8141 (Write_Field19_Name): Alphabetize the output. Remove the output of
8142 Finalization_Chain_Entity.
8143 (Write_Field20_Name): Alphabetize the output.
8144 (Write_Field21_Name): Alphabetize the output.
8145 (Write_Field22_Name): Alphabetize the output.
8146 (Write_Field23_Name): Alphabetize the output. Remove the output of
8147 Associated_Final_Chain. Add output for Associated_Collection.
8148 (Write_Field24_Name): Alphabetize the output.
8149 (Write_Field25_Name): Add output for Finalizer.
8150 (Write_Field26_Name): Alphabetize the output.
8151 (Write_Field27_Name): Alphabetize the output.
8152 (Write_Field28_Name): Alphabetize the output.
8153 * einfo.ads: Add new field description for Associated_Collection and
8154 its uses in nodes.
8155 Remove Associated_Final_Chain and its uses in nodes.
8156 Remove Finalization_Chain_Entity and its uses in nodes.
8157 Add new field description for Finalizer and its uses in nodes.
8158 Add new synthesized attribute Is_Finalizer.
8159 Add new flag description for Is_Processed_Transient and its uses in
8160 nodes.
8161 Add new field description for Return_Flag and its uses in nodes.
8162 (Associated_Final_Chain): Removed along with its pragma Inline.
8163 (Associated_Collection): New routine and pragma Inline.
8164 (Finalization_Chain_Entity): Removed along with its pragma Inline.
8165 (Finalizer): New routine and pragma Inline.
8166 (Is_Finalizer): New routine and pragma Inline.
8167 (Is_Processed_Transient): New routine and pragma Inline.
8168 (Return_Flag): New routine and pragma Inline.
8169 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
8170 (Set_Associated_Collection): New routine and pragma Inline.
8171 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
8172 (Set_Finalizer): New routine and pragma Inline.
8173 (Set_Is_Processed_Transient): New routine and pragma Inline.
8174 (Set_Return_Flag): New routine and pragma Inline.
8175 * exp_aggr.adb: Alphabetize subprograms.
8176 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
8177 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
8178 associated comments. Remove local variables External_Final_List and
8179 Attach.
8180 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
8181 Ancestor. Remove the retrieval of finalization lists. Update the call to
8182 Make_Adjust_Call.
8183 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
8184 lists. Update the call to Late_Expansion.
8185 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
8186 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
8187 (Gen_Assign): Remove the retrieval of the finalization list used to
8188 build the assignment. Update the calls to Make_Init_Call and
8189 Make_Adjust_Call.
8190 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
8191 Remove the mechanism to determine attachment levels and finalization
8192 list retrieval. Remove the processing for coextensions.
8193 (Init_Controller): Removed. Controllers no longer exist.
8194 (Late_Expansion): Remove formals Flist and Obj along with their
8195 associated comments. Update the calls to Build_Record_Aggr_Code and
8196 Build_Array_Aggr_Code.
8197 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
8198 (Expand_N_Freeze_Entity): Add special processing for finalizers which
8199 appear in entry bodies, protected subprograms and task bodies.
8200 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
8201 * exp_ch3.adb (Add_Final_Chain): Removed.
8202 (Build_Array_Init_Proc): Alphabetize local variables.
8203 (Build_Assignment): Alphabetize local variables. Update the call to
8204 Maked_Adjust_Call.
8205 (Build_Class_Wide_Master): Rename local variables to better reflect
8206 their role.
8207 (Build_Discriminant_Assignments): Code reformatting.
8208 (Build_Init_Call_Thru): Code reformatting.
8209 (Build_Init_Procedure): Code reformatting. Generate a special version
8210 of Deep_Finalize which is capable of finalizing all initialized
8211 components and ignore the rest.
8212 (Build_Init_Statements): Rename local variables to better reflect their
8213 role.
8214 Reimplement the mechanism to include the creation and update of an index
8215 variable called a "counter". It is used as a bookmark for tracing
8216 initialized and non-initialized components.
8217 (Build_Initialization_Call): Remove local variable Controller_Typ.
8218 Alphabetize all local variables. Remove the initialization of the
8219 record controller and update the call to Make_Init_Call.
8220 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
8221 New local variable Counter.
8222 (Constrain_Array): Alphabetize.
8223 (Expand_Freeze_Array_Type): Create a collection instead of a
8224 finalization list.
8225 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
8226 Finalize_Address which is used in conjunction with allocated controlled
8227 objects.
8228 (Expand_N_Object_Declaration): Remove the creation of a finalization
8229 list for anonymous access types. Update the calls to Make_Init_Call and
8230 Make_Adjust_Call.
8231 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
8232 retrieval of finalization lists. Remove the expansion of the record
8233 controller. Create TSS primitive Finalize_Address used in conjunction
8234 with controlled objects on the heap. Create finalization collections
8235 for access-to-controlled record components.
8236 (Expand_Record_Controller): Removed.
8237 (Freeze_Type): Remove the freezing of record controllers. Freezing of
8238 class-wide types now requires additional processing. Create
8239 finalization collections for access-to-controlled types.
8240 (Increment_Counter): New routine.
8241 (Make_Counter): New routine.
8242 (Make_Eq_If): Remove the mention of Name_uController.
8243 (Make_Predefined_Primitive_Specs): There is no longer need to skip
8244 types coming from System.Finalization_Root.
8245 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
8246 (Predefined_Primitive_Bodies): There is no longer need to skip types
8247 coming from System.Finalization_Root.
8248 (Stream_Operation_OK): Do not generate stream routines for
8249 type Ada.Finalization.Heap_Management.Finalization_Collection.
8250 * exp_ch3.ads: Alphabetize subprograms.
8251 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
8252 Add with and use clause for Lib.
8253 (Complete_Coextension_Finalization): Removed.
8254 (Complete_Controlled_Allocation): New routine. Create a finalization
8255 collection for anonymous access-to-controlled types. Create a custom
8256 Allocate which interfaces with the back end and the machinery in
8257 Heap_Management.
8258 (Expand_Allocator_Expression): Add necessary calls to
8259 Complete_Controlled_Allocation. Remove the retrieval of finalization
8260 lists. Update the calls to Make_Adjust_Call. Generate a call to
8261 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8262 the associated collection.
8263 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
8264 Code clean up. Remove the retrieval of finalization lists and
8265 attachment levels.
8266 Update the call to Make_Init_Call. Generate a call to
8267 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
8268 the associated collection.
8269 (Get_Allocator_Final_List): Removed. Finalization lists are not
8270 available.
8271 (Suitable_Element): Remove the mention of Name_uController.
8272 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
8273 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
8274 the left hand side, carry out the assignment and adjust the left hand
8275 side.
8276 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
8277 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
8278 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
8279 BIP_Collection and BIPcollection.
8280 (Build_Heap_Allocator): New routine used to allocate the return object
8281 of a build-in-place function onto a collection.
8282 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
8283 (Expand_Call): Do not replace direct calls to Deep routines with their
8284 aliases.
8285 (Expand_N_Extended_Return_Statement): Give all variables shorter names
8286 and update their occurrences. Add a special return flag to monitor the
8287 [ab]normal execution of the function. The flag is set right before the
8288 return statement.
8289 Rewrite the mechanism used to allocate a build-in-place return object
8290 on the heap or on a storage pool.
8291 (Is_Direct_Deep_Call): New routine.
8292 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
8293 build-in-place function call instead of a final list. Build a call to
8294 Set_Finalize_Address_Ptr to decorate the associated collection.
8295 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
8296 order to name the build-in-place function call's result for later
8297 finalization. Add a collection to a build-in-place function call
8298 instead of a final list.
8299 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
8300 build-in-place function call instead of a final list. Remove the code
8301 which moves one final list and transforms it into the actual in a
8302 nested build-in-place call.
8303 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
8304 build-in-place function call instead of a final list.
8305 (Move_Final_List): Removed.
8306 (Needs_BIP_Collection): New routine.
8307 (Needs_BIP_Final_List): Removed.
8308 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
8309 enumeration type BIP_Formal_Kind.
8310 Update the related comment.
8311 (Needs_BIP_Collection): New routine.
8312 (Needs_BIP_Final_List): Removed.
8313 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
8314 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
8315 majority of subprograms in this unit. Add Name_Finalize_Address to
8316 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
8317 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
8318 statements for an array type.
8319 (Build_Adjust_Statements): Create the adjust statements for a record
8320 type.
8321 (Build_Cleanup_Statements): New routine. A procedure which given any
8322 construct containing asynchronous calls, references to _master, or is a
8323 task body, a task allocation or a protected body produces the necessary
8324 runtime calls to clean up these constructs.
8325 (Build_Exception_Handler): New routine.
8326 (Build_Final_List): Removed.
8327 (Build_Finalization_Collection): New routine. A core procedure which
8328 creates a collection to service heap allocated controlled objects
8329 associated with an access-to-controlled type.
8330 (Build_Finalize_Statements): Create the finalization statements for a
8331 record types.
8332 (Build_Finalizer): New routine. A core procedure which given any
8333 construct with declarations and/or statements detects all objects which
8334 need any type of clean up (controlled objects, protected objects) and
8335 generates all necessary code to clean up the said objects in the proper
8336 order.
8337 (Build_Finalizer_Call): New routine.
8338 (Build_Initialize_Statements): Create the initialization statements for
8339 an array type. The generated routine contains code to finalize partially
8340 initialized arrays.
8341 (Build_Object_Declarations): New routine.
8342 (Build_Raise_Statement): New routine.
8343 (Clean_Simple_Protected_Objects): Removed.
8344 (Controller_Component): Removed.
8345 (Enclosing_Function): New routine.
8346 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
8347 either declarations or statements or both.
8348 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
8349 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
8350 package.
8351 (Find_Final_List): Removed.
8352 (Global_Flist_Ref): Removed.
8353 (In_Finalization_Root): Removed.
8354 (Insert_Actions_In_Scope_Around): Determine the range of the transient
8355 scope in terms of tree nodes. Process all transient variables within
8356 that range.
8357 (Make_Adjust_Call): Rewritten. There is no longer an attach call
8358 generated after the adjust.
8359 (Make_Attach_Call): Removed.
8360 (Make_Call): New routine.
8361 (Make_Clean): Removed.
8362 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
8363 build routines.
8364 (Make_Deep_Proc): Rewritten to generate the new profile signature used
8365 in Deep routines.
8366 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
8367 build routines.
8368 (Make_Final_Call): Modified to simply create a call to either
8369 Deep_Finalize or Finalize.
8370 (Make_Finalize_Address_Body): New routine.
8371 (Make_Finalize_Address_Stmts): New routine. A function which produces
8372 TSS primitive Finalize_Address used in conjunction with heap allocated
8373 controlled objects.
8374 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
8375 (Make_Init_Call): Rewritten. There is no longer an attach call
8376 generated after initialization.
8377 (Make_Local_Deep_Finalize): New routine.
8378 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8379 (Make_Transient_Block): Remove the finalization list retrieval and
8380 manipulation.
8381 (Needs_Finalization): Moved to Exp_Util.
8382 (Parent_Field_Type): New routine.
8383 (Preprocess_Components): New routine.
8384 (Process_Transient_Objects): New routine.
8385 (Wrap_HSS_In_Block): New routine.
8386 (Wrap_Transient_Declaration): Remove finalization list management and
8387 controller insertion.
8388 (Wrap_Transient_Expression): Code reformatting.
8389 (Wrap_Transient_Statement): Code reformatting.
8390 * exp_ch7.ads (Build_Final_List): Removed.
8391 (Build_Finalization_Collection): New routine.
8392 (Build_Raise_Statement): New routine.
8393 (Controller_Component): Removed.
8394 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
8395 (Find_Final_List): Removed.
8396 (In_Finalization_Root): Removed.
8397 (Is_Simple_Protected_Type): Update related comment.
8398 (Make_Adjust_Call): New parameter profile and associated comments.
8399 (Make_Attach_Call): Removed.
8400 (Make_Final_Call): New parameter profile and associated comments.
8401 (Make_Finalize_Address_Body): New routine.
8402 (Make_Init_Call): New parameter profile and associated comments.
8403 (Make_Local_Deep_Finalize): New routine.
8404 (Make_Set_Finalize_Address_Ptr_Call): New routine.
8405 (Needs_Finalization): Moved to Exp_Util.
8406 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
8407 (Expand_N_Protected_Body): Remove the handling of finalization lists.
8408 (Find_Protection_Type): Moved to Exp_Util.
8409 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
8410 (Make_DT): Update sequence of dispatch table initialization. Remove the
8411 initialization of field RC_Offset. Add initialization of field Needs_
8412 Finalization.
8413 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
8414 Reimplement how an object is first finalized, then deallocated.
8415 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
8416 Code reformatting.
8417 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
8418 Register TSS_Finalize_Address with type TSS_Names.
8419 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
8420 procedure provides the interface between an allocation / deallocation
8421 and the support machinery in Ada.Finalization.Heap_Management.
8422 (Find_Init_Call): Code reformatting.
8423 (Find_Init_Call_In_List): Code reformatting.
8424 (Find_Protection_Type): Moved from Exp_Ch9.
8425 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
8426 (Has_Controlled_Coextensions): Removed.
8427 (Has_Controlled_Objects): New routine.
8428 (In_Library_Level_Package_Body): New routine.
8429 (Insert_Action_After): New routine.
8430 (Is_Finalizable_Transient): New routine. This predicate determines
8431 whether an object declaration is one of the many variants of controlled
8432 transients.
8433 (Is_Null_Access_BIP_Func_Call): New routine.
8434 (Is_Non_BIP_Func_Call): New routine.
8435 (Is_Related_To_Func_Return): New routine.
8436 (Needs_Finalization): Moved from Exp_Ch7.
8437 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
8438 (Find_Protection_Type): Moved from Exp_Ch9.
8439 (Has_Controlled_Coextensions): Removed.
8440 (Has_Controlled_Objects): New routine.
8441 (In_Library_Level_Package_Body): New routine.
8442 (Insert_Action_After): New routine.
8443 (Is_Finalizable_Transient): New routine.
8444 (Is_Null_Access_BIP_Func_Call): New routine.
8445 (Is_Non_BIP_Func_Call): New routine.
8446 (Is_Related_To_Func_Return): New routine.
8447 (Needs_Finalization): Moved from Exp_ch7.
8448 * expander.adb (Expand): Add a case for N_Free_Statement.
8449 * freeze.adb (Freeze_All): Replace the generation of a finalization
8450 list with a collection for access-to-controlled types.
8451 (Freeze_Entity): Code reformatting.
8452 (Freeze_Record_Type): Remove the freezing of a record controller
8453 component.
8454 (Freeze_Subprogram): Code reformatting.
8455 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
8456 finalization list.
8457 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
8458 has a library-level finalizer.
8459 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
8460 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
8461 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
8462 files. Add a-fihema to the list of object files.
8463 * par-ch4.adb:
8464 Alphabetize the associations in type Is_Parameterless_Attribute.
8465 * rtsfind.ads: Ada.Finalization_List.Controller and
8466 System.Finalization_Implementation are no longer a GNAT unit.
8467 Update the range of type Ada_Finalization_Child. Remove the following
8468 recoverable entities:
2c7f9cc0 8469
df3e68b1
HK
8470 RE_Attach_To_Final_List
8471 RE_Deep_Tag_Attach
8472 RE_Finalize_List
8473 RE_Finalize_One
8474 RE_Finalizable_Ptr_Ptr
8475 RE_Global_Final_List
8476 RE_Limited_Record_Controller
8477 RE_List_Controller
8478 RE_Move_Final_List
8479 RE_Record_Controller
8480 RE_Simple_List_Controller
2c7f9cc0 8481
df3e68b1 8482 Add the following recoverable entities:
2c7f9cc0 8483
df3e68b1
HK
8484 RE_Add_Offset_To_Address
8485 RE_Allocate
8486 RE_Base_Pool
8487 RE_Deallocate
8488 RE_Exception_Identity
8489 RE_Finalization_Collection
8490 RE_Finalization_Collection_Ptr
8491 RE_Needs_Finalization
8492 RE_Save_Library_Occurrence
8493 RE_Set_Finalize_Address_Ptr
8494 RE_Set_Storage_Pool_Ptr
8495 RE_Storage_Count
8496 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
8497 Name_uController.
8498 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
8499 (First_Stored_Discriminant): Remove the mention of Name_uController.
8500 * sem_aux.ads: Comment reformatting.
8501 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
8502 to redecorate an already existing class-wide type.
8503 (Decorate_Tagged_Type): New parameter profile and associated comment.
8504 Create a "shadow class-wide type" for a shadow entity.
8505 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
8506 of the final chain along with the associated comment.
8507 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
8508 Full_Desig and set it to the full view of the designated type.
8509 Initialize the finalization collection to empty.
8510 (Build_Derived_Record_Type): Alphabetize local variables. Code
8511 reformatting.
8512 (Collect_Fixed_Components): Remove the mention of Name_uController.
8513 (Create_Constrained_Components): Remove the mention of Name_uController.
8514 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
8515 class-wide type of a shadow entity.
8516 (Process_Full_View): Update the machinery which marks type
8517 Limited_Controlled's entity as limited.
8518 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
8519 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
8520 list, instead make a collection build-in-place formal.
8521 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
8522 a designated type in order to establish a match between the renaming
8523 and the renamed entity.
8524 (Find_Selected_Component): Add guard to prevent spurious exceptions
8525 from being raised on .NET/JVM.
8526 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
8527 to the list of primitive that need special processing. Update arrays
8528 C_Names and D_Names.
8529 (Replace_Types): Handle class-wide types.
8530 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
8531 different parameter profile, look at the first formal.
8532 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
8533 use clauses for Exp_Util.
8534 * sem_res.adb: Remove with and use clauses for Elists.
8535 (Propagate_Coextensions): Removed.
8536 (Resolve_Allocator): Do not propagate the list of coextensions from one
8537 allocator to another.
8538 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
8539 Deaccessed_T to Desig_Typ.
8540 (Enter_Name): Remove the mention of Name_uController.
8541 (Gather_Components): Remove the mention of Name_uController.
8542 (Incomplete_Or_Private_View): New routine.
8543 (Is_Coextension_Root): Removed.
8544 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
8545 * sem_util.ads (Incomplete_Or_Private_View): New routine.
8546 (Is_Coextension_Root): Removed.
8547 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
8548 Controlled types are now derived from a null tagged record. Remove
8549 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
8550 * sinfo.adb (Coextensions): Removed.
8551 (Set_Coextensions): Removed.
8552 * sinfo.ads: Remove Coextensions from the explanation of node fields
8553 and its uses in nodes.
8554 Update the field usage of N_Allocator.
8555 (Coextensions): Removed along with its pragma Inline.
8556 (Set_Coextensions): Removed along with its pragma Inline.
8557 * snames.ads-tmpl: Remove names
2c7f9cc0 8558
df3e68b1
HK
8559 Name_uClean
8560 Name_uController
8561 Name_uFinal_List
8562 Name_uLocal_Final_List
8563 Name_Finalization_Root
8564 Name_Next
8565 Name_Prev
2c7f9cc0 8566
df3e68b1 8567 Add names
2c7f9cc0 8568
df3e68b1
HK
8569 Name_uFinalizer
8570 Name_Finalize_Address
8571 * s-pooglo.adb (Allocate): Add overriding indicator.
8572 (Deallocate): Add overriding indicator.
8573 (Storage_Size): Add overriding indicator.
8574 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
8575 than Finalize_Global_List.
8576 (Null_Finalize_Global_List): Removed.
8577 (Save_Library_Occurrence): New routine.
8578 * s-soflin.ads: Remove variable Finalize_Global_List along with its
8579 initialization. Add variable Finalize_Library_Objects along with its
8580 pragma Export. Add variables Library_Exception and
8581 Library_Exception_Set along with their pragma Export.
8582 (Null_Finalize_Global_List): Removed.
8583 (Save_Library_Occurrence): New routine.
8584 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
8585 rather than Finalize_Global_List.
8586 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
8587 of the constructed node.
8588
2ee06322
RO
85892011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8590
8591 * link.c: Include "auto-host.h" before system headers.
8592
f77b022b
VC
85932011-08-03 Vincent Celier <celier@adacore.com>
8594
8595 * make.adb (Gnatmake): Add to table Library_Projs only library projects
8596 that are not extended. Do not check if a library project that is
8597 extended should be regenerated. Do not add to table Library_Paths the
8598 libraries that are in extended projects. Link only with libraries that
8599 are in libray projects that are not extended.
8600 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
8601 for a library project that is extended.
8602
0187b60e
AC
86032011-08-03 Gary Dismukes <dismukes@adacore.com>
8604
8605 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
8606 conforming subprogram renamings that appear to be completions if they
8607 are not fully conformant.
8608 Such renamings are homographs but not completions.
8609 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
8610 names in a subprogram renaming that appears in an instance.
8611
86122011-08-03 Ed Schonberg <schonberg@adacore.com>
8613
8614 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
8615 not immutably limited, build actual subtype from expression to provide
8616 proper bounds to caller.
8617
86182011-08-03 Gary Dismukes <dismukes@adacore.com>
8619
8620 * sem_ch8.adb: Minor comment correction.
8621
86222011-08-03 Thomas Quinot <quinot@adacore.com>
8623
8624 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
8625 returning a limited array, use an extended return statement.
8626
86272011-08-03 Vincent Celier <celier@adacore.com>
8628
8629 * make.adb (Initialize): If --subdirs= is used, but no project file is
8630 specified, attempt to create the specify subdir if it does not already
8631 exist and use it as the object directory as if -D had been specified.
8632
86332011-08-03 Arnaud Charlet <charlet@adacore.com>
8634
8635 * s-tpopsp-vms.adb: New file.
8636 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
8637 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
8638
e280f981
AC
86392011-08-03 Emmanuel Briot <briot@adacore.com>
8640
8641 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
8642 package.
8643
86442011-08-03 Yannick Moy <moy@adacore.com>
8645
8646 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
8647 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
8648 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
8649 detect that an array has static bounds.
8650
98c99a5a
AC
86512011-08-03 Thomas Quinot <quinot@adacore.com>
8652
8653 * exp_dist.adb: Minor reformatting.
8654
86552011-08-03 Arnaud Charlet <charlet@adacore.com>
8656
8657 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
8658 (ATCB_Key): Removed, not always used.
8659
86602011-08-03 Emmanuel Briot <briot@adacore.com>
8661
8662 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
8663 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
8664 most remaining global variables.
8665
686d0984
AC
86662011-08-03 Robert Dewar <dewar@adacore.com>
8667
8668 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
8669 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
8670 reformatting.
8671
86722011-08-03 Javier Miranda <miranda@adacore.com>
8673
8674 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
8675 that must be passed by copy in VM targets.
8676
86772011-08-03 Emmanuel Briot <briot@adacore.com>
8678
8679 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
8680 duplicates a similar htable now in the project tree.
8681
86822011-08-03 Claire Dross <dross@adacore.com>
8683
8684 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
8685 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
8686 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
8687 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
8688 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
8689 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
8690 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
8691 update.
8692
86932011-08-03 Arnaud Charlet <charlet@adacore.com>
8694
8695 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
8696 (ATCB_Key): Removed, not always used.
8697 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
8698 s-taprop-posix.adb.
8699 * s-tpopsp-tls.adb: New file.
8700 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
8701 x86/x64/ia64/powerpc/sparc Linux.
8702
87032011-08-03 Arnaud Charlet <charlet@adacore.com>
8704
8705 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
8706 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
8707
87082011-08-03 Thomas Quinot <quinot@adacore.com>
8709
8710 * rtsfind.ads, exp_dist.adb, exp_dist.ads
8711 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
8712 Fix type selection for mapping integer types to PolyORB types.
8713
87142011-08-03 Bob Duff <duff@adacore.com>
8715
8716 * sem_ch7.adb: Minor comment clarification.
8717
87182011-08-03 Bob Duff <duff@adacore.com>
8719
8720 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
8721 an error analyzing a choice, skip further processing. Further
8722 processing could cause a crash or cascade errors.
8723
40ecf2f5
EB
87242011-08-03 Emmanuel Briot <briot@adacore.com>
8725
8726 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
8727 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
8728 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
8729 prj-env.ads (Shared_Project_Tree_Data): new type
8730 An aggregate project and its aggregated trees need to share the common
8731 data structures used for lists of strings, packages,... This makes the
8732 code simpler since otherwise we have to pass the root tree (also used
8733 for the configuration file data) in addition to the current project
8734 tree. This also avoids ambiguities as to which tree should be used.
8735 And finally this saves a bit of memory.
8736 (For_Every_Project_Imported): new parameter Tree.
8737 Since aggregated projects are using a different tree, we need to let
8738 the caller know which tree to use to manipulate the returned project.
8739
9fde638d
RD
87402011-08-03 Robert Dewar <dewar@adacore.com>
8741
8742 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
8743 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
8744 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
8745 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
8746
95eb8b69
AC
87472011-08-03 Javier Miranda <miranda@adacore.com>
8748
8749 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
8750 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
8751
87522011-08-03 Bob Duff <duff@adacore.com>
8753
8754 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
8755 the Base_Type.
8756
87572011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
8758
8759 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
8760 g-sehash.ads: Fix typo. Update header.
8761
87622011-08-03 Thomas Quinot <quinot@adacore.com>
8763
8764 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
8765 expansion.
8766
87672011-08-03 Gary Dismukes <dismukes@adacore.com>
8768
8769 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
8770 prefixes of private types along with records, since the selector may be
8771 a discriminant.
8772 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
8773 private types along with records, since the selector may be a
8774 discriminant.
8775
92e77027
AC
87762011-08-03 Emmanuel Briot <briot@adacore.com>
8777
b2f7ebc1 8778 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
92e77027
AC
8779
87802011-08-03 Javier Miranda <miranda@adacore.com>
8781
8782 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
8783 Tagged_Type_Expansion.
8784
87852011-08-03 Yannick Moy <moy@adacore.com>
8786
b2f7ebc1
GP
8787 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
8788 violation when the argument of concatenation is the name of a
8789 constant.
92e77027 8790
ab29a348
EB
87912011-08-03 Emmanuel Briot <briot@adacore.com>
8792
8793 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
8794 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
8795 (Process_Declarative_Items): new parameter Child_Env.
8796
9466892f
AC
87972011-08-03 Yannick Moy <moy@adacore.com>
8798
589ef536
GP
8799 * alfa.ads: Update format of ALFA section in ALI file in order to
8800 add a mapping from bodies to specs when both are present.
8801 (ALFA_Scope_Record): Add components for spec file/scope.
8802 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
8803 present.
8804 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
8805 collected, fill in the spec information when relevant.
8806 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9466892f
AC
8807 present.
8808
88092011-08-03 Eric Botcazou <ebotcazou@adacore.com>
8810
8811 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
8812 code unit to decide whether to add internally generated subprograms.
2c7f9cc0 8813
9466892f
AC
88142011-08-03 Javier Miranda <miranda@adacore.com>
8815
8816 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
589ef536
GP
8817 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
8818 be handled by copy in VM targets.
9466892f
AC
8819
88202011-08-03 Emmanuel Briot <briot@adacore.com>
8821
589ef536 8822 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9466892f
AC
8823 code with Makeutl.Get_Switches.
8824 * prj-tree.adb: Update comment.
8825
b5ea9143
AC
88262011-08-03 Thomas Quinot <quinot@adacore.com>
8827
8828 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
8829 subprogram with a limited formal that does not support external
8830 streaming.
8831
88322011-08-03 Yannick Moy <moy@adacore.com>
8833
8834 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
8835 continuation line
8836 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
8837 not from current unit in two phases, because it is not possible to
8838 change the table while iterating over its content.
8839 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
8840
88412011-08-03 Sergey Rybin <rybin@adacore.com>
8842
8843 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
8844 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
8845
668a19bc
ES
88462011-08-03 Ed Schonberg <schonberg@adacore.com>
8847
8848 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
8849 and the component type is composite, this is ambiguous for predefined
8850 concatenation, but if the node is not overloaded and the entity is a use
8851 -defined function its profile can be used to resolve that aggregate.
8852
170b2989
AC
88532011-08-03 Robert Dewar <dewar@adacore.com>
8854
8855 * exp_ch4.adb: Minor code cleanup.
8856
88572011-08-03 Thomas Quinot <quinot@adacore.com>
8858
8859 * exp_dist.adb: Do not generate distribution stubs if serious errors
8860 have been diagnosed.
8861
88622011-08-03 Ed Schonberg <schonberg@adacore.com>
8863
8864 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
8865 the first formal of a primitive operation, go to the base type to
8866 handle properly an access to a derived type with constrained
8867 discriminants.
8868 * sem_type.adb (Disambiguate): an immediately visible operator hides a
8869 user-defined function that is only use-visible.
170b2989 8870
e917aec2
RD
88712011-08-03 Robert Dewar <dewar@adacore.com>
8872
8873 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
8874 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
8875 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
8876 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
8877 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
8878 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
8879 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
8880 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
8881
88822011-08-03 Robert Dewar <dewar@adacore.com>
8883
8884 * repinfo.adb (List_Mechanism): Add handling of
8885 Convention_Ada_Pass_By_XXX.
8886 * sem_mech.adb (Set_Mechanism): Ditto.
8887 * sem_prag.adb (Process_Convention): Add entries for
8888 Convention_Ada_Pass_By_XXX.
8889 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
8890
49bfcf43
AC
88912011-08-03 Pascal Obry <obry@adacore.com>
8892
8893 * makeutl.adb: Minor reformatting.
8894
88952011-08-03 Vincent Celier <celier@adacore.com>
8896
8897 * fname-uf.adb
8898 (Get_File_Name) If the file cannot be found when there are no config
8899 pragmas file and May_Fail is True, return No_File instead of the file
8900 name, to be consistent.
8901
89022011-08-03 Pascal Obry <obry@adacore.com>
8903
8904 * adaint.c (__gnat_is_executable_file_attr): Avoid access
8905 to null pointer.
8906
89072011-08-03 Javier Miranda <miranda@adacore.com>
8908
8909 * sem_ch13.adb
8910 (Same_Representation): In VM targets the representation of arrays with
8911 aliased components differs from arrays with non-aliased components.
8912
34798441
EB
89132011-08-03 Emmanuel Briot <briot@adacore.com>
8914
8915 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
8916 not systematically lower case attribute indexes that contain no "."
8917 Fix definition of several Naming attributes, which take
8918 a unit name as index and therefore should be case insensitive.
8919 Minor refactoring (reduce length of variable names).
8920
89212011-08-03 Emmanuel Briot <briot@adacore.com>
8922
8923 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
8924
4437a530
EB
89252011-08-03 Emmanuel Briot <briot@adacore.com>
8926
8927 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
8928 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
8929 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
8930 prj-tree.ads (Prj.Tree.Environment): new type.
8931
804fe3c4
EB
89322011-08-03 Emmanuel Briot <briot@adacore.com>
8933
8934 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
8935 prj-tree.adb, prj-tree.ads (Environment): new type.
8936
c565bc66
AC
89372011-08-03 Emmanuel Briot <briot@adacore.com>
8938
8939 * prj-tree.ads: Remove unused variable.
8940
89412011-08-03 Yannick Moy <moy@adacore.com>
8942
8943 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
8944 issuing messages related to SPARK restriction violation.
8945
4ee646da
AC
89462011-08-03 Ed Schonberg <schonberg@adacore.com>
8947
8948 * sem_ch6.adb: guard against error nodes in return statements.
8949
89502011-08-03 Arnaud Charlet <charlet@adacore.com>
8951
8952 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
8953 a warning can only appear on a configuration file, so emit warning
8954 without further checks.
8955
89562011-08-03 Arnaud Charlet <charlet@adacore.com>
8957
8958 * s-interr.ads: add overriding keyword.
8959
89602011-08-03 Geert Bosch <bosch@adacore.com>
8961
8962 * exp_attr.adb: Fix minor typo.
8963
89642011-08-03 Ed Schonberg <schonberg@adacore.com>
8965
8966 * par-ch4.adb: improve error recovery.
8967
c0e538ad
AC
89682011-08-03 Emmanuel Briot <briot@adacore.com>
8969
8970 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
8971 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
8972 to Errout_Handling.
8973
89742011-08-03 Emmanuel Briot <briot@adacore.com>
8975
8976 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
8977 "external" as an attribute name in aggregate projects.
8978
89792011-08-03 Jose Ruiz <ruiz@adacore.com>
8980
8981 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
8982 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
8983 from 0, so we need to adjust.
8984
89852011-08-03 Emmanuel Briot <briot@adacore.com>
8986
8987 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
8988 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
8989
c4d67e2d
AC
89902011-08-03 Yannick Moy <moy@adacore.com>
8991
8992 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
8993 restriction on overloaded entity if the entity is not an operator.
8994
89952011-08-03 Yannick Moy <moy@adacore.com>
8996
8997 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
8998 restrict.ads: Rename remaining Check_Formal_Restriction* into
8999 Check_SPARK_Restriction*.
9000
90012011-08-03 Emmanuel Briot <briot@adacore.com>
9002
9003 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
9004 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
9005 qualifier.
9006 (Project_Empty): removed
9007 (Empty_Project): new parameter Qualifier
9008 This is used to have fields specific to aggregate projects, cleaner
9009 New field to store the list of aggregated projects.
9010 (Check_Aggregate_Project): removed
9011 (Process_Aggregated_Projects, Free): new subprograms.
9012
3f5a8fee
AC
90132011-08-03 Olivier Hainque <hainque@adacore.com>
9014
9015 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
9016
90172011-08-03 Ed Schonberg <schonberg@adacore.com>
9018
9019 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
9020 explicit dereference of an unconstrained type, create a constrained
9021 subtype for it, as is done for function calls that return an
9022 unconstrained type.
9023
90242011-08-03 Thomas Quinot <quinot@adacore.com>
9025
9026 * g-pehage.adb (Finalize): Avoid possible double-free.
9027
90282011-08-03 Steve Baird <baird@adacore.com>
9029
9030 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
9031 Elab_Spec/Body attrs in CodePeer_Mode.
9032
90332011-08-03 Javier Miranda <miranda@adacore.com>
9034
9035 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
9036 low bound is not known at compile time but they have no others choice.
9037 Done because in this case the bounds can be obtained directly from the
9038 aggregate.
9039
90402011-08-03 Ed Falis <falis@adacore.com>
9041
9042 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
9043 on VxWorks SMP. Remove unusable constant ANY_CPU.
9044
a96ca600
EB
90452011-08-03 Emmanuel Briot <briot@adacore.com>
9046
9047 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
9048 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
9049 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
9050 Prj.Env.Initialize_Empty): new subprograms
9051 (Get_Env, Find_Project): remove parameter Target_Name.
9052
3e582869
AC
90532011-08-03 Gary Dismukes <dismukes@adacore.com>
9054
9055 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
9056 as a condition for the delayed call to Derived_Subprograms done for the
9057 case of the rewriting of a derived type that constrains the
9058 discriminants of its parent type.
9059 Avoids redundant subprogram derivations for private subtype derivations.
9060
90612011-08-03 Javier Miranda <miranda@adacore.com>
9062
9063 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
9064 Build_Record_Aggr_Code.
9065 (Build_Record_Aggr_Code): Add missing support to initialize hidden
9066 discriminants in extension aggregates.
9067
90682011-08-03 Emmanuel Briot <briot@adacore.com>
9069
9070 * prj-pp.adb (Print): also output project qualifiers, since in
9071 particular "aggregate" is mandatory in an aggregate project.
9072
90732011-08-03 Emmanuel Briot <briot@adacore.com>
9074
9075 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
9076 (Debug_Output): new function.
9077
56e94186
AC
90782011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9079
9080 * gnat_ugn.texi: Document -Wstack-usage.
9081 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
9082
90832011-08-03 Thomas Quinot <quinot@adacore.com>
9084
9085 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
9086 have keyword LIMITED.
9087
90882011-08-03 Yannick Moy <moy@adacore.com>
9089
9090 * alfa.adb, alfa.ads, alfa_test.adb: New files.
9091 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
9092 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
9093 section (does not happen in compiler, only if code directly calls
9094 Scan_ALI).
9095 * get_alfa.adb, get_alfa.ads: New files.
9096 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
9097 needed.
9098 * lib-xref-alfa.adb: New file.
9099 * lib-xref.adb, lib-xref.ads
9100 (Xref_Entry): redefine information needed in cross-references for ALFA.
9101 Push ALFA treatments in separated local package.
9102 (Enclosing_Subpragram_Or_Package): treat specially subprogram
9103 identifiers. Return entity of package body instead of spec. Return
9104 Empty for a scope with no location.
9105 (Generate_Reference): adapt to new components for ALFA information.
9106 Remove the need for D references on definitions.
9107 (Is_Local_Reference): moved to ALFA local package
9108 (Output_References): extract subfunction as Extract_Source_Name
9109 (Output_Local_References): remove procedure, replaced by filtering of
9110 cross-references in package ALFA and printing in Put_ALFA.
9111 (Write_Entity_Name): remove procedure
9112 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
9113 print exact name of entity as it appears in source file
9114 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
9115 * put_alfa.adb, put_alfa.ads: New files.
9116 * xref_lib.adb (Search_Xref): protect read of cross-references against
9117 reading other sections of the ALI file, in gnatxref
9118 (Search): protect read of cross-references against reading other
9119 sections of the ALI file, in gnatfind.
9120 * gcc-interface/Make-lang.in: Update dependencies.
9121
91222011-08-03 Thomas Quinot <quinot@adacore.com>
9123
9124 * sem_ch3.adb: Minor reformatting.
9125
91262011-08-03 Jose Ruiz <ruiz@adacore.com>
9127
9128 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
9129 raising an exception.
9130
91312011-08-03 Ed Schonberg <schonberg@adacore.com>
9132
9133 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
9134 type, always use 1 as the lower bound or string, even if lower bound of
9135 context is not static, to handle properly null strings in a non-static
9136 context.
9137
91382011-08-03 Bob Duff <duff@adacore.com>
9139
9140 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
9141 always legal on the right-hand side of an assignment statement; there
9142 is always an applicable index constraint in this case. Therefore, the
9143 check for Pkind = N_Assignment_Statement is now unconditional -- it
9144 doesn't depend on whether Is_Constrained (Typ).
9145
4317e442
AC
91462011-08-03 Robert Dewar <dewar@adacore.com>
9147
9148 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
9149
91502011-08-03 Ed Schonberg <schonberg@adacore.com>
9151
9152 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
9153 for an itype created within a generic unit.
9154
91552011-08-03 Eric Botcazou <ebotcazou@adacore.com>
9156
9157 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
9158 suppresses all inlining.
9159
53f29d4f
AC
91602011-08-03 Robert Dewar <dewar@adacore.com>
9161
9162 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
9163 exp_aggr.adb: Minor reformatting.
9164
91652011-08-03 Thomas Quinot <quinot@adacore.com>
9166
9167 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
9168 tagged assignment when discriminant checks are suppressed. This is
9169 useless and extremely costly in terms of static stack usage.
9170
91712011-08-03 Bob Duff <duff@adacore.com>
9172
9173 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
9174 of generics, because this leads to the wrong entity in the wrong scope,
9175 causing (e.g.) pragma Export_Procedure to get an error if the entity is
9176 an instance.
9177 (Process_Interface_Name): Follow Alias for instances of generics, to
9178 correct for the above change.
9179
91802011-08-03 Ed Schonberg <schonberg@adacore.com>
9181
9182 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
9183 is an integer literal it is always safe to replace the reference. In
9184 addition, if the reference appears in the generated code for an object
9185 declaration it is necessary to copy because otherwise the reference
9186 might be to the uninitilized value of the discriminant of the object
9187 itself.
9188
91892011-08-03 Pascal Obry <obry@adacore.com>
9190
9191 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
9192 ACL used, in this case we want to check for ending .exe, not .exe
9193 anywhere in the path.
9194
91952011-08-03 Sergey Rybin <rybin@adacore.com>
9196
9197 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
9198 the tree structure (semantic decoration of references to record
9199 discriminants).
9200
c0b11850
AC
92012011-08-03 Gary Dismukes <dismukes@adacore.com>
9202
9203 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
9204 choices of a named array aggregate, bail out when any choices are
9205 marked as Errors_Posted.
9206
92072011-08-03 Ed Schonberg <schonberg@adacore.com>
9208
9209 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
9210 in which entity is frozen, to handle properly loop variables in
9211 iterators.
9212
92132011-08-03 Ed Schonberg <schonberg@adacore.com>
9214
9215 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
9216 subtype is not static, compute the upper bound using attributes, to
9217 handle properly index types that are not integer types.
9218
92192011-08-03 Bob Duff <duff@adacore.com>
9220
9221 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
9222 Update copyright notice.
9223
92242011-08-03 Ed Schonberg <schonberg@adacore.com>
9225
9226 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
9227 Original_Discriminant if within an instance.
9228 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
9229
92302011-08-03 Thomas Quinot <quinot@adacore.com>
9231
9232 * einfo.ads: Minor reformatting.
9233
92342011-08-03 Ed Schonberg <schonberg@adacore.com>
9235
9236 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
9237 composite type with an unfrozen subcomponent, in the profile of a
9238 primitive operation.
9239
5c34e9cd
AC
92402011-08-03 Robert Dewar <dewar@adacore.com>
9241
9242 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
9243
92442011-08-03 Ed Schonberg <schonberg@adacore.com>
9245
9246 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
9247 unconstrained type with discriminants is initialized with an aggregate,
9248 use the constrained subtype of the aggregate as the type of the object,
9249 because it is immutable, and this allows the back-end to generate no
9250 code for the object declaration.
9251
abcd9db2
AC
92522011-08-03 Robert Dewar <dewar@adacore.com>
9253
9254 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
9255 comparison operand is variable, and turns out to be zero or negative.
9256
92572011-08-03 Javier Miranda <miranda@adacore.com>
9258
9259 * exp_intr.adb
9260 (Expand_Dispatching_Constructor_Call): Disable expansion of
9261 code required for native targets. Done to avoid generating
9262 references to unavailable runtime entities in VM targets.
9263 * exp_ch3.adb
9264 (Expand_N_Object_Declaration): Add missing support to handle
9265 the explicit initialization of class-wide interface objects.
9266 Fix documentation.
9267
92682011-08-03 Matthew Heaney <heaney@adacore.com>
9269
7089ef0f
GP
9270 * a-cobove.adb (Merge): Move source onto target, instead of using
9271 Assign.
abcd9db2
AC
9272
92732011-08-03 Matthew Heaney <heaney@adacore.com>
9274
7089ef0f 9275 * a-cbdlli.adb (Splice): Move source items from first to last.
abcd9db2
AC
9276
92772011-08-03 Yannick Moy <moy@adacore.com>
9278
7089ef0f 9279 * sem_util.ads: Add comment.
abcd9db2
AC
9280
92812011-08-03 Javier Miranda <miranda@adacore.com>
9282
9283 * exp_aggr.adb
9284 (Expand_Record_Aggregate): In VM targets disable the expansion into
9285 assignments of aggregates whose type is not known at compile time.
9286
b474d6c3
ES
92872011-08-03 Ed Schonberg <schonberg@adacore.com>
9288
9289 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
9290 protected entries and task entries, to build the proper renaming
9291 declaration for entry formals, used in debugging.
9292 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
9293 parameters in the same way.
9294
0580d807
AC
92952011-08-02 Robert Dewar <dewar@adacore.com>
9296
9297 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
9298 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
9299 code reorganization.
9300
93012011-08-02 Robert Dewar <dewar@adacore.com>
9302
9303 * debug.adb: Debug flag d.P to suppress length comparison optimization
9304 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
9305 comparison of Length by comparing First/Last instead.
9306
93072011-08-02 Matthew Heaney <heaney@adacore.com>
9308
9309 * a-cobove.ads: Code clean up.
9310
b191a125
AC
93112011-08-02 Vincent Celier <celier@adacore.com>
9312
9313 * adaint.c (file_names_case_sensitive_cache): New static int.
9314 (__gnat_get_file_names_case_sensitive): Cache the return value in
9315 file_names_case_sensitive_cache at the first invocation, to avoid
9316 multiple calls to getenv.
9317
93182011-08-02 Bob Duff <duff@adacore.com>
9319
9320 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
9321
316a0661
AC
93222011-08-02 Yannick Moy <moy@adacore.com>
9323
9324 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
9325 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
9326 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
9327 indicate that we are in a precondition or postcondition. This is used in
9328 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
9329 decide whether to flag the spec or body of the current subprogram as
9330 not in ALFA.
9331
93322011-08-02 Fabien Chouteau <chouteau@adacore.com>
9333
9334 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
9335 list.
9336 * a-extiin.ads: New file.
9337
93382011-08-02 Bob Duff <duff@adacore.com>
9339
9340 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
9341 now raises Name_Error instead of Use_Error in certain cases. The other
9342 parts of this AI were already implemented properly.
9343
f9adb9d4
AC
93442011-08-02 Vincent Celier <celier@adacore.com>
9345
9346 * link.c: Only import "auto-host.h" when building the gnattools.
9347
93482011-08-02 Yannick Moy <moy@adacore.com>
9349
9350 * sem_util.adb: Inter-unit inlining does not work for a subprogram
9351 which calls a local subprogram, so extract subprogram
9352 from Mark_Non_ALFA_Subprogram_Body.
9353
93542011-08-02 Javier Miranda <miranda@adacore.com>
9355
9356 * exp_ch9.adb
9357 (Extract_Dispatching_Call): If the type of the dispatching object is an
9358 access type then return an explicit dereference in the Object out-mode
9359 parameter.
9360
93612011-08-02 Gary Dismukes <dismukes@adacore.com>
9362
9363 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
9364 compatibility checks for all indexes of an array subtype, not just the
9365 first. Reset Has_Dynamic_Range_Check on the subtype before each
9366 potential check to ensure that Insert_Range_Checks will not elide any
9367 of the dynamic checks.
9368
93692011-08-02 Yannick Moy <moy@adacore.com>
9370
9371 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
9372 SPARK restriction at parsing time.
9373 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
9374 directive only if the SPARK restriction is set for this unit.
9375
83f33150
YM
93762011-08-02 Yannick Moy <moy@adacore.com>
9377
9378 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
9379 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
9380 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
9381 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
9382 Mark_Non_ALFA_Subprogram_Body.
9383 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
9384 inlined.
9385
7b98672f
YM
93862011-08-02 Yannick Moy <moy@adacore.com>
9387
9388 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
9389 might be costly.
9390
052e0603
AC
93912011-08-02 Robert Dewar <dewar@adacore.com>
9392
9393 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
9394 exp_ch3.adb: Minor reformatting.
9395
93962011-08-02 Emmanuel Briot <briot@adacore.com>
9397
9398 * adaint.c (__gnat_locate_exec_on_path): only returns executable
9399 files, not any regular file.
9400 (__gnat_locate_file_with_predicate): new subprogram.
9401
94022011-08-02 Yannick Moy <moy@adacore.com>
9403
9404 * sinfo.adb, sinfo.ads: Restrict the use of flags
9405 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
9406 nodes, plus N_Subtype_Declaration for the 2nd one.
9407
4fbad0ba
AC
94082011-08-02 Sergey Rybin <rybin@adacore.com>
9409
9410 * gnat_rm.texi: Ramification of pragma Eliminate documentation
9411 - fix bugs in the description of Source_Trace;
9412 - get rid of UNIT_NAME;
9413
052e0603
AC
94142011-08-02 Javier Miranda <miranda@adacore.com>
9415
9416 * exp_ch9.adb
9417 (Build_Dispatching_Requeue): Adding support for VM targets
9418 since we cannot directly reference the Tag entity.
9419 * exp_sel.adb (Build_K): Adding support for VM targets.
9420 (Build_S_Assignment): Adding support for VM targets.
9421 * exp_disp.adb
9422 (Default_Prim_Op_Position): In VM targets do not restrict availability
9423 of predefined interface primitives to compiling in Ada 2005 mode.
9424 (Is_Predefined_Interface_Primitive): In VM targets this service is not
9425 restricted to compiling in Ada 2005 mode.
9426 (Make_VM_TSD): Generate code that declares and initializes the OSD
9427 record. Needed to support dispatching calls through synchronized
9428 interfaces.
9429 * exp_ch3.adb
9430 (Make_Predefined_Primitive_Specs): Enable generation of predefined
9431 primitives associated with synchronized interfaces.
9432 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
9433 primitives associated with synchronized interfaces.
9434
94352011-08-02 Yannick Moy <moy@adacore.com>
9436
9437 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
9438 statements hidden in SPARK if preceded by the HIDE directive
9439 (Parse_Exception_Handlers): mark each exception handler in a sequence of
9440 exception handlers as hidden in SPARK if preceded by the HIDE directive
9441 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
9442 if starting with the HIDE directive
9443 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
9444 starting with the HIDE directive; mark the declarations in a private
9445 part as hidden in SPARK if the private part starts with the HIDE
9446 directive
9447 * restrict.adb, restrict.ads
9448 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
9449 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
9450 argument node belongs to a part which is hidden in SPARK
9451 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
9452 parts in SPARK; protect the possibly costly call to
9453 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
9454 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
9455 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
9456 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
9457 Tok_SPARK_Hide.
9458 (Scan): recognize special comment starting with '#' and followed by
9459 SPARK keyword "hide" as a HIDE directive.
9460
94612011-08-02 Yannick Moy <moy@adacore.com>
9462
9463 * types.ads, erroutc.ads: Minor reformatting.
9464
94652011-08-02 Vincent Celier <celier@adacore.com>
9466
9467 * link.c: Add response file support for cross platforms.
9468
94692011-08-02 Ed Schonberg <schonberg@adacore.com>
9470
9471 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
9472 in an association, set parent field of copy before partial analysis.
9473 * sem_res.adb (Resolve_Slice): create reference to itype only when
9474 expansion is enabled.
9475
94762011-08-02 Yannick Moy <moy@adacore.com>
9477
9478 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
9479 for new flag denoting which subprogram bodies are in ALFA
9480 * restrict.adb, sem_ch7.adb: Update comment
9481 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9482 sem_ch9.adb, sem_res.adb: Add calls to
9483 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
9484 * sem_ch6.adb (Analyze_Function_Return): add calls to
9485 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
9486 middle of the body, and extended return.
9487 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
9488 False when missing return.
9489 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
9490 to True for subprograms whose spec is in ALFA. Remove later on the flag
9491 on the entity used for a subprogram body when there exists a separate
9492 declaration.
9493 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
9494 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
9495 False, otherwise do nothing.
9496
94972011-08-02 Robert Dewar <dewar@adacore.com>
9498
9499 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
9500
95012011-08-02 Yannick Moy <moy@adacore.com>
9502
9503 * sem_ch4.ads: minor formatting.
9504
95052011-08-02 Yannick Moy <moy@adacore.com>
9506
9507 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
9508 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
9509 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
9510 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
9511 opt.ads: cleanup of SPARK mode
9512
95132011-08-02 Yannick Moy <moy@adacore.com>
9514
9515 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
9516 types.
9517 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
9518 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
9519 * sem_ch3.adb
9520 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
9521 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
9522 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
9523 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
9524 types.
9525 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
9526 non-static range.
9527 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
9528 functions whose return type is not in ALFA.
9529 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
9530 specifications.
9531 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
9532 parameter's type is not in ALFA.
9533 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
9534 types are in ALFA.
9535
95362011-08-02 Ed Schonberg <schonberg@adacore.com>
9537
9538 * sem_ch6 (Analyze_Expression_Function): treat the function as
9539 Inline_Always, and introduce a subprogram declaration for it when it is
9540 not a completion.
9541 * inline.adb (Add_Inlined_Body): recognize bodies that come from
9542 expression functions, so that the back-end can determine whether they
9543 can in fact be inlined.
9544 * sem_util.adb (Is_Expression_Function): predicate to determine whether
9545 a function body comes from an expression function.
9546
95472011-08-02 Gary Dismukes <dismukes@adacore.com>
9548
9549 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
9550 null exclusions to test Can_Never_Be_Null on the anonymous access types
9551 of the formals rather than testing the formals themselves. Exclude this
9552 check in cases where the Old_Formal is marked as a controlling formal,
9553 to avoid issuing spurious errors for bodies completing dispatching
9554 operations (due to the flag not getting set on controlling access
9555 formals in body specs).
9556 (Find_Corresponding_Spec): When checking full and subtype conformance of
9557 subprogram bodies in instances, pass Designated and E in that order, for
9558 consistency with the expected order of the formals (New_Id followed by
9559 Old_Id).
9560
95612011-08-02 Robert Dewar <dewar@adacore.com>
9562
9563 * sem_ch8.adb: Minor reformatting.
9564
95652011-08-02 Ed Schonberg <schonberg@adacore.com>
9566
9567 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
9568 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
9569 primitive operations of class-wide actuals.
9570
95712011-08-02 Javier Miranda <miranda@adacore.com>
9572
9573 * exp_atag.ads, exp_atag.adb
9574 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
9575 since its value is implicitly passed in argument Typ.
9576 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
9577 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
9578 Build_Common_Dispatching_Select_Statements.
9579
95802011-08-02 Robert Dewar <dewar@adacore.com>
9581
9582 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
9583 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
9584 Minor reformatting.
9585
95862011-08-02 Robert Dewar <dewar@adacore.com>
9587
9588 * sem_res.adb: Minor reformatting.
9589 * sem_prag.adb: Minor reformatting.
9590
95912011-08-02 Javier Miranda <miranda@adacore.com>
9592
9593 * exp_atag.adb, exp_atags.ads
9594 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
9595 by the tagged type Entity. Required to use this routine in the VM
9596 targets since we do not have available the Tag entity in the VM
9597 platforms.
9598 * exp_ch6.adb
9599 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
9600 Ada.Tags has not been previously loaded.
9601 * exp_ch7.adb
9602 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
9603 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
9604 * sem_aux.adb
9605 (Enclosing_Dynamic_Scope): Add missing support to handle the full
9606 view of enclosing scopes. Required to handle enclosing scopes that
9607 are synchronized types whose full view is a task type.
9608 * exp_disp.adb
9609 (Build_VM_TSDs): Minor code improvement to avoid generating and
9610 analyzing lists with empty nodes.
9611 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
9612 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
9613 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
9614 (Make_Disp_Timed_Select_Body): Add support for VM targets.
9615 (Make_Select_Specific_Data_Table): Add support for VM targets.
9616 (Make_VM_TSD): Generate code to initialize the SSD structure of
9617 the TSD.
9618
96192011-08-02 Yannick Moy <moy@adacore.com>
9620
9621 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
9622 cross-references section in ALI.
9623 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
9624 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
9625 Sub).
9626 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
9627 subprogram or package entity of a node
9628 (Is_Local_Reference_Type): new function returns True for references
9629 selected in local cross-references.
9630 (Lt): function extracted from Lt in Output_References
9631 (Write_Entity_Name): function extracted from Output_References
9632 (Generate_Definition): generate reference with type 'D' for definition
9633 of objects (object declaration and parameter specification), with
9634 appropriate locations and units, for use in local cross-references.
9635 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
9636 references of type 'I' for initialization in object definition.
9637 (Output_References): move part of function Lt and procedure
9638 Write_Entity_Name outside of the body. Ignore references of types 'D'
9639 and 'I' introduced for local cross-references.
9640 (Output_Local_References): new procedure to output the local
9641 cross-references sections.
9642 (Lref_Entity_Status): new array defining whether an entity is a local
9643 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
9644 with 'I' type when initialization expression is present.
9645 * get_scos.adb, get_scos.ads: Correct comments and typos
9646
96472011-08-02 Javier Miranda <miranda@adacore.com>
9648
9649 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
9650 the JVM target.
9651 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
9652 the JVM target.
9653 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
9654 TSD support.
9655
96562011-08-02 Vincent Celier <celier@adacore.com>
9657
9658 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
9659 (No_Space_Img): New function
9660 (Find_Excluded_Sources): When reading from a file, record the file name
9661 and the line number for each excluded source.
9662 (Mark_Excluded_Sources): When reporting an error, if the excluded
9663 sources were read from a file, include file name and line number in
9664 the error message.
9665
96662011-08-02 Ed Schonberg <schonberg@adacore.com>
9667
9668 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
9669
96702011-08-02 Robert Dewar <dewar@adacore.com>
9671
9672 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
9673
96742011-08-02 Javier Miranda <miranda@adacore.com>
9675
9676 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
9677 generation of TSDs to the DOTNET compiler.
9678 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
9679 generation of TSDs to the DOTNET compiler.
9680
96812011-08-02 Javier Miranda <miranda@adacore.com>
9682
9683 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
9684 record of all the tagged types declared inside library level package
9685 declarations, library level package bodies or library level subprograms.
9686 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
9687 associated with a given tagged type.
9688 (Build_VM_TSDs): New subprogram.
9689 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
9690 compilation units that are subprograms.
9691 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
9692 compilation units that are package bodies.
9693 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
9694 units that are a package declaration or a package instantiation.
9695 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
9696 reorganization to improve the error generated by the frontend when the
9697 function Ada.Tags.Secondary_Tag is not available.
9698 * rtsfind.ads (RE_Register_TSD): New runtime entity.
9699 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
9700
97012011-08-02 Javier Miranda <miranda@adacore.com>
9702
9703 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
9704
97052011-08-02 Robert Dewar <dewar@adacore.com>
9706
9707 * s-imenne.ads: Minor reformatting.
9708
97092011-08-02 Robert Dewar <dewar@adacore.com>
9710
9711 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
9712 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
9713 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
9714
97152011-08-02 Robert Dewar <dewar@adacore.com>
9716
9717 * einfo.ads (Materialize_Entity): Document this is only for renamings
9718 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
9719 required debug information in the case where we transform the object
9720 declaration into a renaming declaration.
9721 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
9722 object
9723 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
9724 Materialize_Entity.
9725
97262011-08-02 Robert Dewar <dewar@adacore.com>
9727
9728 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
9729 Suppress_Init_Procs.
9730 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
9731 Suppress_Initialization/Initialization_Suppressed.
9732 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
9733 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
9734 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
9735 * sem_prag.adb: New processing for pragma Suppress_Initialization.
9736
97372011-08-02 Robert Dewar <dewar@adacore.com>
9738
9739 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
9740 Minor reformatting.
9741
97422011-08-02 Ed Schonberg <schonberg@adacore.com>
9743
9744 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
9745 only have inheritable classwide pre/postconditions.
9746
97472011-08-02 Javier Miranda <miranda@adacore.com>
9748
9749 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
9750 * rtsfind.ads (RE_Check_TSD): New runtime entity.
9751 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
9752 checks if the external tag of a type is the same as the external tag
9753 of some other declaration.
9754
97552011-08-02 Thomas Quinot <quinot@adacore.com>
9756
9757 * s-taskin.ads: Minor reformatting.
9758
97592011-08-02 Emmanuel Briot <briot@adacore.com>
9760
9761 * g-comlin.adb (Display_Help): swap the order in which it prints the
9762 short help and the general usage.
9763
97642011-08-02 Ed Schonberg <schonberg@adacore.com>
9765
9766 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
9767 the aspect declarations and attach them to the generic copy for
9768 subsequent analysis.
9769 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
9770 declarations of the generic tree to the new subprogram declarations.
9771 * sem_attr.adb (Check_Precondition_Postcondition): recognize
9772 conditions that apply to a subprogram instance.
9773
97742011-08-02 Robert Dewar <dewar@adacore.com>
9775
9776 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
9777
97782011-08-02 Ed Schonberg <schonberg@adacore.com>
9779
9780 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
9781 private type with a tagged full view is not derived in the immediate
9782 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
9783
97842011-08-02 Robert Dewar <dewar@adacore.com>
9785
9786 * exp_ch4.adb: Minor reformatting.
9787
97882011-08-02 Ed Schonberg <schonberg@adacore.com>
9789
9790 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
9791 Ada2012 iterator, the loop will be rewritten during expansion into a
9792 while loop with a cursor and an element declaration. Do not analyze the
9793 body in this case, because if the container is for indefinite types the
9794 actual subtype of the elements will only be determined when the cursor
9795 declaration is analyzed.
9796
97972011-08-02 Arnaud Charlet <charlet@adacore.com>
9798
9799 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
9800 size/alignment related attributes in CodePeer_Mode.
9801
98022011-08-02 Gary Dismukes <dismukes@adacore.com>
9803
9804 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
9805 Prepend_Element, since this can result in the operation getting the
9806 wrong slot in the full type's dispatch table if the full type has
9807 inherited operations. The incomplete type's operation will get added
9808 to the proper position in the full type's primitives
9809 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
9810 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
9811 dispatching operations, since there are cases where nonprimitive
9812 subprograms can get added to the list of incomplete dependents (such
9813 as subprograms in nested packages).
9814 * sem_ch6.adb (Process_Formals): First, remove test for being in a
9815 private part when determining whether to add a primitive with a
9816 parameter of a tagged incomplete type to the Private_Dependents list.
9817 Such primitives can also occur in the visible part, and should not have
9818 been excluded from being private dependents.
9819 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
9820 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
9821 list of a Taft-amendment incomplete type is a primitive before issuing
9822 an error that the full type must appear in the same unit. There are
9823 cases where nonprimitives can be in the list (such as subprograms in
9824 nested packages).
9825 * sem_disp.adb (Derives_From): Use correct condition for checking that
9826 a formal's type is derived from the type of the corresponding formal in
9827 the parent subprogram (the condition was completely wrong). Add
9828 checking that was missing for controlling result types being derived
9829 from the result type of the parent operation.
9830
98312011-08-02 Yannick Moy <moy@adacore.com>
9832
9833 * errout.adb (First_Node): minor renaming
9834 * restrict.adb (Check_Formal_Restriction): put restriction warning on
9835 first node.
9836
98372011-08-02 Yannick Moy <moy@adacore.com>
9838
9839 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
9840 before accessing operands.
9841 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
9842 decide whether an initialization expression respects SPARK rules, as
9843 the plain node is the expanded one. This allows for more valid warnings
9844 to be issued.
9845 * gnat_rm.texi: Minor update.
9846
98472011-08-02 Arnaud Charlet <charlet@adacore.com>
9848
9849 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
9850 previous change.
9851
98522011-08-02 Robert Dewar <dewar@adacore.com>
9853
9854 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
9855
98562011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9857
9858 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
9859 loop statements and the element renaming declaration with a block when
9860 the element type is controlled.
9861
98622011-08-02 Yannick Moy <moy@adacore.com>
9863
9864 * sinfo.ads: Minor formatting.
9865
98662011-08-02 Ed Schonberg <schonberg@adacore.com>
9867
9868 * sem_aggr.adb (Add_Association): if the association has a box and no
9869 expression, use the Sloc of the aggregate itself for the new
9870 association.
9871 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
9872 the Original_Node.
9873
98742011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9875
9876 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
9877 When a container is provided via a function call, generate a renaming
9878 of the function result. This avoids the creation of a transient scope
9879 and the premature finalization of the container.
9880 * exp_ch7.adb (Is_Container_Cursor): Removed.
9881 (Wrap_Transient_Declaration): Remove the supression of the finalization
9882 of the list controller when the declaration denotes a container cursor,
9883 it is not needed.
9884
98852011-08-02 Yannick Moy <moy@adacore.com>
9886
9887 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
9888 node is from source, instead of the original node being from source.
9889 * sem_aggr.adb
9890 (Resolve_Array_Aggregate): refine the check for a static expression, to
9891 recognize also static ranges
9892 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
9893 Array_Type_Declaration): postpone the test for the type being a subtype
9894 mark after the type has been resolved, so that component-selection and
9895 expanded-name are discriminated.
9896 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
9897 to distinguish the case of an iteration scheme, so that an error is
9898 issed on a non-static range in SPARK except in an iteration scheme.
9899 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
9900 In_Iter_Schm = True.
9901 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
9902 user-defined operators so that they are allowed in renaming
9903 * sem_ch8.adb
9904 (Find_Selected_Component): refine the check for prefixing of operators
9905 so that they are allowed in renaming. Move the checks for restrictions
9906 on selector name after analysis discriminated between
9907 component-selection and expanded-name.
9908 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
9909 concatenation argument of string type if it is static.
9910 * sem_util.adb, sem_util.ads
9911 (Check_Later_Vs_Basic_Declarations): add a new function
9912 Is_Later_Declarative_Item to decice which declarations are allowed as
9913 later items, in the two different modes Ada 83 and SPARK. In the SPARK
9914 mode, add that renamings are considered as later items.
9915 (Enclosing_Package): new function to return the enclosing package
9916 (Enter_Name): correct the rule for homonyms in SPARK
9917 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
9918 from source (result of expansion) to avoid issuing wrong warnings.
9919
99202011-08-02 Ed Schonberg <schonberg@adacore.com>
9921
9922 * errout.adb: On anything but an expression First_Node returns its
9923 argument.
9924
99252011-08-02 Pascal Obry <obry@adacore.com>
9926
9927 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
9928
99292011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
9930
9931 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
9932 Set the associated loop as the related expression of internally
9933 generated cursors.
9934 * exp_ch7.adb (Is_Container_Cursor): New routine.
9935 (Wrap_Transient_Declaration): Supress the finalization of the list
9936 controller when the declaration denotes a container cursor.
9937
99382011-08-02 Yannick Moy <moy@adacore.com>
9939
9940 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
9941 command line now.
9942 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
9943 expression is a simple expression. This check cannot be performed in
9944 the semantics, so just drop it.
9945 (P_Index_Or_Discriminant_Constraint): move check that the index or
9946 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
9947 semantics. Other cases were previously checked in the semantics.
9948 * par-ch4.adb (P_Name): move checks that a selector name is not
9949 character literal or an operator symbol to Find_Selected_Component in
9950 the semantics
9951 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
9952 declarations are not placed after later declarations in a separate
9953 procedure in Sem_Util (possibly not the best choice?), to be used both
9954 during parsing, for Ada 83 mode, and during semantic analysis, for
9955 SPARK mode.
9956 * par-endh.adb (Check_End): move check that end label is not missing
9957 to Process_End_Label in the semantics
9958 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
9959 the special case for SPARK restriction
9960 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
9961 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
9962 parameter Force to issue the error message even on internal node (used
9963 for generated end label). Call Check_Restriction to check when an error
9964 must be issued. In SPARK mode, issue an error message even if the
9965 restriction is not set.
9966 (Check_Restriction): new procedure with an additional out parameter to
9967 inform the caller that a message has been issued
9968 * sem_aggr.adb: Minor modification of message
9969 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
9970 instead of issuing an error message directly
9971 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
9972 declarations are not placed after later declarations, by calling
9973 Check_Later_Vs_Basic_Declarations
9974 (Analyze_Subtype_Declaration): move here the check that an index or
9975 discriminant constraint must be a subtype mark. Change the check that
9976 a subtype of String must start at one so that it works on subtype marks.
9977 * sem_ch4.adb (Analyze_Call): move here the check that a named
9978 association cannot follow a positional one in a call
9979 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
9980 instead of issuing an error message directly
9981 * sem_ch8.adb (Find_Selected_Component): move here the check that a
9982 selector name is not a character literal or an operator symbol. Move
9983 here the check that the prefix of an expanded name cannot be a
9984 subprogram or a loop statement.
9985 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
9986 procedure called from parsing and semantics to check that basic
9987 declarations are not placed after later declarations
9988 (Process_End_Label): move here the check that end label is not missing
9989
99902011-08-02 Arnaud Charlet <charlet@adacore.com>
9991
9992 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
9993 representation clause in codepeer mode, since it confuses CodePeer and
9994 does not bring useful info.
9995
99962011-08-02 Ed Falis <falis@adacore.com>
9997
9998 * init.c: initialize fp hw on MILS.
9999
100002011-08-02 Ed Schonberg <schonberg@adacore.com>
10001
10002 * errout.adb (First_Node): for bodies, return the node itself (small
10003 optimization). For other nodes, do not check source_unit if the node
10004 comes from Standard.
10005
100062011-08-02 Robert Dewar <dewar@adacore.com>
10007
10008 * exp_ch3.adb: Minor comment additions.
10009 * sem_ch13.adb: Minor reformatting.
10010
100112011-08-02 Pascal Obry <obry@adacore.com>
10012
10013 * make.adb, makeutl.adb: Removes some superfluous directory separator.
10014
100152011-08-02 Robert Dewar <dewar@adacore.com>
10016
10017 * sem_attr.adb: Minor reformatting.
10018
100192011-08-02 Robert Dewar <dewar@adacore.com>
10020
10021 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
10022 (Has_Default_Component_Value): Removed
10023 * einfo.ads Comment updates
10024 (Has_Default_Aspect): Replaces Has_Default_Value
10025 (Has_Default_Component_Value): Removed
10026 * exp_ch13.adb
10027 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
10028 * exp_ch3.adb
10029 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
10030 (Get_Simple_Init_Val): Handle Default_Value aspect
10031 (Needs_Simple_Initialization): Handle Default_Value aspect
10032 * exp_ch3.ads: Needs_Simple_Initialization
10033 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
10034 * par-prag.adb (Pragma_Default[_Component]Value) Removed
10035 * sem_ch13.adb
10036 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
10037 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
10038 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
10039
100402011-08-02 Ed Schonberg <schonberg@adacore.com>
10041
10042 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
10043 package containing iteration primitives.
10044 exp_ch5.adb (Expand_Iterator_Loop): ditto.
10045
100462011-08-02 Ed Schonberg <schonberg@adacore.com>
10047
10048 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
10049 "of", pre-analyze expression in case it is a function call with
10050 finalization actions that must be placed ahead of the loop.
10051 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
10052 on an Ada2012 iterator, insert them ahead of the rewritten loop.
10053
100542011-08-02 Geert Bosch <bosch@adacore.com>
10055
10056 * cstand.adb (Create_Float_Types): Only consider C's long double for
10057 Long_Long_Float, in addition to double.
10058
100592011-08-02 Robert Dewar <dewar@adacore.com>
10060
10061 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
10062 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
10063 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
10064 Minor reformatting.
10065
100662011-08-02 Ed Schonberg <schonberg@adacore.com>
10067
10068 * sem_attr.adb: handle properly 'Result when it is a prefix of an
10069 indexed component.
10070
100712011-08-02 Javier Miranda <miranda@adacore.com>
10072
10073 * einfo.ads, einfo.adb
10074 (Original_Access_Type): Move this attribute to Node26 since there was
10075 an undocumented use of Node21 in E_Access_Subprogram_Type entities
10076 which causes conflicts and breaks the generation of the .NET compiler.
10077 (Interface_Name): Add missing documentation on JGNAT only uses of
10078 this attribute.
10079
100802011-08-02 Geert Bosch <bosch@adacore.com>
10081
10082 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
10083 (Find_Back_End_Float_Type): Likewise
10084 (Create_Back_End_Float_Types): Likewise
10085 (Create_Float_Types): Likewise
10086 (Register_Float_Type): Likewise
10087 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
10088 Nlist and split out type selection in new local Find_Base_Type function.
10089 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
10090 Nlist
10091 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
10092
100932011-08-02 Robert Dewar <dewar@adacore.com>
10094
10095 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
10096 alpha order).
10097 * opt.ads: Minor comment change.
10098 * sem_ch12.adb: Minor code reorganization.
10099
101002011-08-02 Gary Dismukes <dismukes@adacore.com>
10101
10102 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
10103 subtype's list of rep items to the list on the full subtype in the case
10104 where the lists are the same.
10105
101062011-08-02 Geert Bosch <bosch@adacore.com>
10107
10108 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
10109 using the one from System.Strings, which also deallocates all strings.
10110
101112011-08-02 Geert Bosch <bosch@adacore.com>
10112
10113 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
10114 function.
10115 * gcc-interface/Make-lang.in: Update dependencies.
10116
101172011-08-02 Olivier Hainque <hainque@adacore.com>
10118
10119 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
10120 end_locus.
10121
101222011-08-02 Javier Miranda <miranda@adacore.com>
10123
10124 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
10125 associated with anonymous access to subprograms.
10126
101272011-08-02 Geert Bosch <bosch@adacore.com>
10128
10129 * opt.ads
10130 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
10131 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
10132 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
10133 (Add_Symbol_Definition): Move to switch-c.adb
10134 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
10135 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
10136 (Add_Symbol_Definition): Move to switch-c.adb.
10137 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
10138 * sem_warn.adb
10139 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10140 Move to warnsw.adb.
10141 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
10142 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
10143 Move to warnsw.adb.
10144 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
10145 (Add_Symbol_Definition): Moved from Prepcomp.
10146 * switch-c.ads: Update copyright notice. Use String_List instead of
10147 Argument_List, removing dependency on System.OS_Lib.
10148
101492011-08-02 Yannick Moy <moy@adacore.com>
10150
10151 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
10152 mode on initialization expression which does not respect SPARK
10153 restrictions.
10154 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
10155 if the tree referenced by its argument represents an initialization
10156 expression in SPARK, suitable for initializing an object in an object
10157 declaration.
10158
101592011-08-02 Javier Miranda <miranda@adacore.com>
10160
10161 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
10162 internally generated access to subprogram with its associated protected
10163 subprogram type.
10164 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
10165
101662011-08-02 Geert Bosch <bosch@adacore.com>
10167
10168 * cstand.adb (Register_Float_Type): Print information about type to
10169 register, if the Debug_Flag_Dot_B is set.
10170 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
10171 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
10172 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
10173 with a requested precision of more than Max_Digits digits and no more
10174 than Max_Base_Digits digits, if a range specification is present and the
10175 Predefined_Float_Types list has a suitable type to derive from.
10176 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
10177 case of type completion with pragma Import
10178 * sem_prag.adb
10179 (Process_Import_Predefined_Type): Processing to complete a type
10180 with pragma Import. Currently supports floating point types only.
10181 (Set_Convention_From_Pragma): Do nothing without underlying type.
10182 (Process_Convention): Guard against absence of underlying type,
10183 which may happen when importing incomplete types.
10184 (Process_Import_Or_Interface): Handle case of importing predefined
10185 types. Tweak error message.
10186
101872011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10188
10189 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
10190 functions to previous change. Reorganize code slightly.
10191
101922011-08-02 Geert Bosch <bosch@adacore.com>
10193
10194 * back_end.ads (Register_Type_Proc): New call back procedure type for
10195 allowing the back end to provide information about available types.
10196 (Register_Back_End_Types): New procedure to register back end types.
10197 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
10198 available types.
10199 * cstand.adb (Back_End_Float_Types): New list for floating point types
10200 supported by the back end.
10201 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
10202 (Copy_Float_Type): New procedure to make new copies of predefined types.
10203 (Register_Float_Type): New call back procedure to populate the BEFT list
10204 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
10205 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
10206 (Create_Float_Types): New procedure to create entities for floating
10207 point types predefined in Standard, and put these and any remaining
10208 BEFTs on the Predefined_Float_Types list.
10209 * stand.ads (Predefined_Float_Types): New list for predefined floating
10210 point types that do not have declarations in package Standard.
10211
102122011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10213
10214 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
10215 entity node for the unit containing the parameter.
10216 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
10217 (Add_Inlined_Subprogram): Likewise.
10218 * gcc-interface/Make-lang.in: Update dependencies.
10219
102202011-08-02 Thomas Quinot <quinot@adacore.com>
10221
10222 * s-stusta.adb (Print): Make sure Pos is always initialized to a
10223 suitable value.
10224
102252011-08-02 Geert Bosch <bosch@adacore.com>
10226
10227 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
10228
102292011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10230
10231 * sem_type.adb (Covers): Move trivial case to the top and reuse the
10232 computed value of Base_Type.
10233
102342011-08-02 Yannick Moy <moy@adacore.com>
10235
10236 * restrict.adb (Check_Restriction): issue an error for any use of
10237 class-wide, even if the No_Dispatch restriction is not set.
10238 * sem_aggr.adb: Correct typos in comments and messages in formal mode
10239 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
10240 when completing a private extension, the type named in the private part
10241 is not the same as that named in the visible part.
10242 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
10243 of an inherited primitive operations of a tagged type or type extension
10244 that returns the tagged type.
10245 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
10246 function which returns True for an implicit operation inherited by the
10247 derived type declaration for the argument type.
10248 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
10249 order.
10250
102512011-08-02 Ed Schonberg <schonberg@adacore.com>
10252
10253 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
10254 Process_Bounds, to perform analysis with expansion of a range or an
10255 expression that is the iteration scheme for a loop.
10256 (Analyze_Iterator_Specification): If domain of iteration is given by a
10257 function call with a controlled result, as is the case if call returns
10258 a predefined container, ensure that finalization actions are properly
10259 generated.
10260 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
10261
102622011-08-02 Javier Miranda <miranda@adacore.com>
10263
10264 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
10265 * gcc-interface/Make-lang.in: Update dependencies.
10266
102672011-08-02 Javier Miranda <miranda@adacore.com>
10268
10269 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
10270 determine if the analysis is performed using N or Original_Node (N).
10271 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
10272 functionality of routine Is_Variable avoids code duplication.
10273 * checks.adb (Determine_Range): Handle temporaries generated by
10274 Remove_Side_Effects.
10275
102762011-08-02 Javier Miranda <miranda@adacore.com>
10277
10278 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
10279 expansion of the condition. Required since the previous analysis was
10280 done with expansion disabled (see Resolve_Quantified_Expression) and
10281 hence checks were not inserted and record comparisons have not been
10282 expanded.
10283
102842011-08-02 Ed Falis <falis@adacore.com>
10285
10286 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
10287 Update header.
10288
102892011-08-02 Bob Duff <duff@adacore.com>
10290
10291 * opt.ads: Minor comment fix.
10292
102932011-08-02 Bob Duff <duff@adacore.com>
10294
10295 * sem_ch12.adb (Analyze_Package_Instantiation,
10296 Analyze_Subprogram_Instantiation): Turn off style checking while
10297 analyzing an instance. Whatever style checks that apply to the generic
10298 unit should apply, so it makes no sense to apply them in an instance.
10299 This was causing trouble when compiling an instance of a runtime
10300 unit that violates the -gnatyO switch.
10301 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
10302 one of the two case statements, causing spurious errors.
10303
103042011-08-02 Robert Dewar <dewar@adacore.com>
10305
10306 * uname.adb: Minor reformatting.
10307 * gnatcmd.adb: Minor reformatting.
10308 * exp_attr.adb: Minor reformatting.
10309
103102011-08-02 Ed Schonberg <schonberg@adacore.com>
10311
10312 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
10313 No_Dispatching_Calls, do not look for the Assign primitive, because
10314 predefined primitives are not created in this case.
10315
103162011-08-02 Bob Duff <duff@adacore.com>
10317
10318 * stylesw.ads: Minor comment fixes.
10319
103202011-08-02 Robert Dewar <dewar@adacore.com>
10321
10322 * freeze.adb (Add_To_Result): New procedure.
10323
103242011-08-02 Jose Ruiz <ruiz@adacore.com>
10325
10326 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
10327 time, if the specific run-time routines for handling streams of strings
10328 are not available, use the default mechanism.
10329
103302011-08-02 Arnaud Charlet <charlet@adacore.com>
10331
10332 * s-regpat.ads: Fix typo.
10333
103342011-08-02 Vincent Celier <celier@adacore.com>
10335
10336 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
10337 not null, call it to create the in memory config project file without
10338 parsing an existing default config project file.
10339
103402011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10341
10342 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
10343
103442011-08-02 Ed Schonberg <schonberg@adacore.com>
10345
10346 * sem_elim.adb: an abstract subprogram does not need an eliminate
10347 pragma for its descendant to be eliminable.
10348
103492011-08-02 Ed Falis <falis@adacore.com>
10350
10351 * init.c: revert to handling before previous checkin for VxWorks
10352 * s-intman-vxworks.adb: delete unnecessary declarations related to
10353 using Ada interrupt facilities for handling signals.
10354 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
10355 * s-intman-vxworks.ads: Import __gnat_install_handler as
10356 Initialize_Interrupts.
10357 * s-taprop-vxworks.adb: Delete Signal_Mask.
10358 (Abort_Handler): change construction of mask to unblock exception
10359 signals.
10360
103612011-08-02 Jerome Guitton <guitton@adacore.com>
10362
10363 * a-except-2005.adb (Raise_From_Signal_Handler): Call
10364 Debug_Raise_Exception before propagation starts.
10365
103662011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10367
10368 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
10369 to Restriction_Check_Required.
10370 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
10371 * sem_res.adb (Resolve_Call): Likewise.
10372 * sem_attr.adb (Check_Stream_Attribute): Likewise.
10373
103742011-08-02 Bob Duff <duff@adacore.com>
10375
10376 * stylesw.ads: Update comment.
10377 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
10378 * errout.ads: Remove obsolete comment.
10379
103802011-08-02 Javier Miranda <miranda@adacore.com>
10381
10382 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
10383 (Set_Is_Safe_To_Reevaluate): new procedure.
10384 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
10385 assignment is allowed on safe-to-reevaluate variables.
10386 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
10387 temporary created to remove side effects in expressions that use
10388 the secondary stack as safe-to-reevaluate.
10389 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
10390 variables that are not true constants.
10391
103922011-08-02 Robert Dewar <dewar@adacore.com>
10393
10394 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
10395 sem_res.adb, sem_ch6.adb: Minor reformatting.
10396
103972011-08-02 Jerome Guitton <guitton@adacore.com>
10398
10399 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
10400
104012011-08-02 Ed Schonberg <schonberg@adacore.com>
10402
10403 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
10404 not set Overridden_Operation if subprogram is an initialization
10405 procedure.
10406
104072011-08-02 Yannick Moy <moy@adacore.com>
10408
10409 * par-ch6.adb: Correct obsolete name in comments
10410 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
10411 which takes two message arguments (existing function takes one), with
10412 second message used for continuation.
10413 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
10414 block statements that originate from a source block statement, not
10415 generated block statements
10416 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
10417 symmetry with procedure case
10418 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
10419 function to issue an error in formal mode if a package specification
10420 contains more than one tagged type or type extension.
10421 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
10422 parameters matching formals of tagged types are objects (or ancestor
10423 type conversions of objects), not general expressions. Issue an error
10424 on view conversions that are not involving ancestor conversion of an
10425 extended type.
10426 (Resolve_Type_Conversion): in formal mode, issue an error on the
10427 operand of an ancestor type conversion which is not an object
10428 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
10429 procedure so that it works also for actuals of function calls
10430 (Is_Actual_Tagged_Parameter): new function which determines if its
10431 argument is an actual parameter of a formal of tagged type in a
10432 subprogram call
10433 (Is_SPARK_Object_Reference): new function which determines if the tree
10434 referenced by its argument represents an object in SPARK
10435
104362011-08-02 Robert Dewar <dewar@adacore.com>
10437
10438 * sem_ch3.adb: Minor reformatting
10439 Minor comment addition
10440 Minor error msg text change
10441
104422011-08-02 Javier Miranda <miranda@adacore.com>
10443
10444 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
10445 function. Used to be more precise when we generate a variable plus one
10446 assignment to remove side effects in the evaluation of the Bound
10447 expressions.
10448 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
10449 of the bound expression to force its re-analysis and thus expand the
10450 associated transient scope (if required). Code cleanup replacing the
10451 previous code that declared the constant entity by an invocation to
10452 routine Force_Evaluation which centralizes this work in the frontend.
10453
104542011-08-02 Robert Dewar <dewar@adacore.com>
10455
10456 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
10457 (Base_Type): Now uses improved Is_Base_Type function
10458 * einfo.ads (Base_Type): Inline this function
10459
104602011-08-02 Robert Dewar <dewar@adacore.com>
10461
10462 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
10463 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
10464
104652011-08-02 Arnaud Charlet <charlet@adacore.com>
10466
10467 * gcc-interface/Make-lang.in: Update dependencies.
10468 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
10469 targets.
10470
104712011-08-02 Yannick Moy <moy@adacore.com>
10472
10473 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
10474 non-simple expression used in delta constraint
10475 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
10476 index constraint which is not a subtype mark
10477 * par.adb: With and use Restrict
10478 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
10479 mode on component type which is not a subtype mark and default
10480 expression on component
10481 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
10482 of string which does not have a lower index bound equal to 1
10483 (Array_Type_Declaration): issue an error in formal mode on index or
10484 component type which is not a subtype mark, and on aliased keyword on
10485 component
10486 (Derived_Type_Declaration): issue an error in formal mode on interface,
10487 limited or abstract type
10488 (Record_Type_Declaration): issue an error in formal mode on interface
10489 (Record_Type_Definition): issue an error in formal mode on tagged types
10490 and type extensions not declared in the specification of a library unit
10491 package; on null non-tagged record; on variant part
10492
104932011-08-02 Vincent Celier <celier@adacore.com>
10494
10495 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
10496 not declared for qualified library project when Library_Name is not
10497 declared, but Library_Dir is.
10498
104992011-08-02 Robert Dewar <dewar@adacore.com>
10500
10501 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
10502 pragmas (affects aspects [Component_]Default_Value
10503 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
10504 component type for the resolution
10505
105062011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10507
10508 * einfo.adb (Base_Type): Tune implementation for speed.
10509
105102011-08-02 Robert Dewar <dewar@adacore.com>
10511
10512 * freeze.adb: Minor reformatting.
10513
105142011-08-02 Thomas Quinot <quinot@adacore.com>
10515
10516 * scos.ads: Update comments.
10517
105182011-08-02 Ed Schonberg <schonberg@adacore.com>
10519
10520 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
10521 base type, because the parent may be a subtype of a private type whose
10522 convention is established in a private part.
10523
105242011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
10525
10526 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
10527 statement in a block when the expansion of the return expression has
10528 created a finalization chain.
10529 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
10530 with the parent node.
10531 Add N_Extended_Return_Statement to handle the case where a transient
10532 object declaration appears in the Return_Object_Declarations list of
10533 an extended return statement.
10534
105352011-08-02 Matthew Gingell <gingell@adacore.com>
10536
10537 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
10538 unused parameter 'name'.
10539
105402011-08-02 Ed Schonberg <schonberg@adacore.com>
10541
10542 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
10543 inherited operation, check whether its alias, which is the source
10544 operastion that it renames, has been marked eliminated.
10545
105462011-08-02 Javier Miranda <miranda@adacore.com>
10547
10548 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
10549 in-mode parameter whose type is an access type since it can be used to
10550 modify its designated object. Enforce code that handles as safe an
10551 access type that is not access-to-constant but it is the result of a
10552 previous removal of side-effects.
10553 (Remove_Side_Effects): Minor code reorganization of cases which require
10554 no action. Done to incorporate documentation on new cases uncovered
10555 working in this ticket: no action needed if this routine was invoked
10556 too early and the nodes are not yet decorated.
10557 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
10558 to routine Remove_Side_Effects by calls to Force_Evaluation since they
10559 were issued with actuals that are implicitly provided by
10560 Force_Evaluation.
10561
105622011-08-02 Robert Dewar <dewar@adacore.com>
10563
10564 * sem_ch3.adb, sem_res.adb: Minor reformatting.
10565
105662011-08-02 Yannick Moy <moy@adacore.com>
10567
10568 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
10569 to issue an error in formal mode on attribute not supported in this mode
10570 (Analyze_Attribute): issue errors on standard attributes not supported
10571 in formal mode.
10572 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
10573 comment, and issue error in formal mode on modulus which is not a power
10574 of 2.
10575 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
10576 range.
10577 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
10578 subtype mark.
10579 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
10580 operator on modular type (except 'not').
10581
105822011-08-02 Robert Dewar <dewar@adacore.com>
10583
10584 * gnat_rm.texi: Minor reformatting.
10585
105862011-08-02 Arnaud Charlet <charlet@adacore.com>
10587
10588 * s-osinte-linux.ads: Minor comment update and reformatting.
10589 * i-cexten.ads: Make this unit pure, as for its parent.
10590 Will allow its usage in more contexts if needed.
10591
105922011-08-02 Robert Dewar <dewar@adacore.com>
10593
10594 * s-utf_32.ads: Minor comment fix.
10595
105962011-08-02 Ed Schonberg <schonberg@adacore.com>
10597
10598 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
10599 operation of a tagged synchronized type, handle the case where the
10600 controlling argument is overloaded.
10601
106022011-08-02 Yannick Moy <moy@adacore.com>
10603
10604 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
10605 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
10606 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
10607 SPARK mode and formal verification mode on processing SPARK restriction
10608 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
10609 requiring consistency checking.
10610
106112011-08-02 Robert Dewar <dewar@adacore.com>
10612
10613 * sem_res.adb: Minor reformatting.
10614
106152011-08-02 Robert Dewar <dewar@adacore.com>
10616
10617 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10618 a-cforse.ads: Remove unneeded with of Ada.Containers
10619 Remove commented out pragma Inline's
10620 Move specifications of new subprograms to the actual specs
10621
106222011-08-02 Yannick Moy <moy@adacore.com>
10623
10624 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10625 a-cforse.ads: Update comments.
10626
106272011-08-02 Ed Schonberg <schonberg@adacore.com>
10628
10629 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
10630
106312011-08-02 Robert Dewar <dewar@adacore.com>
10632
10633 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10634 a-cforse.ads, a-cofove.ads: Minor reformatting.
10635
106362011-08-02 Claire Dross <dross@adacore.com>
10637
10638 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10639 a-cofove.ads: Add comments.
10640
106412011-08-02 Yannick Moy <moy@adacore.com>
10642
10643 * gnat_rm.texi: Document formal containers.
10644
106452011-08-02 Emmanuel Briot <briot@adacore.com>
10646
10647 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
10648 are empty sections.
10649
106502011-08-02 Robert Dewar <dewar@adacore.com>
10651
10652 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
10653 reformatting.
10654
106552011-08-02 Robert Dewar <dewar@adacore.com>
10656
10657 * aspects.adb: New aspects Default_Value and Default_Component_Value
10658 New format of Aspect_Names table checks for omitted entries
10659 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
10660 handling of boolean aspects for derived types.
10661 New aspects Default_Value and Default_Component_Value
10662 New format of Aspect_Names table checks for omitted entries
10663 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
10664 (Has_Default_Value): New flag
10665 (Has_Default_Component_Value): New flag
10666 (Has_Default_Value): New flag
10667 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
10668 table.
10669 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
10670 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
10671 Default_Value and Default_Component_Value
10672 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
10673 New aspects Default_Value and Default_Component_Value
10674 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
10675 * sprint.adb: Print N_Aspect_Specification node when called from gdb
10676
106772011-08-02 Vincent Celier <celier@adacore.com>
10678
10679 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
10680 inherit library kind.
10681
106822011-08-02 Ed Schonberg <schonberg@adacore.com>
10683
10684 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
10685 Minor reformatting.
10686
106872011-08-02 Robert Dewar <dewar@adacore.com>
10688
10689 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
10690
106912011-08-02 Yannick Moy <moy@adacore.com>
10692
10693 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
10694
106952011-08-02 Robert Dewar <dewar@adacore.com>
10696
10697 * impunit.adb: Add comment.
10698
106992011-08-02 Yannick Moy <moy@adacore.com>
10700
10701 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
10702 qualification of aggregates in formal mode
10703 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
10704 another aggregate
10705 (Resolve_Aggregate): complete the test that an aggregate is adequately
10706 qualified in formal mode
10707
107082011-08-02 Pascal Obry <obry@adacore.com>
10709
10710 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
10711 * mlib-prj.adb: Supress warning when compiling binder generated file.
10712 (Build_Library): Supress all warnings when compiling the binder
10713 generated file.
10714
107152011-08-02 Yannick Moy <moy@adacore.com>
10716
10717 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
10718 from here...
10719 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
10720 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
10721 Add with/use clauses to make Check_Formal_Restriction visible
10722
107232011-08-02 Ed Schonberg <schonberg@adacore.com>
10724
10725 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
10726 in-parameters when type of the generic formal is private in the generic
10727 spec and non-private in the body.
10728
107292011-08-02 Claire Dross <dross@adacore.com>
10730
10731 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
10732 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
10733 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
10734 * impunit.adb, Makefile.rtl: Take new files into account.
10735
107362011-08-02 Robert Dewar <dewar@adacore.com>
10737
10738 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
10739 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
10740
107412011-08-02 Yannick Moy <moy@adacore.com>
10742
10743 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
10744 formal mode
10745 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
10746 matching static array bounds, taking into account the special case of
10747 string literals
10748 * sem_ch3.adb: Typo in comment.
10749
107502011-08-02 Yannick Moy <moy@adacore.com>
10751
10752 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
10753 which issues an error in formal mode if its argument node is originally
10754 from source
10755 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
10756 has a discriminant specification so that it does not include the case
10757 of derived types
10758 (Derived_Type_Declaration): move here the test that a derived type has a
10759 discriminant specification
10760 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
10761 first element of a component association before accessing its choices
10762 (presence of component association is not enough)
10763 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
10764 declaration is a library item before accessing the next element in a
10765 list, as library items are not member of lists
10766 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
10767 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
10768 Check_Formal_Restriction whenever possible.
10769
107702011-08-02 Ed Schonberg <schonberg@adacore.com>
10771
10772 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
10773 reference when needed.
10774
107752011-08-02 Bob Duff <duff@adacore.com>
10776
10777 * gnat_ugn.texi: Fix typo.
10778
107792011-08-02 Vincent Celier <celier@adacore.com>
10780
10781 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
10782 archive file name. Do not use the full path name of archives for Open
10783 VMS.
10784
107852011-08-02 Robert Dewar <dewar@adacore.com>
10786
10787 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
10788 Analyze_Aspect_Specifications
10789 * sem_ch13.adb
10790 (Analyze_Aspect_Specifications): New handling for boolean aspects
10791 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
10792 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
10793 sequence for Analyze_Aspect_Specifications
10794 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
10795 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
10796
107972011-08-02 Robert Dewar <dewar@adacore.com>
10798
10799 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
10800 aspects, since these no longer exist.
10801
108022011-08-02 Robert Dewar <dewar@adacore.com>
10803
10804 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
10805 semicolon, do not try to see if there are aspects following it.
10806 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
10807 aspect spec.
10808
108092011-08-02 Robert Dewar <dewar@adacore.com>
10810
10811 * sem_ch8.adb, aspects.ads: Minor reformatting.
10812
108132011-08-02 Eric Botcazou <ebotcazou@adacore.com>
10814
10815 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
10816 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
10817 extracted from...
10818 (Analyze_Aspect_Specifications): ...here. Call above procedure.
10819
108202011-08-02 Yannick Moy <moy@adacore.com>
10821
10822 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
10823 mode on subprogram declaration outside of package specification, unless
10824 it is followed by a pragma Import
10825 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
10826 Access_Type_Declaration): issue error in formal mode on access type
10827 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
10828 incomplete type
10829 (Analyze_Object_Declaration): issue error in formal mode on object
10830 declaration which does not respect SPARK restrictions
10831 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
10832 declaration which does not respect SPARK restrictions
10833 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
10834 error in formal mode on digits or delta constraint
10835 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
10836 decimal fixed point type
10837 (Derived_Type_Declaration): issue error in formal mode on derived type
10838 other than type extensions of tagged record types
10839 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
10840 with check on access definition
10841 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
10842 mode on protected definition.
10843 (Analyze_Task_Definition): issue error in formal mode on task definition
10844
108452011-08-02 Robert Dewar <dewar@adacore.com>
10846
10847 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
10848
108492011-08-02 Javier Miranda <miranda@adacore.com>
10850
10851 * sem_ch6.adb (Can_Override_Operator): New function.
10852 (Verify_Overriding_Indicator): Add missing code to check overriding
10853 indicator in operators. Fixes regression.
10854 (Check_Overriding_Indicator): Minor reformating after replacing the
10855 code that evaluates if the subprogram can override an operator by
10856 invocations to the above new function.
10857 * einfo.adb
10858 (Write_Field26_Name): Add missing code to ensure that, following
10859 the documentation in einfo.ads, this field is not shown as attribute
10860 "Static_Initialization" on non-dispatching functions.
10861
108622011-08-02 Jose Ruiz <ruiz@adacore.com>
10863
10864 * sem_res.adb (Resolve_Call): A call to
10865 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
10866 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
10867 i.e., when the second parameter is of type Time_Span.
10868
108692011-08-02 Vincent Celier <celier@adacore.com>
10870
10871 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
10872 with an archive instead of -L<library dir> -l<library name>.
10873
108742011-08-02 Ed Schonberg <schonberg@adacore.com>
10875
10876 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
10877 mark the base types In_Use in addition to making the operations
10878 use_visible.
10879
108802011-08-02 Ed Falis <falis@adacore.com>
10881
10882 * init.c: add and setup __gnat_signal_mask for the exception signals
10883 * s-inmaop-vxworks.adb: new file.
10884 * s-intman-vxworks.adb: remove unnecessary initializations and
10885 simplify remaining
10886 * s-intman-vxworks.ads: remove unnecessary variable
10887 * s-taprop-vxworks.adb: simplify signal initialization
10888
108892011-08-02 Robert Dewar <dewar@adacore.com>
10890
10891 * sem_ch8.adb: Minor code reorganization, comment updates.
10892
108932011-08-02 Robert Dewar <dewar@adacore.com>
10894
10895 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
10896 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
10897 here from Sem_Res.
10898 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
10899 (Matching_Static_Array_Bounds): Moved here from Sem_Res
10900
109012011-08-02 Ed Schonberg <schonberg@adacore.com>
10902
10903 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
10904 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
10905 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
10906 use_type_clauses, to handle more efficiently use_type and use_all_type
10907 constructs.
10908 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
10909 Ada2012 Use_All_Type clause.
10910 (Use_Class_Wide_Operations): new procedure.
10911
109122011-08-02 Robert Dewar <dewar@adacore.com>
10913
10914 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
10915 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
10916 expression to expression function.
10917
109182011-08-02 Ed Schonberg <schonberg@adacore.com>
10919
10920 * sem_ch4.adb: transform simple Ada2012 membership into equality only
10921 if types are compatible.
10922
109232011-08-02 Yannick Moy <moy@adacore.com>
10924
10925 * sem_res.adb (Matching_Static_Array_Bounds): new function which
10926 returns True if its argument array types have same dimension and same
10927 static bounds at each index.
10928 (Resolve_Actuals): issue an error in formal mode on actuals passed as
10929 OUT or IN OUT paramaters which are not view conversions in SPARK.
10930 (Resolve_Arithmetic_Op): issue an error in formal mode on
10931 multiplication or division with operands of fixed point types which are
10932 not qualified or explicitly converted.
10933 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
10934 Boolean or array type (except String) operands.
10935 (Resolve_Equality_Op): issue an error in formal mode on equality
10936 operators for array types other than String with non-matching static
10937 bounds.
10938 (Resolve_Logical_Op): issue an error in formal mode on logical operators
10939 for array types with non-matching static bounds. Factorize the code in
10940 Matching_Static_Array_Bounds.
10941 (Resolve_Qualified_Expression): issue an error in formal mode on
10942 qualified expressions for array types with non-matching static bounds.
10943 (Resolve_Type_Conversion): issue an error in formal mode on type
10944 conversion for array types with non-matching static bounds
10945
109462011-08-02 Robert Dewar <dewar@adacore.com>
10947
10948 * par-ch10.adb: Minor code reorganization (use Nkind_In).
10949
109502011-08-02 Ed Schonberg <schonberg@adacore.com>
10951
10952 * par-ch9.adb: save location of entry for proper error message.
10953
109542011-08-02 Javier Miranda <miranda@adacore.com>
10955
10956 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
10957 (Use_Full_View) which permits this routine to climb through the
10958 ancestors using the full-view of private parents.
10959 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
10960 Use_Full_View to true in calls to Is_Ancestor.
10961 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
10962 true in call to Is_Ancestor.
10963 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
10964 Use_Full_View to true in call to Is_Ancestor.
10965 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
10966 call to Is_Ancestor.
10967 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
10968 Use_Full_View to true in calls to Is_Ancestor.
10969 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
10970 Make_Select_Specific_Data_Table, Register_Primitive,
10971 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
10972 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
10973 to true in call to Is_Ancestor.
10974 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
10975 Use_Full_View to true in calls to Is_Ancestor.
10976 * exp_cg.adb
10977 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
10978 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
10979
109802011-08-02 Robert Dewar <dewar@adacore.com>
10981
10982 * gnat_rm.texi: Minor reformatting.
10983 * sem_prag.adb: Minor reformatting.
10984
109852011-08-02 Tristan Gingold <gingold@adacore.com>
10986
10987 * vms_data.ads: Add VMS qualifier for -gnateP.
10988
109892011-08-02 Robert Dewar <dewar@adacore.com>
10990
10991 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
10992 * par-ch7.adb (P_Package): Proper placement of aspects for package
10993 decl/instantiation.
10994 * par-endh.adb (Check_End): Ad Is_Sloc parameter
10995 (End_Statements): Add Is_Sloc parameterr
10996 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
10997 (Check_End): Ad Is_Sloc parameter
10998 (End_Statements): Add Is_Sloc parameterr
10999
110002011-08-02 Vincent Celier <celier@adacore.com>
11001
11002 * ug_words: Add VMS qualifier equivalent to -gnateP:
11003 /SYMBOL_PREPROCESSING.
11004
110052011-08-02 Jose Ruiz <ruiz@adacore.com>
11006
11007 * gnat-style.texi: For hexadecimal numeric literals the typical
11008 grouping of digits is 4 to represent 2 bytes.
11009 A procedure spec which is split into several lines is indented two
11010 characters.
11011
110122011-08-02 Yannick Moy <moy@adacore.com>
11013
11014 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
11015 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
11016 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
11017 properly qualified
11018 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
11019 choice in array aggregate
11020 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
11021 mark as ancestor
11022 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
11023 positional and named aggregate for record, or others in record
11024 aggregate, or multiple choice in record aggregate
11025 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
11026 array operands to logical operations AND, OR and XOR do not have the
11027 same static lower and higher bounds
11028 * sem_ch5.adb, sinfo.ads: Correct typos in comments
11029
110302011-08-01 Robert Dewar <dewar@adacore.com>
11031
11032 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
11033 Replaces Last_Source_Node_In_Sequence.
11034 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
11035 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
11036 parens and blank in string (this was inconsistently implemented).
11037 * errout.ads
11038 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
11039 blank in string (this was inconsistently implemented).
11040 * gnat1drv.adb
11041 (Set_Global_Switches): Set formal mode switches appropriately
11042 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
11043 * par-prag.adb
11044 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
11045 call Set_Error_Msg_Lang to set "spark" as language name.
11046 * par.adb: Remove unnecessary call to set formal language for errout
11047 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
11048 appropriately and call Set_Error_Msg_Lang to set "spark" as language
11049 name.
11050 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
11051 calls to it, moved after resolution so that types are known
11052 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
11053 result of concatenation is not of type String
11054 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
11055 concatenation is not properly restricted
11056 * gnat_rm.texi: Add doc on pragma Spark_95.
11057 * gcc-interface/Makefile.in: Remove obsolete target pairs for
11058 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
11059 * gcc-interface/Make-lang.in: Update dependencies.
11060
110612011-08-01 Javier Miranda <miranda@adacore.com>
11062
11063 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
11064 condition that detects if the overridden operation must replace an
11065 existing entity.
11066
110672011-08-01 Javier Miranda <miranda@adacore.com>
11068
11069 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
11070 code declarations inserted by Insert_Actions in each alternative of the
11071 N_Case_Expression node.
11072
110732011-08-01 Robert Dewar <dewar@adacore.com>
11074
11075 * sem_ch6.adb: Minor code reorganization.
11076 * sem_util.adb: Minor reformatting.
11077
110782011-08-01 Pascal Obry <obry@adacore.com>
11079
11080 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
11081 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
11082
110832011-08-01 Yannick Moy <moy@adacore.com>
11084
11085 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
11086 literal or operator symbol which is prefixed
11087 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
11088 mode on access attributes.
11089 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
11090 that concatenation operands are properly restricted in formal mode
11091 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
11092 Analyze_Concatenation_Operand. Issue an error in formal mode if the
11093 result of the concatenation has a type different from String.
11094 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
11095 Analyze_Quantified_Expression, Analyze_Slice,
11096 Analyze_Null): issue an error in formal mode on unsupported constructs
11097 * sem_ch5.adb
11098 (Analyze_Block_Statement): only issue error on source block statement
11099 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
11100 function which returns the last node in a list of nodes for which
11101 Comes_From_Source returns True, if any
11102 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
11103 Last_Source_Node_In_Sequence
11104 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
11105 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
11106 mode on unsupported constructs
11107 * sem_ch9.adb Do not return after issuing error in formal mode, as the
11108 rest of the actions may be needed later on since the error is marked as
11109 not serious.
11110 * sinfo.ads: Typos in comments.
11111
111122011-08-01 Pascal Obry <obry@adacore.com>
11113
11114 * projects.texi: Minor editing.
11115
111162011-08-01 Yannick Moy <moy@adacore.com>
11117
11118 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
11119 insertion character ~~
11120 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
11121 (Set_Error_Msg_Lang): new procedure which fixes the language for use
11122 with insertion character ~~
11123 (Set_Msg_Text): treat insertion character ~~
11124 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
11125 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
11126 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
11127 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
11128 errors related to the formal language restriction not serious
11129 (insertion character |).
11130 * par.adb (Par): set formal language for error messages if needed
11131 * sem_ch6.adb (Check_Missing_Return): take into account possible
11132 generated statements at the end of the function
11133 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
11134 enumeration value to define a new pragma SPARK_95
11135 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
11136 SPARK_Version): new type and variables to store the SPARK version
11137 (none by default).
11138 (SPARK_Mode): return True when SPARK_Version is set
11139 * par-prag.adb: Correct indentation
11140 (Prag): take Pragma_SPARK_95 into account
11141 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
11142 into account.
11143
111442011-08-01 Robert Dewar <dewar@adacore.com>
11145
11146 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
11147 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
11148 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
11149
111502011-08-01 Pascal Obry <obry@adacore.com>
11151
11152 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
11153 Target_Name to Get_Path call.
11154 (Parse_Single_Project): Likewise.
11155 (Post_Parse_Context_Clause): Likewise.
11156 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
11157 Call Initialise_Project_Path with the proper Target_Name.
11158 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
11159 search path.
11160 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
11161 with the proper Target_Name.
11162 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
11163 Part.Parse routine.
11164 (Parse_Project_And_Apply_Config): Likewise.
11165 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
11166 This is fine as this part of the code is supporting only native
11167 compilation.
11168 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
11169 is fine as this part of the code is supporting only native compilation.
11170
111712011-08-01 Yannick Moy <moy@adacore.com>
11172
11173 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
11174 of homonym, unless the homonym is one of the cases allowed in SPARK
11175 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
11176 package declaration occurring after a body.
11177
111782011-08-01 Robert Dewar <dewar@adacore.com>
11179
11180 * checks.adb, exp_ch4.adb: Minor reformatting.
11181
111822011-08-01 Javier Miranda <miranda@adacore.com>
11183
11184 * einfo.ads (Access_Disp_Table): Fix documentation.
11185 (Dispatch_Table_Wrappers): Fix documentation.
11186
111872011-08-01 Pascal Obry <obry@adacore.com>
11188
11189 * prj-env.adb, prj-env.ads: Minor reformatting.
11190
111912011-08-01 Yannick Moy <moy@adacore.com>
11192
11193 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
11194 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11195 procedures out of these packages.
2c7f9cc0 11196 * errout.ads, errout.adb
052e0603
AC
11197 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
11198 procedures in of this package
11199 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
11200 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
11201 on misplaced later vs initial declarations, like in Ada 83
11202 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
11203 formal mode on attribute of private type whose full type declaration
11204 is not visible
11205 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
11206 package declaration inside a package specification
11207 (Analyze_Full_Type_Declaration): issue error in formal mode on
11208 controlled type or discriminant type
11209 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
11210 user-defined operator means that it should come from the source
11211 (New_Overloaded_Entity): issue error in formal mode on overloaded
11212 entity.
11213 * sem_ch6.ads, sem_ch13.ads: typos in comments.
11214
112152011-08-01 Thomas Quinot <quinot@adacore.com>
11216
11217 * atree.adb: Minor reformatting.
11218 * checks.adb: Minor reformatting.
11219
112202011-08-01 Vincent Celier <celier@adacore.com>
11221
11222 * s-parame-vms-ia64.ads: Fix typo in comment
11223 Minor reformatting
11224 * s-parame-vms-restrict.ads: Removed, unused.
11225
112262011-08-01 Javier Miranda <miranda@adacore.com>
11227
11228 * exp_ch3.adb
11229 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
11230 * sem_ch3.adb
11231 (Constrain_Index): Remove side effects in the evaluation of the bounds.
11232 * sem_ch3.ads, sem_ch3.adb
11233 (Is_Constant_Bound): New extended version of the subprogram that was
11234 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
11235 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
11236 * sem_aux.ads (Constant_Value): Fix typo in comment.
11237 * checks.adb (Generate_Index_Checks): New implementation which, for
11238 array objects with constant bounds, generates the runtime check
11239 referencing the bounds of the array type. For other cases this routine
11240 provides its previous behavior obtaining such values from the array
11241 object.
11242 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
11243 parent type.
11244 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
11245 we cannot have semantic interpretations of the new node.
11246
112472011-08-01 Ed Schonberg <schonberg@adacore.com>
11248
11249 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
11250 expressions.
11251
112522011-08-01 Arnaud Charlet <charlet@adacore.com>
11253
11254 * sem_ch8.adb: Minor code editing.
11255 * s-vxwext.adb: Remove trailing space.
11256 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
11257 consistency with other files.
11258
112592011-08-01 Thomas Quinot <quinot@adacore.com>
11260
11261 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
11262
112632011-08-01 Ed Schonberg <schonberg@adacore.com>
11264
11265 * par-ch10.adb: reject parameterized expressions as compilation unit.
11266 * sem_ch4.adb: handle properly conditional expression with overloaded
11267 then_clause and no else_clause.
11268
112692011-08-01 Tristan Gingold <gingold@adacore.com>
11270
11271 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
11272 like done by System.Aux_DEC.
11273 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
11274
112752011-08-01 Yannick Moy <moy@adacore.com>
11276
11277 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
11278 missing label at end of declaration (subprogram or package)
11279 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
11280 of positional and named parameter association
11281 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
11282 Error_Msg_SP which adds a prefix to the error message giving the name
11283 of the formal language analyzed
11284 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
11285 access result type in subprogram, unconstrained array as result type,.
11286 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
11287 procedure
11288 * sem_ch8.adb: Code clean up.
11289
112902011-08-01 Javier Miranda <miranda@adacore.com>
11291
11292 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
11293 * einfo.ads (Access_Disp_Table): Fix documentation.
11294 (Dispatch_Table_Wrappers): Fix documentation.
11295 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
11296 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
11297 to enforce the documentation of this attribute.
11298 (Set_Is_Interface): Cleanup the assertion.
11299 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
11300 the Underlying_Type entity before reading attribute Access_Disp_Table.
11301 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
11302 Locate the Underlying_Type before reading attribute Access_Disp_Table.
11303 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
11304 the Underlying_Type entity before reading attribute Access_Disp_Table.
11305 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
11306 Locate the Underlying_Type entity before reading attribute
11307 Access_Disp_Table.
11308
113092011-08-01 Ed Schonberg <schonberg@adacore.com>
11310
11311 * s-poosiz.ads: Additional overriding indicators.
11312
113132011-08-01 Yannick Moy <moy@adacore.com>
11314
11315 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
11316 formal mode.
11317 (Analyze_Iteration_Scheme): issue error in formal mode when loop
11318 parameter specification does not include a subtype mark.
11319 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
11320 formal mode on abstract subprogram.
11321 (Analyze_Subprogram_Specification): issue error in formal mode on
11322 user-defined operator.
11323 (Process_Formals): issue error in formal mode on access parameter and
11324 default expression.
11325 * sem_ch9.adb (Analyze_Abort_Statement,
11326 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
11327 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
11328 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
11329 Analyze_Requeue, Analyze_Selective_Accept,
11330 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
11331 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
11332 issue error in formal mode on user-defined raise statement.
11333
113342011-08-01 Thomas Quinot <quinot@adacore.com>
11335
11336 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
11337 declaration being hidden when overriding an implicit inherited
11338 subprogram.
11339 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
11340 (-gnats), do not complain about a source file that contains only a
11341 pragma No_Body.
11342
113432011-08-01 Ed Schonberg <schonberg@adacore.com>
11344
11345 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
11346 variable if already set.
11347
113482011-08-01 Arnaud Charlet <charlet@adacore.com>
11349
11350 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
11351 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
11352 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
11353 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
11354 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
11355 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
11356 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
11357 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
11358 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
11359 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
11360 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
11361 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
11362 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
11363 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
11364 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
11365 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
11366 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
11367 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
11368 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
11369 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
11370 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
11371 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
11372 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
11373 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
11374 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
11375 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
11376 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
11377 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
11378 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
11379 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
11380 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
11381 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
11382 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
11383 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
11384 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
11385 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
11386 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
11387 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
11388 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
11389 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
11390 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
11391 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
11392 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
11393 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
11394 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
11395 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
11396 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
11397 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
11398 s-osinte-mingw.ads: Update to GPLv3 run-time license.
11399 Use GNAT instead of GNARL.
11400
114012011-08-01 Bob Duff <duff@adacore.com>
11402
11403 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
11404 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
11405 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
11406 reformatting.
11407
114082011-08-01 Yannick Moy <moy@adacore.com>
11409
11410 * debug.adb (d.D) reverve flag for the SPARK mode
11411 (d.E) reverve flag for SPARK generation mode
11412 (d.F) reverve flag for Why generation mode
2c7f9cc0 11413 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
052e0603
AC
11414 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
11415 functions which return True when the corresponding modes are set
11416 (Formal_Language): return "spark" or "alfa" when in formal verification
11417 mode.
11418 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
11419 Error_Msg to prefix the error message with a tag giving the formal
11420 language
11421 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
11422 message with a tag giving the formal language
11423 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
11424 block statement
11425 (Analyze_Case_Statement): issue error in formal mode on case statement
11426 with a single "others" case alternative
11427 (Analyze_Exit_Statement): issue errors in formal mode on exit
11428 statements which do not respect SPARK restrictions
11429 (Analyze_Goto_Statement): issue error in formal mode on goto statement
11430 (Check_Unreachable_Code): always issue an error (not a warning) in
11431 formal mode on unreachable code (concerns both code after an infinite
11432 loop and after an unconditional jump, both not allowed in SPARK)
11433 * sem_ch6.adb (Analyze_Return_Statement): add call to
11434 Set_Return_Present for a procedure containing a return statement
11435 (already done for functions in Analyze_Function_Return)
11436 (Analyze_Function_Return): issue error in formal mode on extended
11437 return or if return is not last statement in function
11438 (Check_Missing_Return): issue error in formal mode if function does
11439 not end with return or if procedure contains a return
11440 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
11441 function to detect if there is an inner scope of its parameter S which
11442 is a loop.
11443
114442011-08-01 Thomas Quinot <quinot@adacore.com>
11445
11446 * sem_ch6.ads: Minor reformatting.
11447
114482011-08-01 Javier Miranda <miranda@adacore.com>
11449
11450 * sem_util.adb (Abstract_Interface_List): Complete condition when
11451 processing private type declarations to avoid reading unavailable
11452 attribute.
11453 (Is_Synchronized_Tagged_Type): Complete condition when processing
11454 private extension declaration nodes to avoid reading unavailable
11455 attribute.
11456
114572011-08-01 Thomas Quinot <quinot@adacore.com>
11458
11459 * sem_ch3.adb: Minor reformatting.
11460
114612011-08-01 Thomas Quinot <quinot@adacore.com>
11462
11463 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
11464 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
11465 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
11466 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
11467 for VMS, instead parametrize the common implementation with
11468 System.Parameters declarations.
11469
114702011-08-01 Eric Botcazou <ebotcazou@adacore.com>
11471
11472 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
11473
114742011-08-01 Tristan Gingold <gingold@adacore.com>
11475
11476 * seh_init.c: Fix SEH handler installation on win64.
11477
114782011-08-01 Ed Schonberg <schonberg@adacore.com>
11479
11480 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
11481 double analysis of an anonymous access to subprogram, because it can
11482 lead to improper sharing of profiles and a back-end crash.
11483
114842011-08-01 Robert Dewar <dewar@adacore.com>
11485
11486 * make.adb, sem_ch4.adb: Minor reformatting.
11487 * gcc-interface/Make-lang.in: Update dependencies.
11488 * sem_util.adb, exp_ch5.adb: Minor reformatting.
11489
114902011-08-01 Arnaud Charlet <charlet@adacore.com>
11491
11492 * gnat_rm.texi: Fix definition of Long_Integer.
11493
114942011-08-01 Ed Schonberg <schonberg@adacore.com>
11495
11496 * exp_aggr.adb: check limit size of static aggregate unconditionally,
11497 to prevent storage exhaustion.
11498 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
11499 finalized is a function body, insert the cleanup code before the final
11500 return statement, to prevent spurious warnings.
11501 * s-pooglo.ads: add overriding indicator.
11502
115032011-08-01 Ed Schonberg <schonberg@adacore.com>
11504
11505 * sem_ch4.adb (Operator_Check): improve error message when both a
11506 with_clause and a use_clause are needed to make operator usage legal.
11507 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
11508 determine whether a compilation unit is visible within an other,
11509 either through a with_clause in the current unit, or a with_clause in
11510 its library unit or one one of its parents.
11511
115122011-08-01 Ed Schonberg <schonberg@adacore.com>
11513
11514 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
11515 over an arbitrary expression of an array or container type.
11516 * lib-xref.adb: clarify comment.
11517
115182011-08-01 Bob Duff <duff@adacore.com>
11519
11520 * einfo.ads: Minor reformatting.
11521 * debug.adb: Minor comment improvement.
11522
115232011-08-01 Javier Miranda <miranda@adacore.com>
11524
11525 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
11526 consider hidden subprograms as valid candidates.
11527
115282011-08-01 Arnaud Charlet <charlet@adacore.com>
11529
11530 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
11531
115322011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
11533
11534 * gnat_ugn.texi: Fix typo.
11535
115362011-08-01 Robert Dewar <dewar@adacore.com>
11537
11538 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
11539 lib-xref.adb: Minor reformatting
11540
115412011-08-01 Gary Dismukes <dismukes@adacore.com>
11542
11543 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
11544 when to generate a call to Move_Final_List.
11545 (Has_Controlled_Parts): Remove this function.
11546
115472011-08-01 Geert Bosch <bosch@adacore.com>
11548
11549 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
11550 "," in choice list.
11551
115522011-08-01 Thomas Quinot <quinot@adacore.com>
11553
11554 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
11555 explicit raise of a predefined exception as Comes_From_Source if the
11556 original N_Raise_Statement comes from source.
11557
115582011-08-01 Robert Dewar <dewar@adacore.com>
11559
11560 * sinfo.ads: Add comment.
11561 * sem_ch6.adb: Minor reformatting.
11562
115632011-08-01 Robert Dewar <dewar@adacore.com>
11564
11565 * freeze.adb (Freeze_Entity): Refine check for bad component size
11566 clause to avoid rejecting confirming clause when atomic/aliased present.
11567
115682011-08-01 Ed Schonberg <schonberg@adacore.com>
11569
11570 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
11571 better determine whether an entity reference is a write.
11572 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
11573 subcomponent.
11574 * lib-xref.adb (Output_References): Do no suppress a read reference at
11575 the same location as an immediately preceeding modify-reference, to
11576 handle properly in-out actuals.
11577
115782011-08-01 Tristan Gingold <gingold@adacore.com>
11579
11580 * env.c (__gnat_setenv) [VMS]: Refine previous change.
11581
115822011-08-01 Quentin Ochem <ochem@adacore.com>
11583
11584 * i-cstrin.adb (New_String): Changed implementation, now uses only the
11585 heap to compute the result.
11586
115872011-08-01 Robert Dewar <dewar@adacore.com>
11588
11589 * atree.ads: Minor reformatting.
11590
115912011-08-01 Emmanuel Briot <briot@adacore.com>
11592
11593 * g-expect.adb (Get_Command_Output): Fix memory leak.
11594
115952011-08-01 Geert Bosch <bosch@adacore.com>
11596
11597 * cstand.adb (P_Float_Type): New procedure to print the definition of
11598 predefined fpt types.
11599 (P_Mixed_Name): New procedure to print a name using mixed case
11600 (Print_Standard): Use P_Float_Type for printing floating point types
11601 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
11602 precision IEEE float.
11603
116042011-08-01 Thomas Quinot <quinot@adacore.com>
11605
11606 * sem_ch3.adb: Minor reformatting.
11607
116082011-08-01 Ed Schonberg <schonberg@adacore.com>
11609
11610 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
11611 the completion of a generic function, insert the new body rather than
11612 rewriting the original.
11613
116142011-08-01 Yannick Moy <moy@adacore.com>
11615
11616 * sinfo.ads, errout.ads: Typos in comments.
11617
116182011-08-01 Robert Dewar <dewar@adacore.com>
11619
11620 * par-endh.adb: Minor reformatting.
11621
116222011-08-01 Robert Dewar <dewar@adacore.com>
11623
11624 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
11625 (Pre_Post_Aspects): New subtype.
11626 * par-ch12.adb (P_Generic): New syntax for aspects in packages
11627 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
11628 * par-ch7.adb (P_Package): Remove Decl parameter
11629 (P_Package): Handle new syntax for aspects (before IS)
11630 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
11631 new aspect syntax
11632 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
11633 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
11634 (P_Package): Remove Decl parameter
11635 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
11636 aspects
11637 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
11638 specs
11639 * sem_util.ads, sem_util.adb (Static_Boolean): New function
11640 * sinfo.ads: Document new syntax for aspects in packages etc.
11641 * sprint.adb: Handle new syntax of aspects before IS in package
11642
116432011-08-01 Thomas Quinot <quinot@adacore.com>
11644
11645 * atree.ads: Minor reformatting.
11646 * sem_prag.adb: Minor reformatting.
11647
116482011-08-01 Robert Dewar <dewar@adacore.com>
11649
11650 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
11651 case expr alternative.
11652
116532011-08-01 Ed Schonberg <schonberg@adacore.com>
11654
11655 * sem_ch12.adb: Fix typo.
11656
116572011-08-01 Geert Bosch <bosch@adacore.com>
11658
11659 * sem_prag.adb (Check_No_Link_Name): New procedure.
11660 (Process_Import_Or_Interface): Use Check_No_Link_Name.
11661 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
11662 instead of Standard_Long_Long_Float_Size global. Preparation for
11663 eventual removal of per type constants.
11664 * exp_util.ads (Get_Stream_Size): New function returning the stream
11665 size value of subtype E.
11666 * exp_util.adb (Get_Stream_Size): Implement new function.
11667 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
11668 function.
11669 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
11670 * einfo.adb:
11671 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
11672
116732011-08-01 Geert Bosch <bosch@adacore.com>
11674
11675 * cstand.adb: Fix comments.
11676 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
11677 count of arguments.
11678
116792011-08-01 Robert Dewar <dewar@adacore.com>
11680
11681 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
11682
116832011-08-01 Geert Bosch <bosch@adacore.com>
11684
11685 * atree.ads: Fix comment.
11686
116872011-08-01 Robert Dewar <dewar@adacore.com>
11688
11689 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
11690 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
11691 * par.adb: Add with for Namet.Sp.
11692 * par-tchk.adb: Minor reformatting.
11693
116942011-08-01 Vincent Celier <celier@adacore.com>
11695
11696 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
11697 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
11698 of the init procedure of a SAL.
11699 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
11700 New procedure.
11701
117022011-08-01 Thomas Quinot <quinot@adacore.com>
11703
11704 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
11705 reformatting.
11706
117072011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11708
11709 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
11710
117112011-08-01 Thomas Quinot <quinot@adacore.com>
11712
11713 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
11714 conformant with its spec (return True only for types that have
11715 an overriding Initialize primitive operation that prevents them from
11716 having preelaborable initialization).
11717 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
11718 initialization for controlled types in Ada 2005 or later mode.
11719
117202011-08-01 Robert Dewar <dewar@adacore.com>
11721
11722 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
11723 Postcondition.
11724 (Same_Aspect): New function.
11725 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
11726 Type_Invariant, Precondition, Postcondition.
11727 * snames.ads-tmpl: Add Name_Type_Invariant.
11728
117292011-08-01 Robert Dewar <dewar@adacore.com>
11730
11731 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
11732 here.
11733 (Freeze_All_Ent): Fix error in handling inherited aspects.
11734 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
11735 already analyzed, but don't skip entire processing of a declaration,
11736 that's wrong in some cases of declarations being rewritten.
11737 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
11738 Don't delay for integer, string literals
11739 Treat predicates in usual manner for delay, remove special case code,
11740 not needed.
11741 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
11742 (Build_Predicate_Function): Update saved expression in aspect
11743 (Build_Invariant_Procedure): Update saved expression in aspect
11744 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
11745 of replacement of discriminant references if the reference is simple.
11746
117472011-08-01 Robert Dewar <dewar@adacore.com>
11748
11749 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
11750 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
11751 Static_Predicate and Dynamic_Predicate.
11752 (Build_Predicate_Function): Add processing for Static_Predicate
11753 and Dynamic_Predicate.
11754 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
11755 (From_Static_Predicate): New flag
11756 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
11757
117582011-08-01 Robert Dewar <dewar@adacore.com>
11759
11760 * usage.adb: Documentation cleanup for Ada version modes in usage.
11761 * expander.adb: Minor reformatting.
11762
117632011-08-01 Robert Dewar <dewar@adacore.com>
11764
11765 * atree.ads: Minor comment fix.
11766 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
11767 a-witeio.ads, sem_prag.adb: Minor reformatting.
11768
117692011-08-01 Doug Rupp <rupp@adacore.com>
11770
11771 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
11772 pointers. Use descrip.h header file for convenience. Add some
11773 comments.
11774
117752011-08-01 Robert Dewar <dewar@adacore.com>
11776
11777 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
11778 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
11779 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
11780 New procedure.
11781 (Check_Aspect_At_End_Of_Declarations): New procedure
11782 (Analye_Aspect_Specification): Minor changes for above procedures
11783 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
11784 specification node as well.
11785
117862011-08-01 Pascal Obry <obry@adacore.com>
11787
11788 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
11789 Windows files. Use GetFilesAttributes() in this case to check for file
11790 existence instead of returning with an error code.
11791
117922011-08-01 Vincent Celier <celier@adacore.com>
11793
11794 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
11795 High is above Source length.
11796
117972011-08-01 Robert Dewar <dewar@adacore.com>
11798
11799 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
11800
118012011-08-01 Robert Dewar <dewar@adacore.com>
11802
11803 * aspects.ads (Boolean_Aspects): New subtype.
11804 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
11805 for derived types in cases where the parent type and derived type have
11806 aspects.
11807 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
11808 with aspects when parent type also has aspects.
11809 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
11810 boolean expression at this point).
11811 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
11812 accordance with final decision on the Ada 2012 feature.
11813 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
11814
118152011-08-01 Matthew Heaney <heaney@adacore.com>
11816
11817 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
11818
118192011-08-01 Pascal Obry <obry@adacore.com>
11820
11821 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
11822 Fix Replace_Slice when High is above current string size.
11823 (Replace_Slice): Fix DL computation when High is above current
11824 string length.
11825
118262011-08-01 Gary Dismukes <dismukes@adacore.com>
11827
11828 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
11829
118302011-08-01 Matthew Heaney <heaney@adacore.com>
11831
11832 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
11833 of node.
11834
118352011-08-01 Pascal Obry <obry@adacore.com>
11836
11837 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
11838 reformatting.
11839
118402011-08-01 Ed Schonberg <schonberg@adacore.com>
11841
11842 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
11843 access to protected subprograms in generic bodies.
11844 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
11845 protected type, indicate that the convention of the subprogram is
11846 Convention_Protected, because it may be used in subsequent declarations
11847 within the protected declaration.
11848
118492011-08-01 Vincent Celier <celier@adacore.com>
11850
11851 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
11852 and "final" procedures when the name of the library is "ada", to avoid
11853 duplicate symbols "adainit" and "adafinal" in executables.
11854
118552011-08-01 Ed Schonberg <schonberg@adacore.com>
11856
11857 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
11858 quantified expression that appears within a postcondition and uses the
11859 Ada2012 'Result attribute.
11860
118612011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11862
11863 * init.c (__gnat_error_handler): Cast reason to int.
11864 (__gnat_install_handler): Explain sa_sigaction use.
11865
118662011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11867
11868 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
11869 subprogram has copy-in copy-out parameters, try to promote the mode of
11870 the return type if it is passed in registers.
11871
118722011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11873
11874 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
11875 left operand as addressable.
11876
118772011-07-24 Eric Botcazou <ebotcazou@adacore.com>
11878
11879 * gcc-interface/gigi.h (build_function_stub): Remove.
11880 (build_return_expr): Likewise.
11881 (convert_vms_descriptor): Declare.
11882 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
11883 (build_function_stub): Move to...
11884 * gcc-interface/utils2.c (build_return_expr): Move to...
11885 * gcc-interface/trans.c (build_function_stub): ...here.
11886 (build_return_expr): ...here.
11887 (Subprogram_Body_to_gnu): Add local variable for language_function.
11888 Disconnect the parameter attributes cache, if any, once done with it.
11889 Call end_subprog_body only after setting the end_locus.
11890 Build the stub associated with the function, if any, at the very end.
11891 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
11892 variables and streamline control flow.
11893
118942011-07-23 Arnaud Charlet <charlet@adacore.com>
11895
11896 PR ada/49819
11897 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
11898 g-trasym-dwarf.adb.
11899
119002011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11901
11902 PR bootstrap/49794
11903 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
11904 Assign to act.sa_sigaction.
11905 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
11906 current->return_address to char * before arithmetic.
11907
119082011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11909
11910 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
11911 Correct argument types.
11912 Extract code from reason.
11913 (__gnat_install_handler): Assign to act.sa_sigaction.
11914
119152011-07-21 Eric Botcazou <ebotcazou@adacore.com>
11916
11917 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
11918 (GNAT1_OBJS): ...here.
11919
119202011-07-15 Eric Botcazou <ebotcazou@adacore.com>
11921
11922 PR ada/48711
11923 * g-socthi-mingw.adb (Fill): Fix formatting.
11924
11925 * gcc-interface/gigi.h: Move around comment.
11926
119272011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
11928
11929 PR ada/46350
11930 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
11931
119322011-07-14 Florian Weimer <fw@deneb.enyo.de>
11933
11934 PR ada/48711
11935 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
11936
119372011-07-13 Eric Botcazou <ebotcazou@adacore.com>
11938
11939 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
11940 range comparison if Pmode is SImode.
11941
119422011-07-12 Laurent GUERBY <laurent@guerby.net>
11943 Eric Botcazou <ebotcazou@adacore.com>
11944
11945 * adadecode.c: Wrap up in extern "C" block.
11946 * adadecode.h: Likewise.
11947 * adaint.c: Likewise. Remove 'const' keyword.
11948 * adaint.h: Likewise.
11949 * argv.c: Likewise.
11950 * atree.h: Likewise.
11951 * cio.c: Likewise.
11952 * cstreams.c: Likewise.
11953 * env.c: Likewise.
11954 * exit.c: Likewise.
11955 * fe.h: Likewise.
11956 * final.c: Likewise.
11957 * init.c: Likewise.
11958 * initialize.c: Likewise.
11959 * link.c: Likewise.
11960 * namet.h: Likewise.
11961 * nlists.h: Likewise.
11962 * raise.c: Likewise.
11963 * raise.h: Likewise.
11964 * repinfo.h: Likewise.
11965 * seh_init.c: Likewise.
11966 * targext.c: Likewise.
11967 * tracebak.c: Likewise.
11968 * uintp.h: Likewise.
11969 * urealp.h: Likewise.
11970 * xeinfo.adb: Wrap up generated C code in extern "C" block.
11971 * xsinfo.adb: Likewise.
11972 * xsnamest.adb: Likewise.
11973 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
11974 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
11975 * gcc-interface/misc.c: Likewise.
11976 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
11977 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
11978 ada/targext.o here...
11979 (GNAT_ADA_OBJS): ...and not here.
11980 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
11981 (GNATBIND_OBJS): Reorder.
11982
119832011-07-07 Richard Henderson <rth@redhat.com>
11984
11985 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
11986 dwarf2out_frame_init.
11987
119882011-07-07 Eric Botcazou <ebotcazou@adacore.com>
11989
11990 * gcc-interface/misc.c (gnat_init): Tweak previous change.
11991
119922011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11993
11994 PR target/39150
11995 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
11996
119972011-07-06 Richard Guenther <rguenther@suse.de>
11998
11999 * gcc-interface/misc.c (gnat_init): Merge calls to
12000 build_common_tree_nodes and build_common_tree_nodes_2.
12001 Re-initialize boolean_false_node.
12002
120032011-07-02 Eric Botcazou <ebotcazou@adacore.com>
12004 Olivier Hainque <hainque@adacore.com>
12005 Nicolas Setton <setton@adacore.com>
12006
12007 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
12008 the type according to the ARTIFICIAL_P parameter.
12009 (create_type_decl): Likewise.
12010 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
12011
120122011-07-01 Eric Botcazou <ebotcazou@adacore.com>
12013
12014 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
12015 (gnatbind): Likewise.
12016
120172011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12018
12019 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
12020
120212011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12022
12023 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
12024 local variable throughout. Remove useless call to Base_Type.
12025 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
12026 Take it also into account for the volatileness of the field. Set the
12027 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
12028
120292011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12030
12031 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
12032 on a dereference built for a by-ref object if it has an address clause.
12033
120342011-06-18 Eric Botcazou <ebotcazou@adacore.com>
12035
12036 * einfo.ads (Address_Taken): Document use for the second argument of
12037 Asm_Input and Asm_Output attributes.
12038 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
12039 argument is an entity name, then set Address_Taken on it.
12040 <Attribute_Asm_Output>: Likewise.
12041 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
12042 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
12043 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
12044 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
12045
120462011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
12047
12048 PR middle-end/46500
12049 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
12050
120512011-06-14 Joseph Myers <joseph@codesourcery.com>
12052
12053 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
12054 (ada/utils.o): Update dependencies.
12055 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
12056 ../../../libcpp/libcpp.a.
12057 * gcc-interface/utils.c: Include common/common-target.h.
12058 (process_attributes): Use targetm_common.have_named_sections.
12059
120602011-06-07 Richard Guenther <rguenther@suse.de>
12061
12062 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
12063 set_sizetype.
12064
120652011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12066
12067 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
12068 TREE_THIS_NOTRAP flag.
12069
120702011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12071
12072 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
12073 Fix thinko.
12074
120752011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12076
12077 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
12078 constants whose full view has discriminants specially.
12079
120802011-06-06 Eric Botcazou <ebotcazou@adacore.com>
12081
12082 * gcc-interface/utils.c: Include diagnostic.h.
12083 (gnat_write_global_declarations): Output debug information for all
12084 global type declarations before finalizing the compilation unit.
12085 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
12086
120872011-05-25 Jakub Jelinek <jakub@redhat.com>
12088
12089 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
12090
120912011-05-25 Kai Tietz <ktietz@redhat.com>
12092
12093 * adaint.c (__gnat_to_canonical_file_list_next): Use array
12094 initialization instead of const/none-const pointer assignment.
12095
120962011-05-24 Joseph Myers <joseph@codesourcery.com>
12097
12098 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
12099 $(EXTRA_GNAT1_OBJS).
12100 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
12101 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
12102 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
12103 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
12104 libcommon-target.a instead of prefix.o.
12105
121062011-05-21 Joseph Myers <joseph@codesourcery.com>
12107
12108 PR ada/49097
12109 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
12110
121112011-05-20 Joseph Myers <joseph@codesourcery.com>
12112
12113 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
12114 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
12115 instead of version.o.
12116
2d0dd51a 121172011-05-18 Kai Tietz <ktietz@redhat.com>
052e0603
AC
12118
12119 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
12120 boolean_false_node instead of integer_zero_node.
12121 (convert_with_check): Likewise.
12122 * gcc-interface/decl.c (choices_to_gnu): Likewise.
12123
121242011-05-12 Eric Botcazou <ebotcazou@adacore.com>
12125
12126 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
12127 type of the parameter is an unconstrained array, convert the actual to
12128 the type of the formal in the In Out and Out cases as well.
12129
121302011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12131
12132 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
12133 call build_function_type_array or build_varargs_function_type_array
12134 instead.
12135 (create_subprog_type): Don't call build_function_type; call
12136 build_function_type_vec instead.
12137
121382011-05-11 Nathan Froyd <froydnj@codesourcery.com>
12139
12140 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
12141 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
12142 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
12143
121442011-05-07 Eric Botcazou <ebotcazou@adacore.com>
12145
12146 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
12147
12148 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
12149 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
12150
121512011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12152
12153 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
12154
121552011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12156
12157 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
12158 instead of accessing TYPE_ARG_TYPES directly.
12159 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
12160
121612011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12162
12163 PR ada/48844
12164 * gcc-interface/gigi.h (get_variant_part): Declare.
12165 * gcc-interface/decl.c (get_variant_part): Make global.
12166 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
12167 types have the same constant size, are record types and T1 has a
12168 variant part while T2 doesn't.
12169
121702011-05-05 Eric Botcazou <ebotcazou@adacore.com>
12171
12172 * gcc-interface/utils.c (begin_subprog_body): Do not call
12173 get_pending_sizes.
12174 (end_subprog_body): Likewise.
12175
121762011-05-04 Richard Guenther <rguenther@suse.de>
12177
12178 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
12179 int_const_binop.
12180 (pos_to_constructor): Likewise.
12181
121822011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 12183 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
12184
12185 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
12186 of build_function_type. Adjust calls to...
12187 (build_raise_check): ...this. Do not take a void_tree parameter.
12188 Call build_function_type_list instead of build_function_type.
12189 Fix head comment and swap couple of conditional blocks.
12190
121912011-04-30 Eric Botcazou <ebotcazou@adacore.com>
12192
12193 * gnatvsn.ads (Library_Version): Bump to 4.7.
12194 (Current_Year): Bump to 2011.
12195
121962011-04-29 Michael Matz <matz@suse.de>
12197
12198 * gcc-interface/misc.c (gnat_handle_option): Set
12199 warn_maybe_uninitialized.
12200
122012011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
12202
12203 * gnat_ugn.texi (Complexity Metrics Control): Update link to
12204 the Watson/McCabe paper.
12205
122062011-04-23 Jim Meyering <meyering@redhat.com>
12207
12208 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
12209
122102011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12211
12212 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
12213 onto the new type.
12214
122152011-04-22 Eric Botcazou <ebotcazou@adacore.com>
12216
12217 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
12218 parameter.
12219 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
12220 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
12221 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
12222 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
12223 <all>: Do not set flags on the reused DECL node coming from an alias.
12224 Set DECL_IGNORED_P on the DECL node built for subprograms if they
12225 don't need debug info here...
12226 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
12227 (gigi): Adjust calls to create_subprog_decl.
12228 (build_raise_check): Likewise.
12229 (establish_gnat_vms_condition_handler): Likewise.
12230 (Compilation_Unit_to_gnu): Likewise.
12231 (gnat_to_gnu): Likewise.
12232
122332011-04-21 Eric Botcazou <ebotcazou@adacore.com>
12234
12235 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
12236 (NO_REORDER_ADAFLAGS): New variable.
12237 (EXTRA_GNATTOOLS): Always define.
12238 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
12239 Clean up and adjust list of files compiled with special options.
12240 * gcc-interface/Make-lang.in: Likewise.
12241 (ada/decl.o): Cosmetical change.
12242 (ada/misc.o): Remove dependency on $(PLUGIN_H).
12243
122442011-04-20 Jim Meyering <meyering@redhat.com>
12245
12246 * initialize.c (__gnat_initialize): Remove useless if-before-free.
12247
122482011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12249
12250 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
12251 $(CFLAGS) on the link line.
12252
122532011-04-17 Eric Botcazou <ebotcazou@adacore.com>
12254
12255 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
12256 padded type built for the return type if it is unconstrained.
12257
122582011-04-14 Nathan Froyd <froydnj@codesourcery.com>
12259
12260 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
12261
122622011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12263
12264 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
12265 before calling TREE_CHAIN.
12266 * gcc-interface/misc.c (gnat_init_ts): New function.
12267 (LANG_HOOKS_INIT_TS): Define.
12268
122692011-04-12 Martin Jambor <mjambor@suse.cz>
12270
12271 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
12272 instead of cgraph_node.
12273
122742011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12275
12276 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
12277 alignment on fields of the RETURN type built for the Copy-In Copy-Out
12278 mechanism.
12279
122802011-04-08 Eric Botcazou <ebotcazou@adacore.com>
12281
12282 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
12283 of aggregate types that contain a placeholder.
12284
122852011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12286
12287 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
12288 TYPE_ARG_TYPES.
12289 (handle_type_generic_attribute): Likewise.
12290
122912011-04-04 Eric Botcazou <ebotcazou@adacore.com>
12292
12293 PR ada/47163
12294 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
12295
122962011-04-04 Kai Tietz <ktietz@redhat.com>
12297
12298 PR ada/47163
12299 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
12300 to flag value.
12301
123022011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12303
12304 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
12305 type case, do not strip a padding type around the array type.
12306
123072011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12308
12309 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
12310 types.
12311
123122011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12313
12314 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
12315 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
12316 code for -feliminate-unused-debug-types.
12317 (gnat_post_options): Likewise.
12318
123192011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12320
12321 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12322 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
12323 distinct copy.
12324
123252011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12326
12327 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
12328 DECL_ARTIFICIAL flag on enumeration types.
12329
123302011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12331
12332 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
12333 fat pointer types artificial unconditionally.
12334 <E_Array_Subtype>: Attach the base array type as a parallel type if it
12335 isn't artificial.
12336
123372011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12338
12339 * gcc-interface/gigi.h (get_dummy_type): Declare.
12340 (build_dummy_unc_pointer_types): Likewise.
12341 (finish_fat_pointer_type): Likewise.
12342 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
12343 fat pointer type has been built, complete it in place.
12344 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
12345 and thin pointers. Remove useless variable.
12346 (finish_fat_pointer_type): Make global and move to...
12347 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
12348 (get_dummy_type): New function.
12349 (build_dummy_unc_pointer_types): Likewise.
12350 (gnat_pushdecl): Propage the name to the anonymous variants only.
12351 (update_pointer_to): Only adjust the pointer types in the unconstrained
12352 array case.
12353
123542011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12355
12356 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
12357 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
12358 if this is a Taft amendment type and the full declaration is available.
12359 * gcc-interface/trans.c (process_type): Likewise.
12360 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
12361 (process_freeze_entity): Likewise.
12362 * gcc-interface/utils.c (dummy_global): New static variable.
12363 (gnat_write_global_declarations): If there are types declared as used
12364 at the global level, insert them in the global hash table.
12365
123662011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12367
12368 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
12369 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
12370 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
12371 copy.
12372 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
12373 flag of the type accordingly.
12374 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
12375
123762011-04-02 Eric Botcazou <ebotcazou@adacore.com>
12377
12378 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12379 finalizing types when updating the pointers to the designated type.
12380 <all>: Finalize the deferred types even if we didn't defer processing
12381 of incomplete types in this invocation.
12382
123832011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
12384 Nicolas Setton <setton@adacore.com>
12385 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
12386
12387 * gcc-interface/misc.c (gnat_descriptive_type): New function.
12388 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
12389
123902011-03-28 Kai Tietz <ktietz@redhat.com>
12391
12392 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
12393 Windows targets.
12394 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
12395 * system-mingw.ads (System): Change ZCX_By_Default default to True.
12396
12397 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
12398
123992011-03-28 Tristan Gingold <gingold@adacore.com>
12400
12401 PR ada/44431
12402 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
12403 Use ada output of gnatbind.
12404 (ada/b_gnatb.adb): Ditto.
12405 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
12406 (ada.mostlyclean, ada.stage1)
12407 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
12408 (ada.stagefeedback): Adjust.
12409 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
12410 Use ada output of gnatbind.
12411 (b_gnatm.adb): Ditto.
12412 (b_gnatl.o, b_gnatm.o): New rules.
12413
124142011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12415
12416 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12417 for the padded type built to support a specified size or alignment.
12418
124192011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12420
12421 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
12422 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
12423 unconditionally to the end of the unit when the designated type is
12424 limited_with'ed.
12425 <all>: Rename local variable. Attempt to un-defer types only and do it
12426 for limited_with'ed types as well.
12427 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
12428 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
12429 consistently and remove redundant call to finalize_from_with_types.
12430
124312011-03-26 Eric Botcazou <ebotcazou@adacore.com>
12432
12433 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
12434 subprograms without a previous spec declared in the same unit.
12435 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
12436 subprograms at the end of the unit instead of at the beginning.
12437 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
12438 isn't public for the special handling of non-inline functions nested
12439 inside inline external functions.
12440
124412011-03-25 Jeff Law <law@redhat.com>
12442
12443 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
12444
124452011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12446
12447 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
12448 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
12449 to compute Set_Size_Depends_On_Discriminant.
12450 (Layout_Type): Call it on array types in back-end layout mode.
12451 * sem_util.adb (Requires_Transient_Scope): Return true for array
12452 types only if the size depends on the value of discriminants.
12453 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
12454 type if the RHS is a call to a function that returns an unconstrained
12455 type with default discriminant.
12456
124572011-03-24 Eric Botcazou <ebotcazou@adacore.com>
12458
12459 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
12460 non-conversion to the nominal result type at the end.
12461
124622011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12463
12464 * gcc-interface/trans.c (create_temporary): New function taken from...
12465 (create_init_temporary): ...here. Call it.
12466 (call_to_gnu): Create the temporary for the return value early, if any.
12467 Create it for a function with copy-in/copy-out parameters if there is
12468 no target; in other cases of copy-in/copy-out, use another temporary.
12469 Push the new binding level lazily. Add and rename local variables.
12470
124712011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12472
12473 * gcc-interface/decl.c (validate_size): Improve comments and tweak
12474 error message.
12475 (set_rm_size): Likewise.
12476
124772011-03-23 Eric Botcazou <ebotcazou@adacore.com>
12478
12479 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
12480 for the padded type built in order to support a specified alignment.
12481 Fix incorrect formatting.
12482
124832011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12484
12485 PR bootstrap/48216
12486 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
12487
124882011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12489
12490 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
12491 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
12492 to the end of the list. Adjust recursive call. Rename local variable.
12493 If REORDER is true, reorder components of the record type.
12494 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
12495 components_to_record and adjust the parameter list.
12496
124972011-03-21 Eric Botcazou <ebotcazou@adacore.com>
12498
12499 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
12500 disabled, use the variable for bounds of loop iteration scheme.
12501
125022011-03-21 Kai Tietz <ktietz@redhat.com>
12503
12504 PR target/12171
12505 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
12506
125072011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12508
12509 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
12510 out whether the expression is read-only. Short-circuit placeholder
12511 case and rename a couple of local variables.
12512
125132011-03-17 Eric Botcazou <ebotcazou@adacore.com>
12514
12515 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
12516 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
12517 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
12518 (convert): Deal with conversions from a smaller form type specially.
12519
125202011-02-14 Eric Botcazou <ebotcazou@adacore.com>
12521
12522 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
12523 its argument, except for the special -I- switch.
12524
125252011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
12526
12527 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
12528 "Ada Issues".
12529
125302011-02-08 Eric Botcazou <ebotcazou@adacore.com>
12531
12532 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
12533
125342011-02-03 Eric Botcazou <ebotcazou@adacore.com>
12535
12536 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
12537 GNAT_FORMAL.
12538 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
12539 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
12540 instead of GNAT_FORMAL. Protect the expression against multiple uses.
12541 Do not generate the check directly, instead instantiate the template
12542 check present in the descriptor.
12543 (make_descriptor_field): Move around.
12544 (build_vms_descriptor32): Build a template check in the POINTER field.
12545 (build_vms_descriptor): Remove useless suffixes.
12546 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
12547
125482011-01-26 Eric Botcazou <ebotcazou@adacore.com>
12549
12550 PR bootstrap/47467
12551 * targext.c: Include target files if IN_RTS is defined.
12552
125532011-01-26 Richard Guenther <rguenther@suse.de>
12554
12555 PR bootstrap/47467
12556 * targext.c: Include config.h.
12557 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
12558 dependency.
12559
125602011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 12561 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
12562
12563 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
12564
125652011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12566
12567 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
12568 end-of-case on the end label and its associated gotos, if any.
12569
125702011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12571
12572 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
12573 expressions of the parameter cache within the statement group of
12574 the CICO mechanism.
12575
125762011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 12577 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
12578
12579 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
12580 (set_end_locus_from_node): New function.
12581 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
12582 make and the function end_locus.
12583 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
12584 for the elaboration subprogram.
12585 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
12586 set the end_locus of the expression as well.
12587
125882011-01-04 Eric Botcazou <ebotcazou@adacore.com>
12589
12590 PR ada/47131
12591 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
12592 variables that are referenced in exception handlers volatile.
12593
12594
12595\f
12596Copyright (C) 2011 Free Software Foundation, Inc.
12597
12598Copying and distribution of this file, with or without modification,
12599are permitted in any medium without royalty provided the copyright
12600notice and this notice are preserved.
12601
12602 * gnat_rm.texi: Ramification of pragma Eliminate documentation
12603 - fix bugs in the description of Source_Trace;
12604 - get rid of UNIT_NAME;
12605
4fbad0ba
AC
126062011-08-02 Javier Miranda <miranda@adacore.com>
12607
12608 * exp_ch9.adb
12609 (Build_Dispatching_Requeue): Adding support for VM targets
12610 since we cannot directly reference the Tag entity.
12611 * exp_sel.adb (Build_K): Adding support for VM targets.
12612 (Build_S_Assignment): Adding support for VM targets.
12613 * exp_disp.adb
12614 (Default_Prim_Op_Position): In VM targets do not restrict availability
12615 of predefined interface primitives to compiling in Ada 2005 mode.
12616 (Is_Predefined_Interface_Primitive): In VM targets this service is not
12617 restricted to compiling in Ada 2005 mode.
12618 (Make_VM_TSD): Generate code that declares and initializes the OSD
12619 record. Needed to support dispatching calls through synchronized
12620 interfaces.
12621 * exp_ch3.adb
12622 (Make_Predefined_Primitive_Specs): Enable generation of predefined
12623 primitives associated with synchronized interfaces.
12624 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
12625 primitives associated with synchronized interfaces.
12626
126272011-08-02 Yannick Moy <moy@adacore.com>
12628
12629 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
12630 statements hidden in SPARK if preceded by the HIDE directive
12631 (Parse_Exception_Handlers): mark each exception handler in a sequence of
12632 exception handlers as hidden in SPARK if preceded by the HIDE directive
12633 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
12634 if starting with the HIDE directive
12635 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
12636 starting with the HIDE directive; mark the declarations in a private
12637 part as hidden in SPARK if the private part starts with the HIDE
12638 directive
12639 * restrict.adb, restrict.ads
12640 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
12641 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
12642 argument node belongs to a part which is hidden in SPARK
12643 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
12644 parts in SPARK; protect the possibly costly call to
12645 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
12646 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
12647 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
12648 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
12649 Tok_SPARK_Hide.
12650 (Scan): recognize special comment starting with '#' and followed by
12651 SPARK keyword "hide" as a HIDE directive.
12652
126532011-08-02 Yannick Moy <moy@adacore.com>
12654
12655 * types.ads, erroutc.ads: Minor reformatting.
12656
126572011-08-02 Vincent Celier <celier@adacore.com>
12658
12659 * link.c: Add response file support for cross platforms.
12660
6ff6152d
ES
126612011-08-02 Ed Schonberg <schonberg@adacore.com>
12662
12663 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
12664 in an association, set parent field of copy before partial analysis.
12665 * sem_res.adb (Resolve_Slice): create reference to itype only when
12666 expansion is enabled.
12667
975c6896
YM
126682011-08-02 Yannick Moy <moy@adacore.com>
12669
12670 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
12671 for new flag denoting which subprogram bodies are in ALFA
12672 * restrict.adb, sem_ch7.adb: Update comment
12673 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
12674 sem_ch9.adb, sem_res.adb: Add calls to
12675 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
12676 * sem_ch6.adb (Analyze_Function_Return): add calls to
12677 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
12678 middle of the body, and extended return.
12679 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
12680 False when missing return.
12681 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
12682 to True for subprograms whose spec is in ALFA. Remove later on the flag
12683 on the entity used for a subprogram body when there exists a separate
12684 declaration.
12685 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
12686 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
12687 False, otherwise do nothing.
12688
afc8324d
AC
126892011-08-02 Robert Dewar <dewar@adacore.com>
12690
12691 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
12692
126932011-08-02 Yannick Moy <moy@adacore.com>
12694
12695 * sem_ch4.ads: minor formatting.
12696
2ba431e5
YM
126972011-08-02 Yannick Moy <moy@adacore.com>
12698
12699 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
12700 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
12701 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
12702 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
12703 opt.ads: cleanup of SPARK mode
12704
0f853035
YM
127052011-08-02 Yannick Moy <moy@adacore.com>
12706
12707 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
12708 types.
12709 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
12710 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
12711 * sem_ch3.adb
12712 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
12713 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
12714 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
12715 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
12716 types.
12717 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
12718 non-static range.
12719 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
12720 functions whose return type is not in ALFA.
12721 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
12722 specifications.
12723 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
12724 parameter's type is not in ALFA.
12725 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
12726 types are in ALFA.
12727
d2b10647
ES
127282011-08-02 Ed Schonberg <schonberg@adacore.com>
12729
12730 * sem_ch6 (Analyze_Expression_Function): treat the function as
12731 Inline_Always, and introduce a subprogram declaration for it when it is
12732 not a completion.
12733 * inline.adb (Add_Inlined_Body): recognize bodies that come from
12734 expression functions, so that the back-end can determine whether they
12735 can in fact be inlined.
12736 * sem_util.adb (Is_Expression_Function): predicate to determine whether
12737 a function body comes from an expression function.
12738
c7b9d548
AC
127392011-08-02 Gary Dismukes <dismukes@adacore.com>
12740
12741 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
12742 null exclusions to test Can_Never_Be_Null on the anonymous access types
12743 of the formals rather than testing the formals themselves. Exclude this
12744 check in cases where the Old_Formal is marked as a controlling formal,
12745 to avoid issuing spurious errors for bodies completing dispatching
12746 operations (due to the flag not getting set on controlling access
12747 formals in body specs).
12748 (Find_Corresponding_Spec): When checking full and subtype conformance of
12749 subprogram bodies in instances, pass Designated and E in that order, for
12750 consistency with the expected order of the formals (New_Id followed by
12751 Old_Id).
12752
127532011-08-02 Robert Dewar <dewar@adacore.com>
12754
12755 * sem_ch8.adb: Minor reformatting.
12756
1138cf59
AC
127572011-08-02 Ed Schonberg <schonberg@adacore.com>
12758
12759 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
12760 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
12761 primitive operations of class-wide actuals.
12762
127632011-08-02 Javier Miranda <miranda@adacore.com>
12764
12765 * exp_atag.ads, exp_atag.adb
12766 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
12767 since its value is implicitly passed in argument Typ.
12768 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
12769 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
12770 Build_Common_Dispatching_Select_Statements.
12771
7b9db926
RD
127722011-08-02 Robert Dewar <dewar@adacore.com>
12773
12774 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
12775 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
12776 Minor reformatting.
12777
e8374e7a
AC
127782011-08-02 Robert Dewar <dewar@adacore.com>
12779
12780 * sem_res.adb: Minor reformatting.
12781 * sem_prag.adb: Minor reformatting.
12782
127832011-08-02 Javier Miranda <miranda@adacore.com>
12784
12785 * exp_atag.adb, exp_atags.ads
12786 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
12787 by the tagged type Entity. Required to use this routine in the VM
12788 targets since we do not have available the Tag entity in the VM
12789 platforms.
12790 * exp_ch6.adb
12791 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
12792 Ada.Tags has not been previously loaded.
12793 * exp_ch7.adb
12794 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
12795 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
12796 * sem_aux.adb
12797 (Enclosing_Dynamic_Scope): Add missing support to handle the full
12798 view of enclosing scopes. Required to handle enclosing scopes that
12799 are synchronized types whose full view is a task type.
12800 * exp_disp.adb
12801 (Build_VM_TSDs): Minor code improvement to avoid generating and
12802 analyzing lists with empty nodes.
12803 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
12804 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
12805 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
12806 (Make_Disp_Timed_Select_Body): Add support for VM targets.
12807 (Make_Select_Specific_Data_Table): Add support for VM targets.
12808 (Make_VM_TSD): Generate code to initialize the SSD structure of
12809 the TSD.
12810
128112011-08-02 Yannick Moy <moy@adacore.com>
12812
12813 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
12814 cross-references section in ALI.
12815 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
12816 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
12817 Sub).
12818 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
12819 subprogram or package entity of a node
12820 (Is_Local_Reference_Type): new function returns True for references
12821 selected in local cross-references.
12822 (Lt): function extracted from Lt in Output_References
12823 (Write_Entity_Name): function extracted from Output_References
12824 (Generate_Definition): generate reference with type 'D' for definition
12825 of objects (object declaration and parameter specification), with
12826 appropriate locations and units, for use in local cross-references.
12827 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
12828 references of type 'I' for initialization in object definition.
12829 (Output_References): move part of function Lt and procedure
12830 Write_Entity_Name outside of the body. Ignore references of types 'D'
12831 and 'I' introduced for local cross-references.
12832 (Output_Local_References): new procedure to output the local
12833 cross-references sections.
12834 (Lref_Entity_Status): new array defining whether an entity is a local
12835 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
12836 with 'I' type when initialization expression is present.
12837 * get_scos.adb, get_scos.ads: Correct comments and typos
12838
1f6439e3
AC
128392011-08-02 Javier Miranda <miranda@adacore.com>
12840
12841 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
12842 the JVM target.
12843 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
12844 the JVM target.
12845 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
12846 TSD support.
12847
128482011-08-02 Vincent Celier <celier@adacore.com>
12849
12850 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
12851 (No_Space_Img): New function
12852 (Find_Excluded_Sources): When reading from a file, record the file name
12853 and the line number for each excluded source.
12854 (Mark_Excluded_Sources): When reporting an error, if the excluded
12855 sources were read from a file, include file name and line number in
12856 the error message.
12857
128582011-08-02 Ed Schonberg <schonberg@adacore.com>
12859
12860 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
12861
ab027d28
RD
128622011-08-02 Robert Dewar <dewar@adacore.com>
12863
12864 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
12865
b3b28b0c
JM
128662011-08-02 Javier Miranda <miranda@adacore.com>
12867
12868 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
12869 generation of TSDs to the DOTNET compiler.
12870 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
12871 generation of TSDs to the DOTNET compiler.
12872
9732e886
JM
128732011-08-02 Javier Miranda <miranda@adacore.com>
12874
12875 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
12876 record of all the tagged types declared inside library level package
12877 declarations, library level package bodies or library level subprograms.
12878 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
12879 associated with a given tagged type.
12880 (Build_VM_TSDs): New subprogram.
12881 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
12882 compilation units that are subprograms.
12883 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
12884 compilation units that are package bodies.
12885 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
12886 units that are a package declaration or a package instantiation.
12887 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
12888 reorganization to improve the error generated by the frontend when the
12889 function Ada.Tags.Secondary_Tag is not available.
12890 * rtsfind.ads (RE_Register_TSD): New runtime entity.
12891 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
12892
e526d0c7
AC
128932011-08-02 Javier Miranda <miranda@adacore.com>
12894
12895 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
12896
128972011-08-02 Robert Dewar <dewar@adacore.com>
12898
12899 * s-imenne.ads: Minor reformatting.
12900
129012011-08-02 Robert Dewar <dewar@adacore.com>
12902
12903 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
12904 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
12905 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
12906
129072011-08-02 Robert Dewar <dewar@adacore.com>
12908
12909 * einfo.ads (Materialize_Entity): Document this is only for renamings
12910 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
12911 required debug information in the case where we transform the object
12912 declaration into a renaming declaration.
12913 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
12914 object
12915 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
12916 Materialize_Entity.
12917
5b1e6aca
RD
129182011-08-02 Robert Dewar <dewar@adacore.com>
12919
12920 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
12921 Suppress_Init_Procs.
12922 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
12923 Suppress_Initialization/Initialization_Suppressed.
12924 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
12925 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
12926 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
12927 * sem_prag.adb: New processing for pragma Suppress_Initialization.
12928
5ad4969d
RD
129292011-08-02 Robert Dewar <dewar@adacore.com>
12930
12931 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
12932 Minor reformatting.
12933
8c4ee6f5
AC
129342011-08-02 Ed Schonberg <schonberg@adacore.com>
12935
12936 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
12937 only have inheritable classwide pre/postconditions.
12938
129392011-08-02 Javier Miranda <miranda@adacore.com>
12940
12941 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
12942 * rtsfind.ads (RE_Check_TSD): New runtime entity.
12943 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
12944 checks if the external tag of a type is the same as the external tag
12945 of some other declaration.
12946
0b3d16c0
AC
129472011-08-02 Thomas Quinot <quinot@adacore.com>
12948
12949 * s-taskin.ads: Minor reformatting.
12950
129512011-08-02 Emmanuel Briot <briot@adacore.com>
12952
12953 * g-comlin.adb (Display_Help): swap the order in which it prints the
12954 short help and the general usage.
12955
129562011-08-02 Ed Schonberg <schonberg@adacore.com>
12957
12958 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
12959 the aspect declarations and attach them to the generic copy for
12960 subsequent analysis.
12961 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
12962 declarations of the generic tree to the new subprogram declarations.
12963 * sem_attr.adb (Check_Precondition_Postcondition): recognize
12964 conditions that apply to a subprogram instance.
12965
129662011-08-02 Robert Dewar <dewar@adacore.com>
12967
12968 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
12969
129702011-08-02 Ed Schonberg <schonberg@adacore.com>
12971
12972 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
12973 private type with a tagged full view is not derived in the immediate
12974 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
12975
4637729f
AC
129762011-08-02 Robert Dewar <dewar@adacore.com>
12977
12978 * exp_ch4.adb: Minor reformatting.
12979
129802011-08-02 Ed Schonberg <schonberg@adacore.com>
12981
12982 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
12983 Ada2012 iterator, the loop will be rewritten during expansion into a
12984 while loop with a cursor and an element declaration. Do not analyze the
12985 body in this case, because if the container is for indefinite types the
12986 actual subtype of the elements will only be determined when the cursor
12987 declaration is analyzed.
12988
129892011-08-02 Arnaud Charlet <charlet@adacore.com>
12990
12991 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
12992 size/alignment related attributes in CodePeer_Mode.
12993
129942011-08-02 Gary Dismukes <dismukes@adacore.com>
12995
12996 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
12997 Prepend_Element, since this can result in the operation getting the
12998 wrong slot in the full type's dispatch table if the full type has
12999 inherited operations. The incomplete type's operation will get added
13000 to the proper position in the full type's primitives
13001 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
13002 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
13003 dispatching operations, since there are cases where nonprimitive
13004 subprograms can get added to the list of incomplete dependents (such
13005 as subprograms in nested packages).
13006 * sem_ch6.adb (Process_Formals): First, remove test for being in a
13007 private part when determining whether to add a primitive with a
13008 parameter of a tagged incomplete type to the Private_Dependents list.
13009 Such primitives can also occur in the visible part, and should not have
13010 been excluded from being private dependents.
13011 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
13012 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
13013 list of a Taft-amendment incomplete type is a primitive before issuing
13014 an error that the full type must appear in the same unit. There are
13015 cases where nonprimitives can be in the list (such as subprograms in
13016 nested packages).
13017 * sem_disp.adb (Derives_From): Use correct condition for checking that
13018 a formal's type is derived from the type of the corresponding formal in
13019 the parent subprogram (the condition was completely wrong). Add
13020 checking that was missing for controlling result types being derived
13021 from the result type of the parent operation.
13022
4c60de0c
YM
130232011-08-02 Yannick Moy <moy@adacore.com>
13024
13025 * errout.adb (First_Node): minor renaming
13026 * restrict.adb (Check_Formal_Restriction): put restriction warning on
13027 first node.
13028
f5afb270
AC
130292011-08-02 Yannick Moy <moy@adacore.com>
13030
13031 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
13032 before accessing operands.
13033 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
13034 decide whether an initialization expression respects SPARK rules, as
13035 the plain node is the expanded one. This allows for more valid warnings
13036 to be issued.
13037 * gnat_rm.texi: Minor update.
13038
130392011-08-02 Arnaud Charlet <charlet@adacore.com>
13040
13041 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
13042 previous change.
13043
130442011-08-02 Robert Dewar <dewar@adacore.com>
13045
13046 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
13047
130482011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13049
13050 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
13051 loop statements and the element renaming declaration with a block when
13052 the element type is controlled.
13053
130542011-08-02 Yannick Moy <moy@adacore.com>
13055
13056 * sinfo.ads: Minor formatting.
13057
130582011-08-02 Ed Schonberg <schonberg@adacore.com>
13059
13060 * sem_aggr.adb (Add_Association): if the association has a box and no
13061 expression, use the Sloc of the aggregate itself for the new
13062 association.
13063 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
13064 the Original_Node.
13065
db72f10a
AC
130662011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13067
13068 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
13069 When a container is provided via a function call, generate a renaming
13070 of the function result. This avoids the creation of a transient scope
13071 and the premature finalization of the container.
13072 * exp_ch7.adb (Is_Container_Cursor): Removed.
13073 (Wrap_Transient_Declaration): Remove the supression of the finalization
13074 of the list controller when the declaration denotes a container cursor,
13075 it is not needed.
13076
130772011-08-02 Yannick Moy <moy@adacore.com>
13078
13079 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
13080 node is from source, instead of the original node being from source.
13081 * sem_aggr.adb
13082 (Resolve_Array_Aggregate): refine the check for a static expression, to
13083 recognize also static ranges
13084 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
13085 Array_Type_Declaration): postpone the test for the type being a subtype
13086 mark after the type has been resolved, so that component-selection and
13087 expanded-name are discriminated.
13088 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
13089 to distinguish the case of an iteration scheme, so that an error is
13090 issed on a non-static range in SPARK except in an iteration scheme.
13091 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
13092 In_Iter_Schm = True.
13093 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
13094 user-defined operators so that they are allowed in renaming
13095 * sem_ch8.adb
13096 (Find_Selected_Component): refine the check for prefixing of operators
13097 so that they are allowed in renaming. Move the checks for restrictions
13098 on selector name after analysis discriminated between
13099 component-selection and expanded-name.
13100 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
13101 concatenation argument of string type if it is static.
13102 * sem_util.adb, sem_util.ads
13103 (Check_Later_Vs_Basic_Declarations): add a new function
13104 Is_Later_Declarative_Item to decice which declarations are allowed as
13105 later items, in the two different modes Ada 83 and SPARK. In the SPARK
13106 mode, add that renamings are considered as later items.
13107 (Enclosing_Package): new function to return the enclosing package
13108 (Enter_Name): correct the rule for homonyms in SPARK
13109 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
13110 from source (result of expansion) to avoid issuing wrong warnings.
13111
131122011-08-02 Ed Schonberg <schonberg@adacore.com>
13113
13114 * errout.adb: On anything but an expression First_Node returns its
13115 argument.
13116
23685ae6
AC
131172011-08-02 Pascal Obry <obry@adacore.com>
13118
13119 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
13120
131212011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13122
13123 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
13124 Set the associated loop as the related expression of internally
13125 generated cursors.
13126 * exp_ch7.adb (Is_Container_Cursor): New routine.
13127 (Wrap_Transient_Declaration): Supress the finalization of the list
13128 controller when the declaration denotes a container cursor.
13129
131302011-08-02 Yannick Moy <moy@adacore.com>
13131
13132 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
13133 command line now.
13134 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
13135 expression is a simple expression. This check cannot be performed in
13136 the semantics, so just drop it.
13137 (P_Index_Or_Discriminant_Constraint): move check that the index or
13138 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
13139 semantics. Other cases were previously checked in the semantics.
13140 * par-ch4.adb (P_Name): move checks that a selector name is not
13141 character literal or an operator symbol to Find_Selected_Component in
13142 the semantics
13143 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
13144 declarations are not placed after later declarations in a separate
13145 procedure in Sem_Util (possibly not the best choice?), to be used both
13146 during parsing, for Ada 83 mode, and during semantic analysis, for
13147 SPARK mode.
13148 * par-endh.adb (Check_End): move check that end label is not missing
13149 to Process_End_Label in the semantics
13150 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
13151 the special case for SPARK restriction
13152 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
13153 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
13154 parameter Force to issue the error message even on internal node (used
13155 for generated end label). Call Check_Restriction to check when an error
13156 must be issued. In SPARK mode, issue an error message even if the
13157 restriction is not set.
13158 (Check_Restriction): new procedure with an additional out parameter to
13159 inform the caller that a message has been issued
13160 * sem_aggr.adb: Minor modification of message
13161 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
13162 instead of issuing an error message directly
13163 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
13164 declarations are not placed after later declarations, by calling
13165 Check_Later_Vs_Basic_Declarations
13166 (Analyze_Subtype_Declaration): move here the check that an index or
13167 discriminant constraint must be a subtype mark. Change the check that
13168 a subtype of String must start at one so that it works on subtype marks.
13169 * sem_ch4.adb (Analyze_Call): move here the check that a named
13170 association cannot follow a positional one in a call
13171 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
13172 instead of issuing an error message directly
13173 * sem_ch8.adb (Find_Selected_Component): move here the check that a
13174 selector name is not a character literal or an operator symbol. Move
13175 here the check that the prefix of an expanded name cannot be a
13176 subprogram or a loop statement.
13177 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
13178 procedure called from parsing and semantics to check that basic
13179 declarations are not placed after later declarations
13180 (Process_End_Label): move here the check that end label is not missing
13181
131822011-08-02 Arnaud Charlet <charlet@adacore.com>
13183
13184 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
13185 representation clause in codepeer mode, since it confuses CodePeer and
13186 does not bring useful info.
13187
131882011-08-02 Ed Falis <falis@adacore.com>
13189
13190 * init.c: initialize fp hw on MILS.
13191
131922011-08-02 Ed Schonberg <schonberg@adacore.com>
13193
13194 * errout.adb (First_Node): for bodies, return the node itself (small
13195 optimization). For other nodes, do not check source_unit if the node
13196 comes from Standard.
13197
d2d9cc22
AC
131982011-08-02 Robert Dewar <dewar@adacore.com>
13199
13200 * exp_ch3.adb: Minor comment additions.
13201 * sem_ch13.adb: Minor reformatting.
13202
132032011-08-02 Pascal Obry <obry@adacore.com>
13204
13205 * make.adb, makeutl.adb: Removes some superfluous directory separator.
13206
a01b9df6
AC
132072011-08-02 Robert Dewar <dewar@adacore.com>
13208
13209 * sem_attr.adb: Minor reformatting.
13210
132112011-08-02 Robert Dewar <dewar@adacore.com>
13212
13213 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
13214 (Has_Default_Component_Value): Removed
13215 * einfo.ads Comment updates
13216 (Has_Default_Aspect): Replaces Has_Default_Value
13217 (Has_Default_Component_Value): Removed
13218 * exp_ch13.adb
13219 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
13220 * exp_ch3.adb
13221 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
13222 (Get_Simple_Init_Val): Handle Default_Value aspect
13223 (Needs_Simple_Initialization): Handle Default_Value aspect
13224 * exp_ch3.ads: Needs_Simple_Initialization
13225 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
13226 * par-prag.adb (Pragma_Default[_Component]Value) Removed
13227 * sem_ch13.adb
13228 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
13229 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
13230 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
13231
132322011-08-02 Ed Schonberg <schonberg@adacore.com>
13233
13234 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
13235 package containing iteration primitives.
13236 exp_ch5.adb (Expand_Iterator_Loop): ditto.
13237
75c90775
AC
132382011-08-02 Ed Schonberg <schonberg@adacore.com>
13239
13240 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
13241 "of", pre-analyze expression in case it is a function call with
13242 finalization actions that must be placed ahead of the loop.
13243 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
13244 on an Ada2012 iterator, insert them ahead of the rewritten loop.
13245
132462011-08-02 Geert Bosch <bosch@adacore.com>
13247
13248 * cstand.adb (Create_Float_Types): Only consider C's long double for
13249 Long_Long_Float, in addition to double.
13250
ded8909b
AC
132512011-08-02 Robert Dewar <dewar@adacore.com>
13252
13253 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
13254 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
13255 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
13256 Minor reformatting.
13257
132582011-08-02 Ed Schonberg <schonberg@adacore.com>
13259
13260 * sem_attr.adb: handle properly 'Result when it is a prefix of an
13261 indexed component.
13262
132632011-08-02 Javier Miranda <miranda@adacore.com>
13264
13265 * einfo.ads, einfo.adb
13266 (Original_Access_Type): Move this attribute to Node26 since there was
13267 an undocumented use of Node21 in E_Access_Subprogram_Type entities
13268 which causes conflicts and breaks the generation of the .NET compiler.
13269 (Interface_Name): Add missing documentation on JGNAT only uses of
13270 this attribute.
13271
70c34e1c
AC
132722011-08-02 Geert Bosch <bosch@adacore.com>
13273
13274 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
13275 (Find_Back_End_Float_Type): Likewise
13276 (Create_Back_End_Float_Types): Likewise
13277 (Create_Float_Types): Likewise
13278 (Register_Float_Type): Likewise
13279 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
13280 Nlist and split out type selection in new local Find_Base_Type function.
13281 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
13282 Nlist
13283 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
13284
132852011-08-02 Robert Dewar <dewar@adacore.com>
13286
13287 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
13288 alpha order).
13289 * opt.ads: Minor comment change.
13290 * sem_ch12.adb: Minor code reorganization.
13291
b715bc59
AC
132922011-08-02 Gary Dismukes <dismukes@adacore.com>
13293
13294 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
13295 subtype's list of rep items to the list on the full subtype in the case
13296 where the lists are the same.
13297
132982011-08-02 Geert Bosch <bosch@adacore.com>
13299
13300 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
13301 using the one from System.Strings, which also deallocates all strings.
13302
002bdd68
AC
133032011-08-02 Geert Bosch <bosch@adacore.com>
13304
13305 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
13306 function.
13307 * gcc-interface/Make-lang.in: Update dependencies.
13308
133092011-08-02 Olivier Hainque <hainque@adacore.com>
13310
13311 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
13312 end_locus.
13313
499769ec
AC
133142011-08-02 Javier Miranda <miranda@adacore.com>
13315
13316 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
13317 associated with anonymous access to subprograms.
13318
133192011-08-02 Geert Bosch <bosch@adacore.com>
13320
13321 * opt.ads
13322 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
13323 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
13324 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
13325 (Add_Symbol_Definition): Move to switch-c.adb
13326 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
13327 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
13328 (Add_Symbol_Definition): Move to switch-c.adb.
13329 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
13330 * sem_warn.adb
13331 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13332 Move to warnsw.adb.
13333 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
13334 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
13335 Move to warnsw.adb.
13336 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
13337 (Add_Symbol_Definition): Moved from Prepcomp.
13338 * switch-c.ads: Update copyright notice. Use String_List instead of
13339 Argument_List, removing dependency on System.OS_Lib.
13340
aa1e353a
AC
133412011-08-02 Yannick Moy <moy@adacore.com>
13342
13343 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
13344 mode on initialization expression which does not respect SPARK
13345 restrictions.
13346 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
13347 if the tree referenced by its argument represents an initialization
13348 expression in SPARK, suitable for initializing an object in an object
13349 declaration.
13350
133512011-08-02 Javier Miranda <miranda@adacore.com>
13352
13353 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
13354 internally generated access to subprogram with its associated protected
13355 subprogram type.
13356 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
13357
15b682ca
GB
133582011-08-02 Geert Bosch <bosch@adacore.com>
13359
13360 * cstand.adb (Register_Float_Type): Print information about type to
13361 register, if the Debug_Flag_Dot_B is set.
13362 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
13363 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
13364 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
13365 with a requested precision of more than Max_Digits digits and no more
13366 than Max_Base_Digits digits, if a range specification is present and the
13367 Predefined_Float_Types list has a suitable type to derive from.
13368 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
13369 case of type completion with pragma Import
13370 * sem_prag.adb
13371 (Process_Import_Predefined_Type): Processing to complete a type
13372 with pragma Import. Currently supports floating point types only.
13373 (Set_Convention_From_Pragma): Do nothing without underlying type.
13374 (Process_Convention): Guard against absence of underlying type,
13375 which may happen when importing incomplete types.
13376 (Process_Import_Or_Interface): Handle case of importing predefined
13377 types. Tweak error message.
13378
f8726f2b
AC
133792011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13380
13381 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
13382 functions to previous change. Reorganize code slightly.
13383
133842011-08-02 Geert Bosch <bosch@adacore.com>
13385
13386 * back_end.ads (Register_Type_Proc): New call back procedure type for
13387 allowing the back end to provide information about available types.
13388 (Register_Back_End_Types): New procedure to register back end types.
13389 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
13390 available types.
13391 * cstand.adb (Back_End_Float_Types): New list for floating point types
13392 supported by the back end.
13393 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
13394 (Copy_Float_Type): New procedure to make new copies of predefined types.
13395 (Register_Float_Type): New call back procedure to populate the BEFT list
13396 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
13397 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
13398 (Create_Float_Types): New procedure to create entities for floating
13399 point types predefined in Standard, and put these and any remaining
13400 BEFTs on the Predefined_Float_Types list.
13401 * stand.ads (Predefined_Float_Types): New list for predefined floating
13402 point types that do not have declarations in package Standard.
13403
feecad68
AC
134042011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13405
13406 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
13407 entity node for the unit containing the parameter.
13408 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
13409 (Add_Inlined_Subprogram): Likewise.
13410 * gcc-interface/Make-lang.in: Update dependencies.
13411
134122011-08-02 Thomas Quinot <quinot@adacore.com>
13413
13414 * s-stusta.adb (Print): Make sure Pos is always initialized to a
13415 suitable value.
13416
12f0c50c
AC
134172011-08-02 Geert Bosch <bosch@adacore.com>
13418
13419 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
13420
134212011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13422
13423 * sem_type.adb (Covers): Move trivial case to the top and reuse the
13424 computed value of Base_Type.
13425
134262011-08-02 Yannick Moy <moy@adacore.com>
13427
13428 * restrict.adb (Check_Restriction): issue an error for any use of
13429 class-wide, even if the No_Dispatch restriction is not set.
13430 * sem_aggr.adb: Correct typos in comments and messages in formal mode
13431 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
13432 when completing a private extension, the type named in the private part
13433 is not the same as that named in the visible part.
13434 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
13435 of an inherited primitive operations of a tagged type or type extension
13436 that returns the tagged type.
13437 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
13438 function which returns True for an implicit operation inherited by the
13439 derived type declaration for the argument type.
13440 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
13441 order.
13442
fb86fe11
ES
134432011-08-02 Ed Schonberg <schonberg@adacore.com>
13444
13445 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
13446 Process_Bounds, to perform analysis with expansion of a range or an
13447 expression that is the iteration scheme for a loop.
13448 (Analyze_Iterator_Specification): If domain of iteration is given by a
13449 function call with a controlled result, as is the case if call returns
13450 a predefined container, ensure that finalization actions are properly
13451 generated.
13452 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
13453
62be5d0a
JM
134542011-08-02 Javier Miranda <miranda@adacore.com>
13455
13456 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
13457 * gcc-interface/Make-lang.in: Update dependencies.
13458
134592011-08-02 Javier Miranda <miranda@adacore.com>
13460
13461 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
13462 determine if the analysis is performed using N or Original_Node (N).
13463 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
13464 functionality of routine Is_Variable avoids code duplication.
13465 * checks.adb (Determine_Range): Handle temporaries generated by
13466 Remove_Side_Effects.
13467
134682011-08-02 Javier Miranda <miranda@adacore.com>
13469
13470 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
13471 expansion of the condition. Required since the previous analysis was
13472 done with expansion disabled (see Resolve_Quantified_Expression) and
13473 hence checks were not inserted and record comparisons have not been
13474 expanded.
13475
a20f4389
AC
134762011-08-02 Ed Falis <falis@adacore.com>
13477
13478 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
13479 Update header.
13480
134812011-08-02 Bob Duff <duff@adacore.com>
13482
13483 * opt.ads: Minor comment fix.
13484
134852011-08-02 Bob Duff <duff@adacore.com>
13486
13487 * sem_ch12.adb (Analyze_Package_Instantiation,
13488 Analyze_Subprogram_Instantiation): Turn off style checking while
13489 analyzing an instance. Whatever style checks that apply to the generic
13490 unit should apply, so it makes no sense to apply them in an instance.
13491 This was causing trouble when compiling an instance of a runtime
13492 unit that violates the -gnatyO switch.
13493 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
13494 one of the two case statements, causing spurious errors.
13495
134962011-08-02 Robert Dewar <dewar@adacore.com>
13497
13498 * uname.adb: Minor reformatting.
13499 * gnatcmd.adb: Minor reformatting.
13500 * exp_attr.adb: Minor reformatting.
13501
90878b12
AC
135022011-08-02 Ed Schonberg <schonberg@adacore.com>
13503
13504 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
13505 No_Dispatching_Calls, do not look for the Assign primitive, because
13506 predefined primitives are not created in this case.
13507
135082011-08-02 Bob Duff <duff@adacore.com>
13509
13510 * stylesw.ads: Minor comment fixes.
13511
135122011-08-02 Robert Dewar <dewar@adacore.com>
13513
13514 * freeze.adb (Add_To_Result): New procedure.
13515
135162011-08-02 Jose Ruiz <ruiz@adacore.com>
13517
13518 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
13519 time, if the specific run-time routines for handling streams of strings
13520 are not available, use the default mechanism.
13521
135222011-08-02 Arnaud Charlet <charlet@adacore.com>
13523
13524 * s-regpat.ads: Fix typo.
13525
135262011-08-02 Vincent Celier <celier@adacore.com>
13527
13528 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
13529 not null, call it to create the in memory config project file without
13530 parsing an existing default config project file.
13531
135322011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13533
13534 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
13535
135362011-08-02 Ed Schonberg <schonberg@adacore.com>
13537
13538 * sem_elim.adb: an abstract subprogram does not need an eliminate
13539 pragma for its descendant to be eliminable.
13540
135412011-08-02 Ed Falis <falis@adacore.com>
13542
13543 * init.c: revert to handling before previous checkin for VxWorks
13544 * s-intman-vxworks.adb: delete unnecessary declarations related to
13545 using Ada interrupt facilities for handling signals.
13546 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
13547 * s-intman-vxworks.ads: Import __gnat_install_handler as
13548 Initialize_Interrupts.
13549 * s-taprop-vxworks.adb: Delete Signal_Mask.
13550 (Abort_Handler): change construction of mask to unblock exception
13551 signals.
13552
273adcdf
AC
135532011-08-02 Jerome Guitton <guitton@adacore.com>
13554
13555 * a-except-2005.adb (Raise_From_Signal_Handler): Call
13556 Debug_Raise_Exception before propagation starts.
13557
135582011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13559
13560 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
13561 to Restriction_Check_Required.
13562 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
13563 * sem_res.adb (Resolve_Call): Likewise.
13564 * sem_attr.adb (Check_Stream_Attribute): Likewise.
13565
135662011-08-02 Bob Duff <duff@adacore.com>
13567
13568 * stylesw.ads: Update comment.
13569 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
13570 * errout.ads: Remove obsolete comment.
13571
135722011-08-02 Javier Miranda <miranda@adacore.com>
13573
13574 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
13575 (Set_Is_Safe_To_Reevaluate): new procedure.
13576 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
13577 assignment is allowed on safe-to-reevaluate variables.
13578 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
13579 temporary created to remove side effects in expressions that use
13580 the secondary stack as safe-to-reevaluate.
13581 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
13582 variables that are not true constants.
13583
6320f5e1
AC
135842011-08-02 Robert Dewar <dewar@adacore.com>
13585
13586 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
13587 sem_res.adb, sem_ch6.adb: Minor reformatting.
13588
135892011-08-02 Jerome Guitton <guitton@adacore.com>
13590
13591 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
13592
2fe829ae
ES
135932011-08-02 Ed Schonberg <schonberg@adacore.com>
13594
13595 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
13596 not set Overridden_Operation if subprogram is an initialization
13597 procedure.
13598
e24329cd
YM
135992011-08-02 Yannick Moy <moy@adacore.com>
13600
13601 * par-ch6.adb: Correct obsolete name in comments
13602 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
13603 which takes two message arguments (existing function takes one), with
13604 second message used for continuation.
13605 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
13606 block statements that originate from a source block statement, not
13607 generated block statements
13608 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
13609 symmetry with procedure case
13610 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
13611 function to issue an error in formal mode if a package specification
13612 contains more than one tagged type or type extension.
13613 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
13614 parameters matching formals of tagged types are objects (or ancestor
13615 type conversions of objects), not general expressions. Issue an error
13616 on view conversions that are not involving ancestor conversion of an
13617 extended type.
13618 (Resolve_Type_Conversion): in formal mode, issue an error on the
13619 operand of an ancestor type conversion which is not an object
13620 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
13621 procedure so that it works also for actuals of function calls
13622 (Is_Actual_Tagged_Parameter): new function which determines if its
13623 argument is an actual parameter of a formal of tagged type in a
13624 subprogram call
13625 (Is_SPARK_Object_Reference): new function which determines if the tree
13626 referenced by its argument represents an object in SPARK
13627
176dadf6
AC
136282011-08-02 Robert Dewar <dewar@adacore.com>
13629
13630 * sem_ch3.adb: Minor reformatting
13631 Minor comment addition
13632 Minor error msg text change
13633
136342011-08-02 Javier Miranda <miranda@adacore.com>
13635
13636 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
13637 function. Used to be more precise when we generate a variable plus one
13638 assignment to remove side effects in the evaluation of the Bound
13639 expressions.
13640 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
13641 of the bound expression to force its re-analysis and thus expand the
13642 associated transient scope (if required). Code cleanup replacing the
13643 previous code that declared the constant entity by an invocation to
13644 routine Force_Evaluation which centralizes this work in the frontend.
13645
d8b962d8
AC
136462011-08-02 Robert Dewar <dewar@adacore.com>
13647
13648 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
13649 (Base_Type): Now uses improved Is_Base_Type function
13650 * einfo.ads (Base_Type): Inline this function
13651
136522011-08-02 Robert Dewar <dewar@adacore.com>
13653
13654 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
13655 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
13656
136572011-08-02 Arnaud Charlet <charlet@adacore.com>
13658
13659 * gcc-interface/Make-lang.in: Update dependencies.
13660 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
13661 targets.
13662
136632011-08-02 Yannick Moy <moy@adacore.com>
13664
13665 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
13666 non-simple expression used in delta constraint
13667 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
13668 index constraint which is not a subtype mark
13669 * par.adb: With and use Restrict
13670 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
13671 mode on component type which is not a subtype mark and default
13672 expression on component
13673 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
13674 of string which does not have a lower index bound equal to 1
13675 (Array_Type_Declaration): issue an error in formal mode on index or
13676 component type which is not a subtype mark, and on aliased keyword on
13677 component
13678 (Derived_Type_Declaration): issue an error in formal mode on interface,
13679 limited or abstract type
13680 (Record_Type_Declaration): issue an error in formal mode on interface
13681 (Record_Type_Definition): issue an error in formal mode on tagged types
13682 and type extensions not declared in the specification of a library unit
13683 package; on null non-tagged record; on variant part
13684
136852011-08-02 Vincent Celier <celier@adacore.com>
13686
13687 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
13688 not declared for qualified library project when Library_Name is not
13689 declared, but Library_Dir is.
13690
136912011-08-02 Robert Dewar <dewar@adacore.com>
13692
13693 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
13694 pragmas (affects aspects [Component_]Default_Value
13695 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
13696 component type for the resolution
13697
f96b2d85
AC
136982011-08-02 Eric Botcazou <ebotcazou@adacore.com>
13699
13700 * einfo.adb (Base_Type): Tune implementation for speed.
13701
137022011-08-02 Robert Dewar <dewar@adacore.com>
13703
13704 * freeze.adb: Minor reformatting.
13705
8b3c6430
AC
137062011-08-02 Thomas Quinot <quinot@adacore.com>
13707
13708 * scos.ads: Update comments.
13709
137102011-08-02 Ed Schonberg <schonberg@adacore.com>
13711
13712 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
13713 base type, because the parent may be a subtype of a private type whose
13714 convention is established in a private part.
13715
137162011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
13717
13718 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
13719 statement in a block when the expansion of the return expression has
13720 created a finalization chain.
13721 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
13722 with the parent node.
13723 Add N_Extended_Return_Statement to handle the case where a transient
13724 object declaration appears in the Return_Object_Declarations list of
13725 an extended return statement.
13726
137272011-08-02 Matthew Gingell <gingell@adacore.com>
13728
13729 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
13730 unused parameter 'name'.
13731
137322011-08-02 Ed Schonberg <schonberg@adacore.com>
13733
13734 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
13735 inherited operation, check whether its alias, which is the source
13736 operastion that it renames, has been marked eliminated.
13737
cae81f17
JM
137382011-08-02 Javier Miranda <miranda@adacore.com>
13739
13740 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
13741 in-mode parameter whose type is an access type since it can be used to
13742 modify its designated object. Enforce code that handles as safe an
13743 access type that is not access-to-constant but it is the result of a
13744 previous removal of side-effects.
13745 (Remove_Side_Effects): Minor code reorganization of cases which require
13746 no action. Done to incorporate documentation on new cases uncovered
13747 working in this ticket: no action needed if this routine was invoked
13748 too early and the nodes are not yet decorated.
13749 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
13750 to routine Remove_Side_Effects by calls to Force_Evaluation since they
13751 were issued with actuals that are implicitly provided by
13752 Force_Evaluation.
13753
218e6dee
RD
137542011-08-02 Robert Dewar <dewar@adacore.com>
13755
13756 * sem_ch3.adb, sem_res.adb: Minor reformatting.
13757
7a489a2b
AC
137582011-08-02 Yannick Moy <moy@adacore.com>
13759
13760 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
13761 to issue an error in formal mode on attribute not supported in this mode
13762 (Analyze_Attribute): issue errors on standard attributes not supported
13763 in formal mode.
13764 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
13765 comment, and issue error in formal mode on modulus which is not a power
13766 of 2.
13767 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
13768 range.
13769 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
13770 subtype mark.
13771 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
13772 operator on modular type (except 'not').
13773
137742011-08-02 Robert Dewar <dewar@adacore.com>
13775
13776 * gnat_rm.texi: Minor reformatting.
13777
cb7fa356
AC
137782011-08-02 Arnaud Charlet <charlet@adacore.com>
13779
13780 * s-osinte-linux.ads: Minor comment update and reformatting.
13781 * i-cexten.ads: Make this unit pure, as for its parent.
13782 Will allow its usage in more contexts if needed.
13783
137842011-08-02 Robert Dewar <dewar@adacore.com>
13785
13786 * s-utf_32.ads: Minor comment fix.
13787
137882011-08-02 Ed Schonberg <schonberg@adacore.com>
13789
13790 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
13791 operation of a tagged synchronized type, handle the case where the
13792 controlling argument is overloaded.
13793
137942011-08-02 Yannick Moy <moy@adacore.com>
13795
13796 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
13797 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
13798 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
13799 SPARK mode and formal verification mode on processing SPARK restriction
13800 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
13801 requiring consistency checking.
13802
5cc9353d
RD
138032011-08-02 Robert Dewar <dewar@adacore.com>
13804
13805 * sem_res.adb: Minor reformatting.
13806
e51537ff
RD
138072011-08-02 Robert Dewar <dewar@adacore.com>
13808
13809 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13810 a-cforse.ads: Remove unneeded with of Ada.Containers
13811 Remove commented out pragma Inline's
13812 Move specifications of new subprograms to the actual specs
13813
83fa09c5
AC
138142011-08-02 Yannick Moy <moy@adacore.com>
13815
13816 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13817 a-cforse.ads: Update comments.
13818
138192011-08-02 Ed Schonberg <schonberg@adacore.com>
13820
13821 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
13822
d11cfaf8
RD
138232011-08-02 Robert Dewar <dewar@adacore.com>
13824
13825 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
13826 a-cforse.ads, a-cofove.ads: Minor reformatting.
13827
300b98bb
AC
138282011-08-02 Claire Dross <dross@adacore.com>
13829
13830 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
13831 a-cofove.ads: Add comments.
13832
138332011-08-02 Yannick Moy <moy@adacore.com>
13834
13835 * gnat_rm.texi: Document formal containers.
13836
138372011-08-02 Emmanuel Briot <briot@adacore.com>
13838
13839 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
13840 are empty sections.
13841
19fb051c
AC
138422011-08-02 Robert Dewar <dewar@adacore.com>
13843
13844 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
13845 reformatting.
13846
138472011-08-02 Robert Dewar <dewar@adacore.com>
13848
13849 * aspects.adb: New aspects Default_Value and Default_Component_Value
13850 New format of Aspect_Names table checks for omitted entries
13851 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
13852 handling of boolean aspects for derived types.
13853 New aspects Default_Value and Default_Component_Value
13854 New format of Aspect_Names table checks for omitted entries
13855 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
13856 (Has_Default_Value): New flag
13857 (Has_Default_Component_Value): New flag
13858 (Has_Default_Value): New flag
13859 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
13860 table.
13861 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
13862 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
13863 Default_Value and Default_Component_Value
13864 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
13865 New aspects Default_Value and Default_Component_Value
13866 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
13867 * sprint.adb: Print N_Aspect_Specification node when called from gdb
13868
138692011-08-02 Vincent Celier <celier@adacore.com>
13870
13871 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
13872 inherit library kind.
13873
138742011-08-02 Ed Schonberg <schonberg@adacore.com>
13875
13876 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
13877 Minor reformatting.
13878
138792011-08-02 Robert Dewar <dewar@adacore.com>
13880
13881 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
13882
5f7747af
AC
138832011-08-02 Yannick Moy <moy@adacore.com>
13884
13885 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
13886
138872011-08-02 Robert Dewar <dewar@adacore.com>
13888
13889 * impunit.adb: Add comment.
13890
a5fe697b
AC
138912011-08-02 Yannick Moy <moy@adacore.com>
13892
13893 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
13894 qualification of aggregates in formal mode
13895 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
13896 another aggregate
13897 (Resolve_Aggregate): complete the test that an aggregate is adequately
13898 qualified in formal mode
13899
139002011-08-02 Pascal Obry <obry@adacore.com>
13901
13902 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
13903 * mlib-prj.adb: Supress warning when compiling binder generated file.
13904 (Build_Library): Supress all warnings when compiling the binder
13905 generated file.
13906
bd65a2d7 139072011-08-02 Yannick Moy <moy@adacore.com>
d4487611 13908
bd65a2d7
AC
13909 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
13910 from here...
13911 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
13912 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
13913 Add with/use clauses to make Check_Formal_Restriction visible
13914
139152011-08-02 Ed Schonberg <schonberg@adacore.com>
13916
13917 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
13918 in-parameters when type of the generic formal is private in the generic
13919 spec and non-private in the body.
13920
139212011-08-02 Claire Dross <dross@adacore.com>
13922
13923 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
13924 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
13925 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
13926 * impunit.adb, Makefile.rtl: Take new files into account.
d4487611
AC
13927
139282011-08-02 Robert Dewar <dewar@adacore.com>
13929
13930 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
13931 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
13932
bd434b3f
YM
139332011-08-02 Yannick Moy <moy@adacore.com>
13934
13935 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
13936 formal mode
13937 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
13938 matching static array bounds, taking into account the special case of
13939 string literals
13940 * sem_ch3.adb: Typo in comment.
13941
fe5d3068
YM
139422011-08-02 Yannick Moy <moy@adacore.com>
13943
13944 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
13945 which issues an error in formal mode if its argument node is originally
13946 from source
13947 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
13948 has a discriminant specification so that it does not include the case
13949 of derived types
13950 (Derived_Type_Declaration): move here the test that a derived type has a
13951 discriminant specification
13952 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
13953 first element of a component association before accessing its choices
13954 (presence of component association is not enough)
13955 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
13956 declaration is a library item before accessing the next element in a
13957 list, as library items are not member of lists
13958 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
13959 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
13960 Check_Formal_Restriction whenever possible.
13961
b60a3f26
AC
139622011-08-02 Ed Schonberg <schonberg@adacore.com>
13963
13964 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
13965 reference when needed.
13966
139672011-08-02 Bob Duff <duff@adacore.com>
13968
13969 * gnat_ugn.texi: Fix typo.
13970
139712011-08-02 Vincent Celier <celier@adacore.com>
13972
13973 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
13974 archive file name. Do not use the full path name of archives for Open
13975 VMS.
13976
eaba57fb
RD
139772011-08-02 Robert Dewar <dewar@adacore.com>
13978
13979 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
13980 Analyze_Aspect_Specifications
13981 * sem_ch13.adb
13982 (Analyze_Aspect_Specifications): New handling for boolean aspects
13983 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
13984 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
13985 sequence for Analyze_Aspect_Specifications
13986 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
13987 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
13988
139892011-08-02 Robert Dewar <dewar@adacore.com>
13990
13991 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
13992 aspects, since these no longer exist.
13993
139942011-08-02 Robert Dewar <dewar@adacore.com>
13995
13996 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
13997 semicolon, do not try to see if there are aspects following it.
13998 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
13999 aspect spec.
14000
8830d1d2
AC
140012011-08-02 Robert Dewar <dewar@adacore.com>
14002
14003 * sem_ch8.adb, aspects.ads: Minor reformatting.
14004
140052011-08-02 Eric Botcazou <ebotcazou@adacore.com>
14006
14007 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
14008 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
14009 extracted from...
14010 (Analyze_Aspect_Specifications): ...here. Call above procedure.
14011
7ff2d234
AC
140122011-08-02 Yannick Moy <moy@adacore.com>
14013
14014 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
14015 mode on subprogram declaration outside of package specification, unless
14016 it is followed by a pragma Import
14017 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
14018 Access_Type_Declaration): issue error in formal mode on access type
14019 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
14020 incomplete type
14021 (Analyze_Object_Declaration): issue error in formal mode on object
14022 declaration which does not respect SPARK restrictions
14023 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
14024 declaration which does not respect SPARK restrictions
14025 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
14026 error in formal mode on digits or delta constraint
14027 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
14028 decimal fixed point type
14029 (Derived_Type_Declaration): issue error in formal mode on derived type
14030 other than type extensions of tagged record types
14031 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
14032 with check on access definition
14033 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
14034 mode on protected definition.
14035 (Analyze_Task_Definition): issue error in formal mode on task definition
14036
140372011-08-02 Robert Dewar <dewar@adacore.com>
14038
14039 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
14040
806f6d37
AC
140412011-08-02 Javier Miranda <miranda@adacore.com>
14042
14043 * sem_ch6.adb (Can_Override_Operator): New function.
14044 (Verify_Overriding_Indicator): Add missing code to check overriding
14045 indicator in operators. Fixes regression.
14046 (Check_Overriding_Indicator): Minor reformating after replacing the
14047 code that evaluates if the subprogram can override an operator by
14048 invocations to the above new function.
14049 * einfo.adb
14050 (Write_Field26_Name): Add missing code to ensure that, following
14051 the documentation in einfo.ads, this field is not shown as attribute
14052 "Static_Initialization" on non-dispatching functions.
14053
140542011-08-02 Jose Ruiz <ruiz@adacore.com>
14055
14056 * sem_res.adb (Resolve_Call): A call to
14057 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
14058 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
14059 i.e., when the second parameter is of type Time_Span.
14060
140612011-08-02 Vincent Celier <celier@adacore.com>
14062
14063 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
14064 with an archive instead of -L<library dir> -l<library name>.
14065
140662011-08-02 Ed Schonberg <schonberg@adacore.com>
14067
14068 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
14069 mark the base types In_Use in addition to making the operations
14070 use_visible.
14071
140722011-08-02 Ed Falis <falis@adacore.com>
14073
14074 * init.c: add and setup __gnat_signal_mask for the exception signals
14075 * s-inmaop-vxworks.adb: new file.
14076 * s-intman-vxworks.adb: remove unnecessary initializations and
14077 simplify remaining
14078 * s-intman-vxworks.ads: remove unnecessary variable
14079 * s-taprop-vxworks.adb: simplify signal initialization
14080
780d052e
RD
140812011-08-02 Robert Dewar <dewar@adacore.com>
14082
14083 * sem_ch8.adb: Minor code reorganization, comment updates.
14084
140852011-08-02 Robert Dewar <dewar@adacore.com>
14086
14087 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
14088 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
14089 here from Sem_Res.
14090 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
14091 (Matching_Static_Array_Bounds): Moved here from Sem_Res
14092
29efbb8c
ES
140932011-08-02 Ed Schonberg <schonberg@adacore.com>
14094
14095 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
14096 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
14097 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
14098 use_type_clauses, to handle more efficiently use_type and use_all_type
14099 constructs.
14100 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
14101 Ada2012 Use_All_Type clause.
14102 (Use_Class_Wide_Operations): new procedure.
14103
b0186f71
AC
141042011-08-02 Robert Dewar <dewar@adacore.com>
14105
14106 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
14107 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
14108 expression to expression function.
14109
141102011-08-02 Ed Schonberg <schonberg@adacore.com>
14111
14112 * sem_ch4.adb: transform simple Ada2012 membership into equality only
14113 if types are compatible.
14114
141152011-08-02 Yannick Moy <moy@adacore.com>
14116
14117 * sem_res.adb (Matching_Static_Array_Bounds): new function which
14118 returns True if its argument array types have same dimension and same
14119 static bounds at each index.
14120 (Resolve_Actuals): issue an error in formal mode on actuals passed as
14121 OUT or IN OUT paramaters which are not view conversions in SPARK.
14122 (Resolve_Arithmetic_Op): issue an error in formal mode on
14123 multiplication or division with operands of fixed point types which are
14124 not qualified or explicitly converted.
14125 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
14126 Boolean or array type (except String) operands.
14127 (Resolve_Equality_Op): issue an error in formal mode on equality
14128 operators for array types other than String with non-matching static
14129 bounds.
14130 (Resolve_Logical_Op): issue an error in formal mode on logical operators
14131 for array types with non-matching static bounds. Factorize the code in
14132 Matching_Static_Array_Bounds.
14133 (Resolve_Qualified_Expression): issue an error in formal mode on
14134 qualified expressions for array types with non-matching static bounds.
14135 (Resolve_Type_Conversion): issue an error in formal mode on type
14136 conversion for array types with non-matching static bounds
14137
767bb4e8
AC
141382011-08-02 Robert Dewar <dewar@adacore.com>
14139
14140 * par-ch10.adb: Minor code reorganization (use Nkind_In).
14141
141422011-08-02 Ed Schonberg <schonberg@adacore.com>
14143
14144 * par-ch9.adb: save location of entry for proper error message.
14145
4ac2477e
JM
141462011-08-02 Javier Miranda <miranda@adacore.com>
14147
14148 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
14149 (Use_Full_View) which permits this routine to climb through the
14150 ancestors using the full-view of private parents.
14151 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
14152 Use_Full_View to true in calls to Is_Ancestor.
14153 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
14154 true in call to Is_Ancestor.
14155 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
14156 Use_Full_View to true in call to Is_Ancestor.
14157 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
14158 call to Is_Ancestor.
14159 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
14160 Use_Full_View to true in calls to Is_Ancestor.
14161 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
14162 Make_Select_Specific_Data_Table, Register_Primitive,
14163 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
14164 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
14165 to true in call to Is_Ancestor.
14166 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
14167 Use_Full_View to true in calls to Is_Ancestor.
14168 * exp_cg.adb
14169 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
14170 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
14171
9f90d123
AC
141722011-08-02 Robert Dewar <dewar@adacore.com>
14173
14174 * gnat_rm.texi: Minor reformatting.
14175 * sem_prag.adb: Minor reformatting.
14176
141772011-08-02 Tristan Gingold <gingold@adacore.com>
14178
14179 * vms_data.ads: Add VMS qualifier for -gnateP.
14180
141812011-08-02 Robert Dewar <dewar@adacore.com>
14182
14183 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
14184 * par-ch7.adb (P_Package): Proper placement of aspects for package
14185 decl/instantiation.
14186 * par-endh.adb (Check_End): Ad Is_Sloc parameter
14187 (End_Statements): Add Is_Sloc parameterr
14188 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
14189 (Check_End): Ad Is_Sloc parameter
14190 (End_Statements): Add Is_Sloc parameterr
14191
141922011-08-02 Vincent Celier <celier@adacore.com>
14193
14194 * ug_words: Add VMS qualifier equivalent to -gnateP:
14195 /SYMBOL_PREPROCESSING.
14196
141972011-08-02 Jose Ruiz <ruiz@adacore.com>
14198
14199 * gnat-style.texi: For hexadecimal numeric literals the typical
14200 grouping of digits is 4 to represent 2 bytes.
14201 A procedure spec which is split into several lines is indented two
14202 characters.
14203
142042011-08-02 Yannick Moy <moy@adacore.com>
14205
14206 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
14207 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
14208 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
14209 properly qualified
14210 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
14211 choice in array aggregate
14212 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
14213 mark as ancestor
14214 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
14215 positional and named aggregate for record, or others in record
14216 aggregate, or multiple choice in record aggregate
14217 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
14218 array operands to logical operations AND, OR and XOR do not have the
14219 same static lower and higher bounds
14220 * sem_ch5.adb, sinfo.ads: Correct typos in comments
14221
2933b16c
RD
142222011-08-01 Robert Dewar <dewar@adacore.com>
14223
14224 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
14225 Replaces Last_Source_Node_In_Sequence.
14226 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
14227 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
14228 parens and blank in string (this was inconsistently implemented).
14229 * errout.ads
14230 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
14231 blank in string (this was inconsistently implemented).
14232 * gnat1drv.adb
14233 (Set_Global_Switches): Set formal mode switches appropriately
14234 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
14235 * par-prag.adb
14236 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
14237 call Set_Error_Msg_Lang to set "spark" as language name.
14238 * par.adb: Remove unnecessary call to set formal language for errout
14239 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
14240 appropriately and call Set_Error_Msg_Lang to set "spark" as language
14241 name.
14242 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
14243 calls to it, moved after resolution so that types are known
14244 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
14245 result of concatenation is not of type String
14246 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
14247 concatenation is not properly restricted
14248 * gnat_rm.texi: Add doc on pragma Spark_95.
14249 * gcc-interface/Makefile.in: Remove obsolete target pairs for
14250 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
14251 * gcc-interface/Make-lang.in: Update dependencies.
14252
05dbd302
AC
142532011-08-01 Javier Miranda <miranda@adacore.com>
14254
14255 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
14256 condition that detects if the overridden operation must replace an
14257 existing entity.
14258
142592011-08-01 Javier Miranda <miranda@adacore.com>
14260
14261 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
14262 code declarations inserted by Insert_Actions in each alternative of the
14263 N_Case_Expression node.
14264
142652011-08-01 Robert Dewar <dewar@adacore.com>
14266
14267 * sem_ch6.adb: Minor code reorganization.
14268 * sem_util.adb: Minor reformatting.
14269
af9e051f
PO
142702011-08-01 Pascal Obry <obry@adacore.com>
14271
14272 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
14273 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
14274
1d801f21
AC
142752011-08-01 Yannick Moy <moy@adacore.com>
14276
14277 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
14278 literal or operator symbol which is prefixed
14279 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
14280 mode on access attributes.
14281 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
14282 that concatenation operands are properly restricted in formal mode
14283 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
14284 Analyze_Concatenation_Operand. Issue an error in formal mode if the
14285 result of the concatenation has a type different from String.
14286 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
14287 Analyze_Quantified_Expression, Analyze_Slice,
14288 Analyze_Null): issue an error in formal mode on unsupported constructs
14289 * sem_ch5.adb
14290 (Analyze_Block_Statement): only issue error on source block statement
14291 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
14292 function which returns the last node in a list of nodes for which
14293 Comes_From_Source returns True, if any
14294 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
14295 Last_Source_Node_In_Sequence
14296 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
14297 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
14298 mode on unsupported constructs
14299 * sem_ch9.adb Do not return after issuing error in formal mode, as the
14300 rest of the actions may be needed later on since the error is marked as
14301 not serious.
14302 * sinfo.ads: Typos in comments.
14303
143042011-08-01 Pascal Obry <obry@adacore.com>
14305
14306 * projects.texi: Minor editing.
14307
53beff22
YM
143082011-08-01 Yannick Moy <moy@adacore.com>
14309
14310 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
14311 insertion character ~~
14312 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
14313 (Set_Error_Msg_Lang): new procedure which fixes the language for use
14314 with insertion character ~~
14315 (Set_Msg_Text): treat insertion character ~~
14316 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
14317 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
14318 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
14319 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
14320 errors related to the formal language restriction not serious
14321 (insertion character |).
14322 * par.adb (Par): set formal language for error messages if needed
14323 * sem_ch6.adb (Check_Missing_Return): take into account possible
14324 generated statements at the end of the function
14325 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
14326 enumeration value to define a new pragma SPARK_95
14327 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
14328 SPARK_Version): new type and variables to store the SPARK version
14329 (none by default).
14330 (SPARK_Mode): return True when SPARK_Version is set
14331 * par-prag.adb: Correct indentation
14332 (Prag): take Pragma_SPARK_95 into account
14333 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
14334 into account.
14335
8d606a78
RD
143362011-08-01 Robert Dewar <dewar@adacore.com>
14337
14338 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
14339 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
14340 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
14341
1982d5a8
PO
143422011-08-01 Pascal Obry <obry@adacore.com>
14343
14344 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
14345 Target_Name to Get_Path call.
14346 (Parse_Single_Project): Likewise.
14347 (Post_Parse_Context_Clause): Likewise.
14348 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
14349 Call Initialise_Project_Path with the proper Target_Name.
14350 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
14351 search path.
14352 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
14353 with the proper Target_Name.
14354 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
14355 Part.Parse routine.
14356 (Parse_Project_And_Apply_Config): Likewise.
14357 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
14358 This is fine as this part of the code is supporting only native
14359 compilation.
14360 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
14361 is fine as this part of the code is supporting only native compilation.
14362
0d53d36b
AC
143632011-08-01 Yannick Moy <moy@adacore.com>
14364
14365 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
14366 of homonym, unless the homonym is one of the cases allowed in SPARK
14367 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
14368 package declaration occurring after a body.
14369
143702011-08-01 Robert Dewar <dewar@adacore.com>
14371
14372 * checks.adb, exp_ch4.adb: Minor reformatting.
14373
143742011-08-01 Javier Miranda <miranda@adacore.com>
14375
14376 * einfo.ads (Access_Disp_Table): Fix documentation.
14377 (Dispatch_Table_Wrappers): Fix documentation.
14378
143792011-08-01 Pascal Obry <obry@adacore.com>
14380
14381 * prj-env.adb, prj-env.ads: Minor reformatting.
14382
8ed68165
AC
143832011-08-01 Yannick Moy <moy@adacore.com>
14384
14385 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
14386 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14387 procedures out of these packages.
2c7f9cc0 14388 * errout.ads, errout.adb
8ed68165
AC
14389 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
14390 procedures in of this package
14391 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
14392 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
14393 on misplaced later vs initial declarations, like in Ada 83
14394 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
14395 formal mode on attribute of private type whose full type declaration
14396 is not visible
14397 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
14398 package declaration inside a package specification
14399 (Analyze_Full_Type_Declaration): issue error in formal mode on
14400 controlled type or discriminant type
14401 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
14402 user-defined operator means that it should come from the source
14403 (New_Overloaded_Entity): issue error in formal mode on overloaded
14404 entity.
14405 * sem_ch6.ads, sem_ch13.ads: typos in comments.
14406
144072011-08-01 Thomas Quinot <quinot@adacore.com>
14408
14409 * atree.adb: Minor reformatting.
14410 * checks.adb: Minor reformatting.
14411
4230bdb7
AC
144122011-08-01 Vincent Celier <celier@adacore.com>
14413
14414 * s-parame-vms-ia64.ads: Fix typo in comment
14415 Minor reformatting
14416 * s-parame-vms-restrict.ads: Removed, unused.
14417
144182011-08-01 Javier Miranda <miranda@adacore.com>
14419
14420 * exp_ch3.adb
14421 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
14422 * sem_ch3.adb
14423 (Constrain_Index): Remove side effects in the evaluation of the bounds.
14424 * sem_ch3.ads, sem_ch3.adb
14425 (Is_Constant_Bound): New extended version of the subprogram that was
14426 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
14427 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
14428 * sem_aux.ads (Constant_Value): Fix typo in comment.
14429 * checks.adb (Generate_Index_Checks): New implementation which, for
14430 array objects with constant bounds, generates the runtime check
14431 referencing the bounds of the array type. For other cases this routine
14432 provides its previous behavior obtaining such values from the array
14433 object.
14434 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
14435 parent type.
14436 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
14437 we cannot have semantic interpretations of the new node.
14438
2010d078
AC
144392011-08-01 Ed Schonberg <schonberg@adacore.com>
14440
14441 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
14442 expressions.
14443
144442011-08-01 Arnaud Charlet <charlet@adacore.com>
14445
14446 * sem_ch8.adb: Minor code editing.
14447 * s-vxwext.adb: Remove trailing space.
14448 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
14449 consistency with other files.
14450
144512011-08-01 Thomas Quinot <quinot@adacore.com>
14452
14453 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
14454
144552011-08-01 Ed Schonberg <schonberg@adacore.com>
14456
14457 * par-ch10.adb: reject parameterized expressions as compilation unit.
14458 * sem_ch4.adb: handle properly conditional expression with overloaded
14459 then_clause and no else_clause.
14460
144612011-08-01 Tristan Gingold <gingold@adacore.com>
14462
14463 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
14464 like done by System.Aux_DEC.
14465 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
14466
daec8eeb
YM
144672011-08-01 Yannick Moy <moy@adacore.com>
14468
14469 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
14470 missing label at end of declaration (subprogram or package)
14471 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
14472 of positional and named parameter association
14473 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
14474 Error_Msg_SP which adds a prefix to the error message giving the name
14475 of the formal language analyzed
14476 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
14477 access result type in subprogram, unconstrained array as result type,.
14478 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
14479 procedure
14480 * sem_ch8.adb: Code clean up.
14481
38171f43
AC
144822011-08-01 Javier Miranda <miranda@adacore.com>
14483
14484 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
14485 * einfo.ads (Access_Disp_Table): Fix documentation.
14486 (Dispatch_Table_Wrappers): Fix documentation.
14487 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
14488 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
14489 to enforce the documentation of this attribute.
14490 (Set_Is_Interface): Cleanup the assertion.
14491 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
14492 the Underlying_Type entity before reading attribute Access_Disp_Table.
14493 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
14494 Locate the Underlying_Type before reading attribute Access_Disp_Table.
14495 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
14496 the Underlying_Type entity before reading attribute Access_Disp_Table.
14497 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
14498 Locate the Underlying_Type entity before reading attribute
14499 Access_Disp_Table.
14500
145012011-08-01 Ed Schonberg <schonberg@adacore.com>
14502
14503 * s-poosiz.ads: Additional overriding indicators.
14504
145052011-08-01 Yannick Moy <moy@adacore.com>
14506
14507 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
14508 formal mode.
14509 (Analyze_Iteration_Scheme): issue error in formal mode when loop
14510 parameter specification does not include a subtype mark.
14511 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
14512 formal mode on abstract subprogram.
14513 (Analyze_Subprogram_Specification): issue error in formal mode on
14514 user-defined operator.
14515 (Process_Formals): issue error in formal mode on access parameter and
14516 default expression.
14517 * sem_ch9.adb (Analyze_Abort_Statement,
14518 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
14519 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
14520 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
14521 Analyze_Requeue, Analyze_Selective_Accept,
14522 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
14523 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
14524 issue error in formal mode on user-defined raise statement.
14525
1f250383
AC
145262011-08-01 Thomas Quinot <quinot@adacore.com>
14527
14528 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
14529 declaration being hidden when overriding an implicit inherited
14530 subprogram.
14531 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
14532 (-gnats), do not complain about a source file that contains only a
14533 pragma No_Body.
14534
145352011-08-01 Ed Schonberg <schonberg@adacore.com>
14536
14537 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
14538 variable if already set.
14539
607d0635
AC
145402011-08-01 Arnaud Charlet <charlet@adacore.com>
14541
14542 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
14543 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
14544 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
14545 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
14546 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
14547 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
14548 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
14549 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
14550 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
14551 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
14552 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
14553 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
14554 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
14555 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
14556 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
14557 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
14558 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
14559 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
14560 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
14561 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
14562 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
14563 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
14564 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
14565 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
14566 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
14567 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
14568 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
14569 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
14570 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
14571 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
14572 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
14573 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
14574 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
14575 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
14576 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
14577 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
14578 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
14579 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
14580 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
14581 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
14582 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
14583 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
14584 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
14585 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
14586 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
14587 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
14588 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
14589 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
14590 s-osinte-mingw.ads: Update to GPLv3 run-time license.
14591 Use GNAT instead of GNARL.
14592
145932011-08-01 Bob Duff <duff@adacore.com>
14594
14595 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
14596 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
14597 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
14598 reformatting.
14599
146002011-08-01 Yannick Moy <moy@adacore.com>
14601
14602 * debug.adb (d.D) reverve flag for the SPARK mode
14603 (d.E) reverve flag for SPARK generation mode
14604 (d.F) reverve flag for Why generation mode
2c7f9cc0 14605 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
607d0635
AC
14606 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
14607 functions which return True when the corresponding modes are set
14608 (Formal_Language): return "spark" or "alfa" when in formal verification
14609 mode.
14610 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
14611 Error_Msg to prefix the error message with a tag giving the formal
14612 language
14613 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
14614 message with a tag giving the formal language
14615 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
14616 block statement
14617 (Analyze_Case_Statement): issue error in formal mode on case statement
14618 with a single "others" case alternative
14619 (Analyze_Exit_Statement): issue errors in formal mode on exit
14620 statements which do not respect SPARK restrictions
14621 (Analyze_Goto_Statement): issue error in formal mode on goto statement
14622 (Check_Unreachable_Code): always issue an error (not a warning) in
14623 formal mode on unreachable code (concerns both code after an infinite
14624 loop and after an unconditional jump, both not allowed in SPARK)
14625 * sem_ch6.adb (Analyze_Return_Statement): add call to
14626 Set_Return_Present for a procedure containing a return statement
14627 (already done for functions in Analyze_Function_Return)
14628 (Analyze_Function_Return): issue error in formal mode on extended
14629 return or if return is not last statement in function
14630 (Check_Missing_Return): issue error in formal mode if function does
14631 not end with return or if procedure contains a return
14632 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
14633 function to detect if there is an inner scope of its parameter S which
14634 is a loop.
14635
146362011-08-01 Thomas Quinot <quinot@adacore.com>
14637
14638 * sem_ch6.ads: Minor reformatting.
14639
d8b3ccb9
AC
146402011-08-01 Javier Miranda <miranda@adacore.com>
14641
14642 * sem_util.adb (Abstract_Interface_List): Complete condition when
14643 processing private type declarations to avoid reading unavailable
14644 attribute.
14645 (Is_Synchronized_Tagged_Type): Complete condition when processing
14646 private extension declaration nodes to avoid reading unavailable
14647 attribute.
14648
146492011-08-01 Thomas Quinot <quinot@adacore.com>
14650
14651 * sem_ch3.adb: Minor reformatting.
14652
146532011-08-01 Thomas Quinot <quinot@adacore.com>
14654
14655 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
14656 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
14657 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
14658 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
14659 for VMS, instead parametrize the common implementation with
14660 System.Parameters declarations.
14661
0bb9276c
AC
146622011-08-01 Eric Botcazou <ebotcazou@adacore.com>
14663
14664 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
14665
146662011-08-01 Tristan Gingold <gingold@adacore.com>
14667
14668 * seh_init.c: Fix SEH handler installation on win64.
14669
146702011-08-01 Ed Schonberg <schonberg@adacore.com>
14671
14672 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
14673 double analysis of an anonymous access to subprogram, because it can
14674 lead to improper sharing of profiles and a back-end crash.
14675
6a2e4f0b
AC
146762011-08-01 Robert Dewar <dewar@adacore.com>
14677
14678 * make.adb, sem_ch4.adb: Minor reformatting.
14679 * gcc-interface/Make-lang.in: Update dependencies.
14680 * sem_util.adb, exp_ch5.adb: Minor reformatting.
14681
146822011-08-01 Arnaud Charlet <charlet@adacore.com>
14683
14684 * gnat_rm.texi: Fix definition of Long_Integer.
14685
146862011-08-01 Ed Schonberg <schonberg@adacore.com>
14687
14688 * exp_aggr.adb: check limit size of static aggregate unconditionally,
14689 to prevent storage exhaustion.
14690 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
14691 finalized is a function body, insert the cleanup code before the final
14692 return statement, to prevent spurious warnings.
14693 * s-pooglo.ads: add overriding indicator.
14694
4561baf7
ES
146952011-08-01 Ed Schonberg <schonberg@adacore.com>
14696
14697 * sem_ch4.adb (Operator_Check): improve error message when both a
14698 with_clause and a use_clause are needed to make operator usage legal.
14699 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
14700 determine whether a compilation unit is visible within an other,
14701 either through a with_clause in the current unit, or a with_clause in
14702 its library unit or one one of its parents.
14703
383e179e
AC
147042011-08-01 Ed Schonberg <schonberg@adacore.com>
14705
14706 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
14707 over an arbitrary expression of an array or container type.
14708 * lib-xref.adb: clarify comment.
14709
147102011-08-01 Bob Duff <duff@adacore.com>
14711
14712 * einfo.ads: Minor reformatting.
14713 * debug.adb: Minor comment improvement.
14714
147152011-08-01 Javier Miranda <miranda@adacore.com>
14716
14717 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
14718 consider hidden subprograms as valid candidates.
14719
147202011-08-01 Arnaud Charlet <charlet@adacore.com>
14721
14722 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
14723
147242011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
14725
14726 * gnat_ugn.texi: Fix typo.
14727
61c161b2
AC
147282011-08-01 Robert Dewar <dewar@adacore.com>
14729
14730 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
14731 lib-xref.adb: Minor reformatting
14732
147332011-08-01 Gary Dismukes <dismukes@adacore.com>
14734
14735 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
14736 when to generate a call to Move_Final_List.
14737 (Has_Controlled_Parts): Remove this function.
14738
84df40f7
AC
147392011-08-01 Geert Bosch <bosch@adacore.com>
14740
14741 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
14742 "," in choice list.
14743
147442011-08-01 Thomas Quinot <quinot@adacore.com>
14745
14746 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
14747 explicit raise of a predefined exception as Comes_From_Source if the
14748 original N_Raise_Statement comes from source.
14749
147502011-08-01 Robert Dewar <dewar@adacore.com>
14751
14752 * sinfo.ads: Add comment.
14753 * sem_ch6.adb: Minor reformatting.
14754
147552011-08-01 Robert Dewar <dewar@adacore.com>
14756
14757 * freeze.adb (Freeze_Entity): Refine check for bad component size
14758 clause to avoid rejecting confirming clause when atomic/aliased present.
14759
147602011-08-01 Ed Schonberg <schonberg@adacore.com>
14761
14762 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
14763 better determine whether an entity reference is a write.
14764 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
14765 subcomponent.
14766 * lib-xref.adb (Output_References): Do no suppress a read reference at
14767 the same location as an immediately preceeding modify-reference, to
14768 handle properly in-out actuals.
14769
147702011-08-01 Tristan Gingold <gingold@adacore.com>
14771
14772 * env.c (__gnat_setenv) [VMS]: Refine previous change.
14773
147742011-08-01 Quentin Ochem <ochem@adacore.com>
14775
14776 * i-cstrin.adb (New_String): Changed implementation, now uses only the
14777 heap to compute the result.
14778
c7f0d2c0
AC
147792011-08-01 Robert Dewar <dewar@adacore.com>
14780
14781 * atree.ads: Minor reformatting.
14782
147832011-08-01 Emmanuel Briot <briot@adacore.com>
14784
14785 * g-expect.adb (Get_Command_Output): Fix memory leak.
14786
147872011-08-01 Geert Bosch <bosch@adacore.com>
14788
14789 * cstand.adb (P_Float_Type): New procedure to print the definition of
14790 predefined fpt types.
14791 (P_Mixed_Name): New procedure to print a name using mixed case
14792 (Print_Standard): Use P_Float_Type for printing floating point types
14793 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
14794 precision IEEE float.
14795
147962011-08-01 Thomas Quinot <quinot@adacore.com>
14797
14798 * sem_ch3.adb: Minor reformatting.
14799
148002011-08-01 Ed Schonberg <schonberg@adacore.com>
14801
14802 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
14803 the completion of a generic function, insert the new body rather than
14804 rewriting the original.
14805
148062011-08-01 Yannick Moy <moy@adacore.com>
14807
14808 * sinfo.ads, errout.ads: Typos in comments.
14809
1c54829e
AC
148102011-08-01 Robert Dewar <dewar@adacore.com>
14811
14812 * par-endh.adb: Minor reformatting.
14813
148142011-08-01 Robert Dewar <dewar@adacore.com>
14815
14816 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
14817 (Pre_Post_Aspects): New subtype.
14818 * par-ch12.adb (P_Generic): New syntax for aspects in packages
14819 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
14820 * par-ch7.adb (P_Package): Remove Decl parameter
14821 (P_Package): Handle new syntax for aspects (before IS)
14822 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
14823 new aspect syntax
14824 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
14825 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
14826 (P_Package): Remove Decl parameter
14827 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
14828 aspects
14829 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
14830 specs
14831 * sem_util.ads, sem_util.adb (Static_Boolean): New function
14832 * sinfo.ads: Document new syntax for aspects in packages etc.
14833 * sprint.adb: Handle new syntax of aspects before IS in package
14834
148352011-08-01 Thomas Quinot <quinot@adacore.com>
14836
14837 * atree.ads: Minor reformatting.
14838 * sem_prag.adb: Minor reformatting.
14839
148402011-08-01 Robert Dewar <dewar@adacore.com>
14841
14842 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
14843 case expr alternative.
14844
148452011-08-01 Ed Schonberg <schonberg@adacore.com>
14846
14847 * sem_ch12.adb: Fix typo.
14848
9eea4346
GB
148492011-08-01 Geert Bosch <bosch@adacore.com>
14850
14851 * sem_prag.adb (Check_No_Link_Name): New procedure.
14852 (Process_Import_Or_Interface): Use Check_No_Link_Name.
14853 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
14854 instead of Standard_Long_Long_Float_Size global. Preparation for
14855 eventual removal of per type constants.
14856 * exp_util.ads (Get_Stream_Size): New function returning the stream
14857 size value of subtype E.
14858 * exp_util.adb (Get_Stream_Size): Implement new function.
14859 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
14860 function.
14861 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
14862 * einfo.adb:
14863 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
14864
3d6c3bd7
GB
148652011-08-01 Geert Bosch <bosch@adacore.com>
14866
14867 * cstand.adb: Fix comments.
14868 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
14869 count of arguments.
14870
e7d897b8
AC
148712011-08-01 Robert Dewar <dewar@adacore.com>
14872
14873 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
14874
148752011-08-01 Geert Bosch <bosch@adacore.com>
14876
14877 * atree.ads: Fix comment.
14878
c228a069
AC
148792011-08-01 Robert Dewar <dewar@adacore.com>
14880
14881 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
14882 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
14883 * par.adb: Add with for Namet.Sp.
14884 * par-tchk.adb: Minor reformatting.
14885
148862011-08-01 Vincent Celier <celier@adacore.com>
14887
14888 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
14889 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
14890 of the init procedure of a SAL.
14891 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
14892 New procedure.
14893
148942011-08-01 Thomas Quinot <quinot@adacore.com>
14895
14896 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
14897 reformatting.
14898
148992011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
14900
14901 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
14902
149032011-08-01 Thomas Quinot <quinot@adacore.com>
14904
14905 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
14906 conformant with its spec (return True only for types that have
14907 an overriding Initialize primitive operation that prevents them from
14908 having preelaborable initialization).
14909 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
14910 initialization for controlled types in Ada 2005 or later mode.
14911
857ade1b
RD
149122011-08-01 Robert Dewar <dewar@adacore.com>
14913
14914 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
14915 Postcondition.
14916 (Same_Aspect): New function.
14917 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
14918 Type_Invariant, Precondition, Postcondition.
14919 * snames.ads-tmpl: Add Name_Type_Invariant.
14920
bd949ee2
RD
149212011-08-01 Robert Dewar <dewar@adacore.com>
14922
14923 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
14924 here.
14925 (Freeze_All_Ent): Fix error in handling inherited aspects.
14926 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
14927 already analyzed, but don't skip entire processing of a declaration,
14928 that's wrong in some cases of declarations being rewritten.
14929 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
14930 Don't delay for integer, string literals
14931 Treat predicates in usual manner for delay, remove special case code,
14932 not needed.
14933 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
14934 (Build_Predicate_Function): Update saved expression in aspect
14935 (Build_Invariant_Procedure): Update saved expression in aspect
14936 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
14937 of replacement of discriminant references if the reference is simple.
14938
f1c952af
RD
149392011-08-01 Robert Dewar <dewar@adacore.com>
14940
14941 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
14942 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
14943 Static_Predicate and Dynamic_Predicate.
14944 (Build_Predicate_Function): Add processing for Static_Predicate
14945 and Dynamic_Predicate.
14946 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
14947 (From_Static_Predicate): New flag
14948 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
14949
149502011-08-01 Robert Dewar <dewar@adacore.com>
14951
14952 * usage.adb: Documentation cleanup for Ada version modes in usage.
14953 * expander.adb: Minor reformatting.
14954
47e11d08
AC
149552011-08-01 Robert Dewar <dewar@adacore.com>
14956
14957 * atree.ads: Minor comment fix.
14958 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
14959 a-witeio.ads, sem_prag.adb: Minor reformatting.
14960
149612011-08-01 Doug Rupp <rupp@adacore.com>
14962
14963 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
14964 pointers. Use descrip.h header file for convenience. Add some
14965 comments.
14966
149672011-08-01 Robert Dewar <dewar@adacore.com>
14968
14969 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
14970 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
14971 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
14972 New procedure.
14973 (Check_Aspect_At_End_Of_Declarations): New procedure
14974 (Analye_Aspect_Specification): Minor changes for above procedures
14975 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
14976 specification node as well.
14977
149782011-08-01 Pascal Obry <obry@adacore.com>
14979
14980 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
14981 Windows files. Use GetFilesAttributes() in this case to check for file
14982 existence instead of returning with an error code.
14983
a3a16b21
VC
149842011-08-01 Vincent Celier <celier@adacore.com>
14985
14986 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
14987 High is above Source length.
14988
ff58cc69
RD
149892011-08-01 Robert Dewar <dewar@adacore.com>
14990
14991 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
14992
6bb88533
AC
149932011-08-01 Robert Dewar <dewar@adacore.com>
14994
14995 * aspects.ads (Boolean_Aspects): New subtype.
14996 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
14997 for derived types in cases where the parent type and derived type have
14998 aspects.
14999 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
15000 with aspects when parent type also has aspects.
15001 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
15002 boolean expression at this point).
15003 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
15004 accordance with final decision on the Ada 2012 feature.
15005 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
15006
150072011-08-01 Matthew Heaney <heaney@adacore.com>
15008
15009 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
15010
060a3f28
AC
150112011-08-01 Pascal Obry <obry@adacore.com>
15012
15013 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
15014 Fix Replace_Slice when High is above current string size.
15015 (Replace_Slice): Fix DL computation when High is above current
15016 string length.
15017
150182011-08-01 Gary Dismukes <dismukes@adacore.com>
15019
15020 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
15021
e7f567a3
AC
150222011-08-01 Matthew Heaney <heaney@adacore.com>
15023
15024 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
15025 of node.
15026
150272011-08-01 Pascal Obry <obry@adacore.com>
15028
15029 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
15030 reformatting.
15031
1a265e78
AC
150322011-08-01 Ed Schonberg <schonberg@adacore.com>
15033
15034 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
15035 access to protected subprograms in generic bodies.
15036 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
15037 protected type, indicate that the convention of the subprogram is
15038 Convention_Protected, because it may be used in subsequent declarations
15039 within the protected declaration.
15040
150412011-08-01 Vincent Celier <celier@adacore.com>
15042
15043 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
15044 and "final" procedures when the name of the library is "ada", to avoid
15045 duplicate symbols "adainit" and "adafinal" in executables.
15046
67e28ef8
ES
150472011-08-01 Ed Schonberg <schonberg@adacore.com>
15048
15049 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
15050 quantified expression that appears within a postcondition and uses the
15051 Ada2012 'Result attribute.
15052
6da2ca7d
RO
150532011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15054
15055 * init.c (__gnat_error_handler): Cast reason to int.
15056 (__gnat_install_handler): Explain sa_sigaction use.
15057
7d5997c6
EB
150582011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15059
15060 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
15061 subprogram has copy-in copy-out parameters, try to promote the mode of
15062 the return type if it is passed in registers.
15063
4b4cfdd5
EB
150642011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15065
15066 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
15067 left operand as addressable.
15068
f3d34576
EB
150692011-07-24 Eric Botcazou <ebotcazou@adacore.com>
15070
15071 * gcc-interface/gigi.h (build_function_stub): Remove.
15072 (build_return_expr): Likewise.
15073 (convert_vms_descriptor): Declare.
15074 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
15075 (build_function_stub): Move to...
15076 * gcc-interface/utils2.c (build_return_expr): Move to...
15077 * gcc-interface/trans.c (build_function_stub): ...here.
15078 (build_return_expr): ...here.
15079 (Subprogram_Body_to_gnu): Add local variable for language_function.
15080 Disconnect the parameter attributes cache, if any, once done with it.
15081 Call end_subprog_body only after setting the end_locus.
15082 Build the stub associated with the function, if any, at the very end.
15083 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
15084 variables and streamline control flow.
15085
0a6ecc08
AC
150862011-07-23 Arnaud Charlet <charlet@adacore.com>
15087
15088 PR ada/49819
15089 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
15090 g-trasym-dwarf.adb.
15091
5b6d595b
RO
150922011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15093
15094 PR bootstrap/49794
15095 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
15096 Assign to act.sa_sigaction.
15097 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
15098 current->return_address to char * before arithmetic.
15099
94017021
RO
151002011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15101
15102 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
15103 Correct argument types.
15104 Extract code from reason.
15105 (__gnat_install_handler): Assign to act.sa_sigaction.
15106
52fd02bb
EB
151072011-07-21 Eric Botcazou <ebotcazou@adacore.com>
15108
15109 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
15110 (GNAT1_OBJS): ...here.
15111
f39a9ca2
EB
151122011-07-15 Eric Botcazou <ebotcazou@adacore.com>
15113
15114 PR ada/48711
15115 * g-socthi-mingw.adb (Fill): Fix formatting.
15116
9e36aa23
EB
15117 * gcc-interface/gigi.h: Move around comment.
15118
e3aca522
JDA
151192011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
15120
15121 PR ada/46350
15122 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
15123
696b1960
FW
151242011-07-14 Florian Weimer <fw@deneb.enyo.de>
15125
15126 PR ada/48711
15127 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
15128
f542c405
EB
151292011-07-13 Eric Botcazou <ebotcazou@adacore.com>
15130
15131 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
15132 range comparison if Pmode is SImode.
15133
9e9bd455
LG
151342011-07-12 Laurent GUERBY <laurent@guerby.net>
15135 Eric Botcazou <ebotcazou@adacore.com>
15136
15137 * adadecode.c: Wrap up in extern "C" block.
15138 * adadecode.h: Likewise.
15139 * adaint.c: Likewise. Remove 'const' keyword.
15140 * adaint.h: Likewise.
15141 * argv.c: Likewise.
15142 * atree.h: Likewise.
15143 * cio.c: Likewise.
15144 * cstreams.c: Likewise.
15145 * env.c: Likewise.
15146 * exit.c: Likewise.
15147 * fe.h: Likewise.
15148 * final.c: Likewise.
15149 * init.c: Likewise.
15150 * initialize.c: Likewise.
15151 * link.c: Likewise.
15152 * namet.h: Likewise.
15153 * nlists.h: Likewise.
15154 * raise.c: Likewise.
15155 * raise.h: Likewise.
15156 * repinfo.h: Likewise.
15157 * seh_init.c: Likewise.
15158 * targext.c: Likewise.
15159 * tracebak.c: Likewise.
15160 * uintp.h: Likewise.
15161 * urealp.h: Likewise.
15162 * xeinfo.adb: Wrap up generated C code in extern "C" block.
15163 * xsinfo.adb: Likewise.
15164 * xsnamest.adb: Likewise.
15165 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
15166 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
15167 * gcc-interface/misc.c: Likewise.
15168 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
15169 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
15170 ada/targext.o here...
15171 (GNAT_ADA_OBJS): ...and not here.
15172 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
15173 (GNATBIND_OBJS): Reorder.
15174
7644b3c7
RH
151752011-07-07 Richard Henderson <rth@redhat.com>
15176
15177 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
15178 dwarf2out_frame_init.
15179
8384ac41
EB
151802011-07-07 Eric Botcazou <ebotcazou@adacore.com>
15181
15182 * gcc-interface/misc.c (gnat_init): Tweak previous change.
15183
fbdd5d87
RO
151842011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15185
15186 PR target/39150
15187 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
15188
1a072294
RG
151892011-07-06 Richard Guenther <rguenther@suse.de>
15190
8384ac41
EB
15191 * gcc-interface/misc.c (gnat_init): Merge calls to
15192 build_common_tree_nodes and build_common_tree_nodes_2.
1a072294
RG
15193 Re-initialize boolean_false_node.
15194
bc712852
EB
151952011-07-02 Eric Botcazou <ebotcazou@adacore.com>
15196 Olivier Hainque <hainque@adacore.com>
15197 Nicolas Setton <setton@adacore.com>
15198
15199 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
15200 the type according to the ARTIFICIAL_P parameter.
15201 (create_type_decl): Likewise.
15202 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
15203
2eb22389
EB
152042011-07-01 Eric Botcazou <ebotcazou@adacore.com>
15205
15206 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
15207 (gnatbind): Likewise.
15208
4bdaaf2f
RO
152092011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
15210
15211 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
15212
c020c92b
EB
152132011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15214
15215 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
15216 local variable throughout. Remove useless call to Base_Type.
15217 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
15218 Take it also into account for the volatileness of the field. Set the
15219 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
15220
96769d32
EB
152212011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15222
15223 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
15224 on a dereference built for a by-ref object if it has an address clause.
15225
7e4680c1
EB
152262011-06-18 Eric Botcazou <ebotcazou@adacore.com>
15227
15228 * einfo.ads (Address_Taken): Document use for the second argument of
15229 Asm_Input and Asm_Output attributes.
15230 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
15231 argument is an entity name, then set Address_Taken on it.
15232 <Attribute_Asm_Output>: Likewise.
15233 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
15234 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
15235 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
15236 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
15237
152382011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
d5cc9181
JR
15239
15240 PR middle-end/46500
15241 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
15242
677f3fa8
JM
152432011-06-14 Joseph Myers <joseph@codesourcery.com>
15244
15245 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
15246 (ada/utils.o): Update dependencies.
15247 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
15248 ../../../libcpp/libcpp.a.
15249 * gcc-interface/utils.c: Include common/common-target.h.
15250 (process_attributes): Use targetm_common.have_named_sections.
15251
009db074
RG
152522011-06-07 Richard Guenther <rguenther@suse.de>
15253
0bad0e23
EB
15254 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
15255 set_sizetype.
009db074 15256
3bfc61cf
EB
152572011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15258
0bad0e23 15259 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
3bfc61cf
EB
15260 TREE_THIS_NOTRAP flag.
15261
5c4a1c7b
EB
152622011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15263
15264 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
15265 Fix thinko.
15266
e9f57686
EB
152672011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15268
15269 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
15270 constants whose full view has discriminants specially.
15271
10e4d056
EB
152722011-06-06 Eric Botcazou <ebotcazou@adacore.com>
15273
15274 * gcc-interface/utils.c: Include diagnostic.h.
15275 (gnat_write_global_declarations): Output debug information for all
15276 global type declarations before finalizing the compilation unit.
15277 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
15278
0957c029
JJ
152792011-05-25 Jakub Jelinek <jakub@redhat.com>
15280
15281 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
15282
52d0a7ac
KT
152832011-05-25 Kai Tietz <ktietz@redhat.com>
15284
15285 * adaint.c (__gnat_to_canonical_file_list_next): Use array
15286 initialization instead of const/none-const pointer assignment.
15287
1ed1641d
JM
152882011-05-24 Joseph Myers <joseph@codesourcery.com>
15289
15290 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
15291 $(EXTRA_GNAT1_OBJS).
15292 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
15293 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
15294 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
15295 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
15296 libcommon-target.a instead of prefix.o.
15297
9fe72ebd
JM
152982011-05-21 Joseph Myers <joseph@codesourcery.com>
15299
15300 PR ada/49097
0bad0e23 15301 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9fe72ebd 15302
2691e6d7
JM
153032011-05-20 Joseph Myers <joseph@codesourcery.com>
15304
0bad0e23
EB
15305 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
15306 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
15307 instead of version.o.
2691e6d7 15308
2d0dd51a 153092011-05-18 Kai Tietz <ktietz@redhat.com>
bf6490b5
KT
15310
15311 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
15312 boolean_false_node instead of integer_zero_node.
15313 (convert_with_check): Likewise.
15314 * gcc-interface/decl.c (choices_to_gnu): Likewise.
15315
7bf9a5ac
EB
153162011-05-12 Eric Botcazou <ebotcazou@adacore.com>
15317
15318 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
15319 type of the parameter is an unconstrained array, convert the actual to
15320 the type of the formal in the In Out and Out cases as well.
15321
e5b00edf
NF
153222011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15323
15324 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
15325 call build_function_type_array or build_varargs_function_type_array
15326 instead.
15327 (create_subprog_type): Don't call build_function_type; call
15328 build_function_type_vec instead.
15329
51545682
NF
153302011-05-11 Nathan Froyd <froydnj@codesourcery.com>
15331
15332 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
15333 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
15334 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
15335
c99c0026
EB
153362011-05-07 Eric Botcazou <ebotcazou@adacore.com>
15337
f620bd21
EB
15338 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
15339
c99c0026
EB
15340 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
15341 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
15342
3d528853
NF
153432011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15344
c99c0026 15345 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
3d528853 15346
d7d058c5
NF
153472011-05-05 Nathan Froyd <froydnj@codesourcery.com>
15348
15349 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
15350 instead of accessing TYPE_ARG_TYPES directly.
15351 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
15352
805e60a0
EB
153532011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15354
15355 PR ada/48844
15356 * gcc-interface/gigi.h (get_variant_part): Declare.
15357 * gcc-interface/decl.c (get_variant_part): Make global.
15358 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
15359 types have the same constant size, are record types and T1 has a
15360 variant part while T2 doesn't.
15361
907a08d9
EB
153622011-05-05 Eric Botcazou <ebotcazou@adacore.com>
15363
15364 * gcc-interface/utils.c (begin_subprog_body): Do not call
15365 get_pending_sizes.
15366 (end_subprog_body): Likewise.
15367
d35936ab
RG
153682011-05-04 Richard Guenther <rguenther@suse.de>
15369
15370 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
15371 int_const_binop.
15372 (pos_to_constructor): Likewise.
15373
c1fd8753 153742011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 15375 Eric Botcazou <ebotcazou@adacore.com>
c1fd8753
NF
15376
15377 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
15378 of build_function_type. Adjust calls to...
15379 (build_raise_check): ...this. Do not take a void_tree parameter.
15380 Call build_function_type_list instead of build_function_type.
15381 Fix head comment and swap couple of conditional blocks.
15382
4fb87d2b
EB
153832011-04-30 Eric Botcazou <ebotcazou@adacore.com>
15384
15385 * gnatvsn.ads (Library_Version): Bump to 4.7.
15386 (Current_Year): Bump to 2011.
15387
fa5e5a76
MM
153882011-04-29 Michael Matz <matz@suse.de>
15389
15390 * gcc-interface/misc.c (gnat_handle_option): Set
15391 warn_maybe_uninitialized.
15392
8d6a2f69
GP
153932011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
15394
15395 * gnat_ugn.texi (Complexity Metrics Control): Update link to
15396 the Watson/McCabe paper.
15397
770937fd
JM
153982011-04-23 Jim Meyering <meyering@redhat.com>
15399
15400 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
15401
eb601ae1
EB
154022011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15403
15404 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
15405 onto the new type.
15406
7d7fcb08
EB
154072011-04-22 Eric Botcazou <ebotcazou@adacore.com>
15408
15409 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
15410 parameter.
15411 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
15412 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
15413 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
15414 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
15415 <all>: Do not set flags on the reused DECL node coming from an alias.
15416 Set DECL_IGNORED_P on the DECL node built for subprograms if they
15417 don't need debug info here...
15418 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
15419 (gigi): Adjust calls to create_subprog_decl.
15420 (build_raise_check): Likewise.
15421 (establish_gnat_vms_condition_handler): Likewise.
15422 (Compilation_Unit_to_gnu): Likewise.
15423 (gnat_to_gnu): Likewise.
15424
e1876cac
EB
154252011-04-21 Eric Botcazou <ebotcazou@adacore.com>
15426
15427 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
15428 (NO_REORDER_ADAFLAGS): New variable.
15429 (EXTRA_GNATTOOLS): Always define.
15430 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
15431 Clean up and adjust list of files compiled with special options.
15432 * gcc-interface/Make-lang.in: Likewise.
15433 (ada/decl.o): Cosmetical change.
15434 (ada/misc.o): Remove dependency on $(PLUGIN_H).
15435
04695783
JM
154362011-04-20 Jim Meyering <meyering@redhat.com>
15437
15438 * initialize.c (__gnat_initialize): Remove useless if-before-free.
15439
23399579
EB
154402011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15441
15442 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
15443 $(CFLAGS) on the link line.
15444
51c5169c
EB
154452011-04-17 Eric Botcazou <ebotcazou@adacore.com>
15446
15447 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
15448 padded type built for the return type if it is unconstrained.
15449
61e46a7d
NF
154502011-04-14 Nathan Froyd <froydnj@codesourcery.com>
15451
15452 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
15453
81f653d6
NF
154542011-04-12 Nathan Froyd <froydnj@codesourcery.com>
15455
b4867846
EB
15456 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
15457 before calling TREE_CHAIN.
81f653d6
NF
15458 * gcc-interface/misc.c (gnat_init_ts): New function.
15459 (LANG_HOOKS_INIT_TS): Define.
15460
a358e188
MJ
154612011-04-12 Martin Jambor <mjambor@suse.cz>
15462
b4867846
EB
15463 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
15464 instead of cgraph_node.
a358e188 15465
29b1c5a4
EB
154662011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15467
15468 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
15469 alignment on fields of the RETURN type built for the Copy-In Copy-Out
15470 mechanism.
15471
88872b00
EB
154722011-04-08 Eric Botcazou <ebotcazou@adacore.com>
15473
15474 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
15475 of aggregate types that contain a placeholder.
15476
dcf0c47e
NF
154772011-04-08 Nathan Froyd <froydnj@codesourcery.com>
15478
15479 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
b4867846 15480 TYPE_ARG_TYPES.
dcf0c47e
NF
15481 (handle_type_generic_attribute): Likewise.
15482
53e3000c
EB
154832011-04-04 Eric Botcazou <ebotcazou@adacore.com>
15484
15485 PR ada/47163
15486 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
15487
ab380bb4
KT
154882011-04-04 Kai Tietz <ktietz@redhat.com>
15489
15490 PR ada/47163
0bad0e23
EB
15491 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
15492 to flag value.
ab380bb4 15493
8ffac116
EB
154942011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15495
15496 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
15497 type case, do not strip a padding type around the array type.
15498
de9528f0
EB
154992011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15500
15501 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
15502 types.
15503
d9d7a26c
EB
155042011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15505
15506 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
15507 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
de9528f0 15508 code for -feliminate-unused-debug-types.
d9d7a26c
EB
15509 (gnat_post_options): Likewise.
15510
4cb12a90
EB
155112011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15512
15513 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15514 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
15515 distinct copy.
15516
acccc61c
EB
155172011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15518
15519 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
15520 DECL_ARTIFICIAL flag on enumeration types.
15521
583eb0c9
EB
155222011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15523
15524 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
15525 fat pointer types artificial unconditionally.
15526 <E_Array_Subtype>: Attach the base array type as a parallel type if it
15527 isn't artificial.
15528
e3edbd56
EB
155292011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15530
15531 * gcc-interface/gigi.h (get_dummy_type): Declare.
15532 (build_dummy_unc_pointer_types): Likewise.
15533 (finish_fat_pointer_type): Likewise.
15534 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
15535 fat pointer type has been built, complete it in place.
15536 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
15537 and thin pointers. Remove useless variable.
15538 (finish_fat_pointer_type): Make global and move to...
15539 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
15540 (get_dummy_type): New function.
15541 (build_dummy_unc_pointer_types): Likewise.
15542 (gnat_pushdecl): Propage the name to the anonymous variants only.
15543 (update_pointer_to): Only adjust the pointer types in the unconstrained
15544 array case.
15545
65444786
EB
155462011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15547
15548 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
15549 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
15550 if this is a Taft amendment type and the full declaration is available.
15551 * gcc-interface/trans.c (process_type): Likewise.
15552 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
15553 (process_freeze_entity): Likewise.
15554 * gcc-interface/utils.c (dummy_global): New static variable.
15555 (gnat_write_global_declarations): If there are types declared as used
15556 at the global level, insert them in the global hash table.
15557
1aeb40dd
EB
155582011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15559
15560 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
15561 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
15562 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
15563 copy.
15564 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
15565 flag of the type accordingly.
15566 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
15567
80ec8b4c
EB
155682011-04-02 Eric Botcazou <ebotcazou@adacore.com>
15569
15570 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15571 finalizing types when updating the pointers to the designated type.
15572 <all>: Finalize the deferred types even if we didn't defer processing
15573 of incomplete types in this invocation.
15574
2a9d769a 155752011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
15576 Nicolas Setton <setton@adacore.com>
15577 Eric Botcazou <ebotcazou@adacore.com>
2a9d769a
OH
15578
15579 * gcc-interface/misc.c (gnat_descriptive_type): New function.
15580 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
15581
2438d7a6
KT
155822011-03-28 Kai Tietz <ktietz@redhat.com>
15583
333d8aff 15584 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
80ec8b4c
EB
15585 Windows targets.
15586 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
15587 * system-mingw.ads (System): Change ZCX_By_Default default to True.
333d8aff 15588
80ec8b4c 15589 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
2438d7a6 15590
8ad150f6
TG
155912011-03-28 Tristan Gingold <gingold@adacore.com>
15592
15593 PR ada/44431
80ec8b4c
EB
15594 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
15595 Use ada output of gnatbind.
8ad150f6
TG
15596 (ada/b_gnatb.adb): Ditto.
15597 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
15598 (ada.mostlyclean, ada.stage1)
15599 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
15600 (ada.stagefeedback): Adjust.
80ec8b4c 15601 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8ad150f6
TG
15602 Use ada output of gnatbind.
15603 (b_gnatm.adb): Ditto.
15604 (b_gnatl.o, b_gnatm.o): New rules.
15605
51c7954d
EB
156062011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15607
15608 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15609 for the padded type built to support a specified size or alignment.
15610
6ddf9843
EB
156112011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15612
15613 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
15614 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
15615 unconditionally to the end of the unit when the designated type is
15616 limited_with'ed.
15617 <all>: Rename local variable. Attempt to un-defer types only and do it
15618 for limited_with'ed types as well.
15619 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
15620 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
15621 consistently and remove redundant call to finalize_from_with_types.
15622
5daed84a
EB
156232011-03-26 Eric Botcazou <ebotcazou@adacore.com>
15624
15625 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
15626 subprograms without a previous spec declared in the same unit.
15627 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
15628 subprograms at the end of the unit instead of at the beginning.
15629 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
15630 isn't public for the special handling of non-inline functions nested
15631 inside inline external functions.
15632
0edf1bb2
JL
156332011-03-25 Jeff Law <law@redhat.com>
15634
5daed84a 15635 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
0edf1bb2 15636
e3c4580e
EB
156372011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15638
15639 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
15640 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
15641 to compute Set_Size_Depends_On_Discriminant.
15642 (Layout_Type): Call it on array types in back-end layout mode.
15643 * sem_util.adb (Requires_Transient_Scope): Return true for array
15644 types only if the size depends on the value of discriminants.
15645 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
15646 type if the RHS is a call to a function that returns an unconstrained
15647 type with default discriminant.
15648
abbc8c7b
EB
156492011-03-24 Eric Botcazou <ebotcazou@adacore.com>
15650
15651 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
15652 non-conversion to the nominal result type at the end.
15653
ddb5a105
EB
156542011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15655
15656 * gcc-interface/trans.c (create_temporary): New function taken from...
15657 (create_init_temporary): ...here. Call it.
15658 (call_to_gnu): Create the temporary for the return value early, if any.
15659 Create it for a function with copy-in/copy-out parameters if there is
15660 no target; in other cases of copy-in/copy-out, use another temporary.
15661 Push the new binding level lazily. Add and rename local variables.
15662
0d853156
EB
156632011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15664
15665 * gcc-interface/decl.c (validate_size): Improve comments and tweak
15666 error message.
15667 (set_rm_size): Likewise.
15668
4184ef1b
EB
156692011-03-23 Eric Botcazou <ebotcazou@adacore.com>
15670
15671 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
15672 for the padded type built in order to support a specified alignment.
15673 Fix incorrect formatting.
15674
bf7eefab
EB
156752011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15676
15677 PR bootstrap/48216
15678 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
15679
ef0feeb2
EB
156802011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15681
15682 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
15683 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
15684 to the end of the list. Adjust recursive call. Rename local variable.
15685 If REORDER is true, reorder components of the record type.
15686 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
15687 components_to_record and adjust the parameter list.
15688
646f9414
EB
156892011-03-21 Eric Botcazou <ebotcazou@adacore.com>
15690
15691 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
15692 disabled, use the variable for bounds of loop iteration scheme.
15693
62d784f7
KT
156942011-03-21 Kai Tietz <ktietz@redhat.com>
15695
15696 PR target/12171
0bad0e23 15697 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
62d784f7 15698
f230d759
EB
156992011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15700
15701 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
15702 out whether the expression is read-only. Short-circuit placeholder
15703 case and rename a couple of local variables.
15704
bb1f7929
EB
157052011-03-17 Eric Botcazou <ebotcazou@adacore.com>
15706
15707 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
15708 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
15709 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
15710 (convert): Deal with conversions from a smaller form type specially.
15711
400a2d24
EB
157122011-02-14 Eric Botcazou <ebotcazou@adacore.com>
15713
15714 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
15715 its argument, except for the special -I- switch.
15716
c26bc3ad
GP
157172011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
15718
0bad0e23
EB
15719 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
15720 "Ada Issues".
c26bc3ad 15721
07b8e910
EB
157222011-02-08 Eric Botcazou <ebotcazou@adacore.com>
15723
15724 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
15725
31a5a547
EB
157262011-02-03 Eric Botcazou <ebotcazou@adacore.com>
15727
15728 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
15729 GNAT_FORMAL.
15730 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
15731 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
15732 instead of GNAT_FORMAL. Protect the expression against multiple uses.
15733 Do not generate the check directly, instead instantiate the template
15734 check present in the descriptor.
15735 (make_descriptor_field): Move around.
15736 (build_vms_descriptor32): Build a template check in the POINTER field.
15737 (build_vms_descriptor): Remove useless suffixes.
15738 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
15739
dcf25f59
EB
157402011-01-26 Eric Botcazou <ebotcazou@adacore.com>
15741
15742 PR bootstrap/47467
15743 * targext.c: Include target files if IN_RTS is defined.
15744
0418e131
RG
157452011-01-26 Richard Guenther <rguenther@suse.de>
15746
15747 PR bootstrap/47467
15748 * targext.c: Include config.h.
15749 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
15750 dependency.
15751
c6eecbd8 157522011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 15753 Eric Botcazou <ebotcazou@adacore.com>
c6eecbd8
PO
15754
15755 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
15756
2d3c7e4f
EB
157572011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15758
15759 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
15760 end-of-case on the end label and its associated gotos, if any.
15761
0394741f
EB
157622011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15763
15764 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
15765 expressions of the parameter cache within the statement group of
15766 the CICO mechanism.
15767
2a02d090 157682011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 15769 Eric Botcazou <ebotcazou@adacore.com>
2a02d090
OH
15770
15771 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
15772 (set_end_locus_from_node): New function.
15773 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
15774 make and the function end_locus.
15775 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
15776 for the elaboration subprogram.
15777 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
15778 set the end_locus of the expression as well.
15779
89f5e978
EB
157802011-01-04 Eric Botcazou <ebotcazou@adacore.com>
15781
15782 PR ada/47131
15783 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
15784 variables that are referenced in exception handlers volatile.
15785
15786
ad41bd84 15787\f
797103eb 15788Copyright (C) 2011 Free Software Foundation, Inc.
ad41bd84
JM
15789
15790Copying and distribution of this file, with or without modification,
15791are permitted in any medium without royalty provided the copyright
15792notice and this notice are preserved.