]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
atree.ads, atree.adb (Copy_Separate_List): New function that applies Copy_Separate_Tr...
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
864a4236
ES
12011-08-29 Ed Schonberg <schonberg@adacore.com>
2
3 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
4 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
5 of statement lists that may contain local declarations.
6 (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to duplicate the
7 triggering statements needed for the expansion of this construct, when
8 the trigger is a dispatching call to a synchronized primitive.
9
7f394c1d
AC
102011-08-29 Arnaud Charlet <charlet@adacore.com>
11
12 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
13 * bindgen.adb: Add comments.
14 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
15 in CodePeer mode.
16
2c1a2cf3
RD
172011-08-29 Robert Dewar <dewar@adacore.com>
18
19 * exp_attr.adb: Minor reformatting.
20 Minor code reorganization and commenting.
21 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
22 reformatting.
23
0bfc9a64
AC
242011-08-29 Thomas Quinot <quinot@adacore.com>
25
26 * get_scos.adb: Ignore chaining indicators not currently supported
27 by Ada.
28
292011-08-29 Arnaud Charlet <charlet@adacore.com>
30
31 * system.ads: Minor editing.
32
332011-08-29 Arnaud Charlet <charlet@adacore.com>
34
35 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
36 CodePeer mode.
37 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
38 Attribute_Elab_Subp_Body.
39 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
40 * sem_util.adb: Update comments.
41
828d4cf0
TQ
422011-08-29 Thomas Quinot <quinot@adacore.com>
43
44 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
45 pragma name for each SCO statement corresponding to a pragma.
46
5cd7bb15
AC
472011-08-29 Arnaud Charlet <charlet@adacore.com>
48
49 * opt.ads: Minor editing.
50
512011-08-29 Yannick Moy <moy@adacore.com>
52
53 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
54 that only made sense for CodePeer mode.
55
562011-08-29 Jose Ruiz <ruiz@adacore.com>
57
58 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
59 which is no longer used.
60 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
61 handling of the 64-bit division check.
62 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
63 division available.
64 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
65 longer used.
66
672011-08-29 Thomas Quinot <quinot@adacore.com>
68
69 * get_scos.adb: Minor reformatting.
70
25b589cb
AC
712011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
72
73 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
74 statement list is wrapped in a block, the block is explicitly analyzed
75 in order to properly redecorate the entities and create a servicing
76 finalizer.
77
782011-08-29 Tristan Gingold <gingold@adacore.com>
79
80 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
81 (Set_Zero_Cost_Handling): Remove.
82
832011-08-29 Thomas Quinot <quinot@adacore.com>
84
85 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
86
1197ddb1
AC
872011-08-29 Geert Bosch <bosch@adacore.com>
88
89 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
90 instruction, as the latter may produce -0.0, which is not a valid VAX
91 F float number.
92 (Neg_G): Likewise for VAX F float.
93
942011-08-29 Robert Dewar <dewar@adacore.com>
95
96 * exp_util.adb: Minor reformatting.
97
982011-08-29 Yannick Moy <moy@adacore.com>
99
100 * sem_ch3.adb: Minor comment update.
101
1022011-08-29 Thomas Quinot <quinot@adacore.com>
103
104 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
105 the operand type.
106
1072011-08-29 Thomas Quinot <quinot@adacore.com>
108
109 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
110 current statement sequence on a generic instantiation or a subprogram
111 declaration.
112
8f66cda7
AC
1132011-08-29 Robert Dewar <dewar@adacore.com>
114
115 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
116 Minor reformatting.
117
1182011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
119
120 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
121 Correct the check which involves the freeze node of a controlled or
122 access-to-controlled type.
123
1242011-08-29 Geert Bosch <bosch@adacore.com>
125
126 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
127 statements.
128 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
129 Asm statements.
130
cf161d66
AC
1312011-08-29 Yannick Moy <moy@adacore.com>
132
133 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
134 for every index type and component type that is not a subtype_mark.
135 (Process_Subtype): Set Etype of subtype.
136
1372011-08-29 Robert Dewar <dewar@adacore.com>
138
139 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
140 reorganization. Minor reformatting.
141
7cc83cd8
AC
1422011-08-29 Steve Baird <baird@adacore.com>
143
144 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
145 for CodePeer and ALFA modes.
146
1472011-08-29 Ed Schonberg <schonberg@adacore.com>
148
149 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
150 that comes from an enclosing scope if it is not the renaming of an
151 actual, to handle properly a spurious ambiguity in an instance.
152
76af4137
AC
1532011-08-29 Eric Botcazou <ebotcazou@adacore.com>
154
155 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
156 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
157 use it instead of the Esize of the first parameter.
158 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
159 above change.
160 <Size>: Likewise. Call it for composite types on the RM size.
161
1622011-08-29 Yannick Moy <moy@adacore.com>
163
164 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
165 * sem_util.adb (Unique_Name): Correct behaviour for names of
166 compilation units.
167
9b20e59b
AC
1682011-08-29 Yannick Moy <moy@adacore.com>
169
170 * sem_prag.adb (Check_Precondition_Postcondition): In formal
171 verification mode, analyze pragma expression for correctness, for
172 pre/post on library-level subprogram, as it is not expanded later.
173
1742011-08-29 Yannick Moy <moy@adacore.com>
175
176 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
177 in formal verification.
178
1792011-08-29 Thomas Quinot <quinot@adacore.com>
180
181 * sem_util.adb: Minor reformatting.
182 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
183 there's no pragma.
184 * par_sco.ads, par_sco.adb: Update comments.
185
1862011-08-29 Yannick Moy <moy@adacore.com>
187
188 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
189 associated getter/setter.
190 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
191
1922011-08-29 Vincent Celier <celier@adacore.com>
193
194 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
195 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
196 with declarations for Language_Kind and Dependency_Kind for Ada.
197 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
198 (Process_Compiler): Take into account the new attributes Dependency_Kind
199 and Language_Kind.
200 (Check_Configuration): Check if language kind is unit based, not if the
201 language name is Ada.
202 (Process_Exceptions_Unit_Based): Ditto
203 (Add_Language): Remove default additions of language and dependency kind
204 * prj.ads: Minor comment change
205 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
206
2072011-08-29 Johannes Kanig <kanig@adacore.com>
208
209 * debug.adb: Update comments.
210
c5bc3df6
JM
2112011-08-24 Joseph Myers <joseph@codesourcery.com>
212
213 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
214 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
215 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
216 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
217 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
218
e3aa9eba
RO
2192011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
220
221 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
222 (GNATLIBCFLAGS_FOR_C): Replace
223 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
224 (gnatlib-shared-default, gnatlib-shared-dual-win32)
225 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
226 (gnatlib-sjlj, gnatlib-zcx): Likewise.
227
f446d60e
EB
2282011-08-07 Eric Botcazou <ebotcazou@adacore.com>
229
230 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
231
588c8f48
EB
232 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
233
234 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
235
28d711bf
NR
2362011-08-05 Nicolas Roche <roche@adacore.com>
237
238 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
239 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
240 canadian cross.
241 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
242
993f8920
AC
2432011-08-05 Matthew Heaney <heaney@adacore.com>
244
245 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
246 subprogram bodies declared out-of-order.
247
2482011-08-05 Yannick Moy <moy@adacore.com>
249
250 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
251 entities directly in package Standard, otherwise skip the standard
252 prefix.
253
9b3956dd
RD
2542011-08-05 Robert Dewar <dewar@adacore.com>
255
256 * a-cbmutr.adb: Minor reformatting
257 (Allocate_Node): refactor node allocation algorithm
258
2592011-08-05 Robert Dewar <dewar@adacore.com>
260
261 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
262 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
263 mode.
264 (Analyze_Pragma, case Check_Policy): Ditto.
265 * sem_prag.ads (Check_Disabled): New function
266 * snames.ads-tmpl: Add Name_Disable.
267
2682011-08-05 Robert Dewar <dewar@adacore.com>
269
270 * gnat_rm.texi: Document implementation-defined policy DISABLE for
271 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
272
79e705d6
AC
2732011-08-05 Ed Schonberg <schonberg@adacore.com>
274
275 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
276 that appears in a generic formal part and applies to a formal
277 subprogram.
278
2792011-08-05 Robert Dewar <dewar@adacore.com>
280
281 * a-cbmutr.ads: Minor reformatting.
282
23b6deca
AC
2832011-08-05 Matthew Heaney <heaney@adacore.com>
284
285 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
286 to check count, check sign of value instead.
287 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
288 (Copy_Subtree): allocate copy of source element
289 (Equal_Subtree): compare elements, not access objects
290
2912011-08-05 Vincent Celier <celier@adacore.com>
292
293 * gnat_ugn.texi: Fix VMS alternative.
294
a2773bd3
AC
2952011-08-05 Thomas Quinot <quinot@adacore.com>
296
297 * sem_ch11.adb: Add comment.
298
2992011-08-05 Robert Dewar <dewar@adacore.com>
300
301 * exp_util.adb: Minor comment fix.
302
3032011-08-05 Robert Dewar <dewar@adacore.com>
304
305 * scng.adb (Error_Unterminated_String): Improve flag position when
306 comma present.
307
3082011-08-05 Matthew Heaney <heaney@adacore.com>
309
310 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
311 tree containers).
312 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
313 multiway tree containers.
314
3152011-08-05 Robert Dewar <dewar@adacore.com>
316
317 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
318 * stylesw.adb: Implement -gnatyC to control comment spacing
319 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
320 -gnatyc/C).
321 * usage.adb: Add line for -gnatyC.
322
3232011-08-05 Robert Dewar <dewar@adacore.com>
324
f446d60e 325 * gnat_ugn.texi: Document -gnatyC.
a2773bd3
AC
326 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
327 synonym for COMMENTS2).
328
dedac3eb
RD
3292011-08-05 Robert Dewar <dewar@adacore.com>
330
331 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
332 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
333 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
334 a-comutr.ads, lib-xref.adb: Minor reformatting.
335
3362011-08-05 Robert Dewar <dewar@adacore.com>
337
338 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
339 warning if there is an exception handler present.
340
7c62a85a
AC
3412011-08-05 Pascal Obry <obry@adacore.com>
342
343 * a-iteint.ads: Fix copyright year.
344
3452011-08-05 Thomas Quinot <quinot@adacore.com>
346
347 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
348 statement SCO for a USE clause or a representation clause.
349
3502011-08-05 Yannick Moy <moy@adacore.com>
351
352 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
353 between body and spec for stub.
354 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
355 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
356 pragma precondition or postcondition, for which the enclosing
357 subprogram or package in the AST is not the desired one, return empty.
358
e49208a9
AC
3592011-08-05 Thomas Quinot <quinot@adacore.com>
360
361 * g-expect.adb: Minor reformatting.
362
3632011-08-05 Bob Duff <duff@adacore.com>
364
365 * a-fihema.adb: Comment out OS_Lib.
366
3672011-08-05 Matthew Heaney <heaney@adacore.com>
368
369 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
370 (unbounded multiway tree containers) and a-iteint.ads.
371 * a-comutr.ads, a-comutr.adb:
372 This is the new Ada 2012 unit for unbounded multiway tree containers
373 * a-cimutr.ads, a-cimutr.adb
374 This is the new Ada 2012 unit for indefinite multiway tree containers
375 * a-iteint.ads: New file.
376
201cdb74
RO
3772011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
378
f446d60e 379 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
201cdb74 380
d50f4827
AC
3812011-08-05 Bob Duff <duff@adacore.com>
382
383 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
384 subpools.
385 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
386
3872011-08-05 Ed Schonberg <schonberg@adacore.com>
388
389 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
390 general indexing aspects of Ada2012. Called when analyzing indexed
391 components when other interpretations fail.
392 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
393 in an expression context where overloading is meaningful. This excludes
394 the occurrence in an aspect specification (efficiency only).
395 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
396 related to iterators can be set by an attribute specification, but
397 cannot be queried.
398 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
399 Constant_Indexing and Variable_Indexing.
400 (Check_Indexing_Functions): New procedure to perform legality checks.
401 Additional semantic checks at end of declarations.
402
efe05dfc
AC
4032011-08-05 Sergey Rybin <rybin@adacore.com>
404
405 * tree_io.ads: Update ASIS_Version_Number because of the change of the
406 order of calling Tree_Write/Tree_Read routines made for aspects.
407
4082011-08-05 Bob Duff <duff@adacore.com>
409
410 * a-fihema.adb (Finalize): Fix race condition.
411
5f9cdefe
AC
4122011-08-05 Yannick Moy <moy@adacore.com>
413
414 * sem_ch12.adb (Analyze_Package_Instantiation,
415 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
416 mode.
417
4182011-08-05 Ed Schonberg <schonberg@adacore.com>
419
420 * sem_type.adb (Specific_Type): in an instance, the type-specific
421 operand of an equality check that involves null may have a private
422 type. Use full view to determine legality of construct.
423
822868aa
AC
4242011-08-05 Vincent Celier <celier@adacore.com>
425
426 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
427 delete or close the file when the call to gnatmake was successful.
428
4292011-08-05 Yannick Moy <moy@adacore.com>
430
431 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
432 Global_Discard_Names.
433
4342011-08-05 Ed Schonberg <schonberg@adacore.com>
435
436 * sinfo.ads: comments on use of entity field for aspect specifications.
437
4382011-08-05 Ed Schonberg <schonberg@adacore.com>
439
440 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
441 node is not itself an entity but a selected component, it is a
442 rewritten parameterless call to an en enclosing synchronized operation,
443 and this expansion will be performed again in the instance, so there is
444 no global information to preserve.
445
44a10091
AC
4462011-08-05 Javier Miranda <miranda@adacore.com>
447
448 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
449 for renamings of predefined primitives.
450 (In_Predef_Prims_DT): New subprogram.
451
4522011-08-05 Ed Schonberg <schonberg@adacore.com>
453
454 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
455 possible interpretation of name is a reference type, add an
456 interpretation that is the designated type of the reference
457 discriminant of that type.
458 * sem_res.adb (resolve): If the interpretation imposed by context is an
459 implicit dereference, rewrite the node as the deference of the
460 reference discriminant.
461 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
462 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
463 parent type or base type.
464 * sem_ch4.adb (Process_Indexed_Component,
465 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
466 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
467 Check for implicit dereference.
468 (List_Operand_Interps): Indicate when an implicit dereference is
469 ambiguous.
470 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
471
4722011-08-05 Thomas Quinot <quinot@adacore.com>
473
474 * scos.ads: Update documentation of SCO table. Pragma statements can now
475 be marked as disabled (using 'p' instead of 'P' as the statement kind).
476 * par_sco.ads, par_sco.adb: Implement the above change.
477 (Process_Decisions_Defer): Generate a P decision for the first parameter
478 of a dyadic pragma Debug.
479 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
480 necessary.
481 * put_scos.adb: Code simplification based on above change.
482
bb3c784c
AC
4832011-08-05 Robert Dewar <dewar@adacore.com>
484
485 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
486 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
487 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
488 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
489
4902011-08-05 Bob Duff <duff@adacore.com>
491
492 * a-stunau.ads, g-spipat.adb: Update comments.
493
36f686f9
BD
4942011-08-05 Bob Duff <duff@adacore.com>
495
496 * a-fihema.ads: Minor comment fix.
497 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
498 correct.
499 (Attach, Detach): Remove some unnecessary code.
500 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
501
7882673f
BD
5022011-08-05 Bob Duff <duff@adacore.com>
503
504 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
505 allocation for Objects component. This simplifies the code somewhat. It
506 is also a little more efficient in the not-so-unusual case where there
507 are no controlled objects allocated.
508 Make Finalization_Started flag atomic.
509 (Finalize): Avoid unnecessary detachment of items from the list.
510 (pcol): Minor cleanup.
511
d34cd274
AC
5122011-08-05 Ed Schonberg <schonberg@adacore.com>
513
514 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
515 package whose name is the same as that of the generic unit, or its
516 ultimate prefix.
517
5182011-08-05 Bob Duff <duff@adacore.com>
519
520 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
521 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
522 Minor comment fixes.
523
00332244
AC
5242011-08-05 Arnaud Charlet <charlet@adacore.com>
525
526 * make.adb (Linking_Phase): No longer need to set source search path
527 before calling gnatlink in CodePeer mode.
528 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
529 gcc in CodePeer mode, since the binder generated file no longer has a
530 'with Main'.
531 * switch.ads, switch.adb (Is_Language_Switch): Removed.
532 * switch-c.adb: Update comment.
533
5342011-08-05 Thomas Quinot <quinot@adacore.com>
535
536 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
537
5382011-08-05 Nicolas Roche <roche@adacore.com>
539
540 * gnat_ugn.texi: Fix minor syntax error issue.
541
5422011-08-05 Vincent Celier <celier@adacore.com>
543
544 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
545 delete or close the file when the call to gnatmake returns a non
546 successful return code.
547
5482011-08-05 Ed Schonberg <schonberg@adacore.com>
549
550 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
551 check, indicate that the copy of the original node does not come from
552 source, to prevent an infinite recursion of the expansion.
553
5542011-08-05 Johannes Kanig <kanig@adacore.com>
555
556 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
557 VC generation for subprogram bodies.
558
5592011-08-05 Yannick Moy <moy@adacore.com>
560
561 * einfo.ads: Typo.
562 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
563 the base type with the smallest allowed base type.
564
5652011-08-05 Sergey Rybin <rybin@adacore.com>
566
567 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
568 aspects.
569
5702011-08-05 Ed Schonberg <schonberg@adacore.com>
571
572 * sem_ch12.ads: minor comment updates.
573
5742011-08-05 Ed Schonberg <schonberg@adacore.com>
575
576 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
577 instantiation and a formal package the compiler generates a package
578 renaming declaration so that the generic name within the declaration
579 is interpreted as a renaming of the instance. At the end of a formal
580 package declaration, this renaming must become invisible.
581
0da80d7d
AC
5822011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
583
584 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
585 comparison and rely on concrete entities instead.
586
5872011-08-05 Ed Schonberg <schonberg@adacore.com>
588
589 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
590 and discriminants, to indicate that the type has an access discriminant
591 that supports implicit dereference.
592 * snames.ads-tmpl: Add names of aspects and attributes related to
593 Ada2012 iterators: constant_indexing, default_iterator,
594 iterator_element, implicit_dereference, variable_indexing.
595 * aspects.ads, aspects.adb: entries for iterator-related aspects.
596 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
597 iterator-related aspects.
598 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
599
6002011-08-05 Sergey Rybin <rybin@adacore.com>
601
602 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
603 metrics in gnatmetric to cover new kinds of coupling mentrics.
604
6052011-08-05 Steve Baird <baird@adacore.com>
606
607 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
2c7f9cc0 608 of calling the user-defined main subprogram.
0da80d7d
AC
609 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
610 is set) Call_Main_Subprogram ahead of, as opposed to
611 inside of, Main.
612 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
613 generation of a "with" of the user-defined main subprogram.
614 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
615 (which is now called from Gen_Main instead).
616
73242473
AC
6172011-08-05 Emmanuel Briot <briot@adacore.com>
618
619 * projects.texi: Added reference to the Makefile package.
620
6212011-08-05 Thomas Quinot <quinot@adacore.com>
622
623 * exp_ch7.adb: Minor comment rewording.
624
6252011-08-05 Ed Falis <falis@adacore.com>
626
627 * env.c: Fix comment.
628
6292011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
630
631 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
632 character comparison and rely on concrete entities instead.
633
97ed5872
AC
6342011-08-05 Ed Schonberg <schonberg@adacore.com>
635
636 * sem_ch3.adb: (Check_Private_Overriding): better error message,
637 suggested by AI95-0068.
638
6392011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
640
641 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
642 the two potential initialization calls. This accounts for any
643 access-before-elaboration checks which may precede the initialization
644 calls.
645 (Next_Suitable_Statement): New routine. Returns the next real statement
646 after the input node while skipping generated checks.
647 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
648 with comment on usage.
649 Do not generate Elaborate_All when the trigger is a finalization call
650 coming from a type init proc.
651 (Check_Elab_Call): Propagate the initialization procedure context to
652 subsequent calls to Check_A_Call.
653 (Check_Internal_Call_Continue): Propagate the initialization procedure
654 context to subsequent calls to Check_Elab_Call.
655 (Is_Finalization_Procedure): New routine. Returns True if the input
656 entity denotes a [Deep_]Finalize routine.
657 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
658 along with comment on usage.
659
6602011-08-05 Vadim Godunko <godunko@adacore.com>
661
662 * s-atocou.ads: Add list of supported platforms.
663
6642011-08-05 Yannick Moy <moy@adacore.com>
665
666 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
667
668 * opt.ads (Disable_ALI_File): new Boolean flag
669 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
670
6712011-08-05 Ed Falis <falis@adacore.com>
672
673 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
674 environ is properly defined.
675
6762011-08-05 Vincent Celier <celier@adacore.com>
677
678 * make.adb (Compilation_Phase): Exit immediately when all objects have
679 been found up to date, to avoid multiple exit messages.
680 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
681 same project for languages with no compiler.
682 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
683 -eI.
9aff36e9
RD
6842011-08-05 Robert Dewar <dewar@adacore.com>
685
686 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
687 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
688 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
689 s-atocou-builtin.adb: Minor reformatting.
690
406935b6
AC
6912011-08-05 Yannick Moy <moy@adacore.com>
692
693 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
694 if the node to wrap is a pragma check, this node and enclosed
695 expression are not expanded, so do not apply any transformations here.
696 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
697 introducing transient scopes.
698
6992011-08-05 Jose Ruiz <ruiz@adacore.com>
700
701 * adaint.c (__gnat_set_writable, __gnat_set_readable,
702 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
703 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
704 routine is available, so we use the default implementation of these
705 functions.
706 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
707 support for copying attributes on VxWorks 6.
708
7092011-08-05 Yannick Moy <moy@adacore.com>
710
711 * debug.adb: Remove use of -gnatd.D.
712 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
713 * opt.ads: Simplify variables for ALFA mode, to keep one only
714 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
715 to ALFA mode.
716
7172011-08-05 Vincent Celier <celier@adacore.com>
718
719 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
720 Builder'Default_Switches.
721
7222011-08-05 Vincent Celier <celier@adacore.com>
723
724 * makeusg.adb: Add lines for --create-map-file switches.
725
7262011-08-05 Ed Schonberg <schonberg@adacore.com>
727
728 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
729 profile is incomplete and the full view is available, replace it with
730 the full view.
731 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
732 incomplete, freezing the subprogram is delayed until the full view is
733 frozen.
734 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
735 fixed-point multiplication operator and the predefined operator is
736 resolved in favor of the user-defined one.
737
96c891b3
RO
7382011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
739
740 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
741 CONST_CAST.
742
276e7ed0
AC
7432011-08-04 Ed Schonberg <schonberg@adacore.com>
744
745 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
746 whether a type lacks user-defined Read or Write operations, or has a
747 component that lacks them.
748 * sem_attr.adb (Check_Stream_Attribute): if restriction
749 No_Default_Stream_Attributes is active, verify that all subcomponent
750 types of the target have user-defined stream operations, and report
751 error otherwise.
752 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
753 * exp_strm.adb: Build_Elementary_Input_Call,
754 Build_Elementary_Write_Call): remove checks for restriction
755 No_Default_Stream_Attributes, now checked in semantics.
756
7572011-08-04 Vincent Celier <celier@adacore.com>
758
759 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
760 switches on the command line, look for all valid --RTS switches in the
761 Builder switches and for each language use the first runtime name found
762 to invoke gprconfig.
763 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
764 command line and there is no auto-configuration.
765 (Runtime_Name_Set_For): New function.
766
7672011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
768
769 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
770 elaborate initialization expression for variable Abort when processing
771 a package body or a declaration.
772 (Create_Finalizer): Propagate the package context when creating the
773 exception-related variables.
774 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
775 For_Package along with usage comment.
776
19172ae9
AC
7772011-08-04 Arnaud Charlet <charlet@adacore.com>
778
779 * gcc-interface/Makefile.in: Clean up targets.
780 Enable new package for atomic counters and copy-on-write implementation
781 of unbounded strings on x86 platforms.
782 * gcc-interface/Make-lang.in: Update dependencies.
783
0319cacc
AC
7842011-08-04 Robert Dewar <dewar@adacore.com>
785
786 * exp_ch7.adb: Minor reformatting.
787
7882011-08-04 Robert Dewar <dewar@adacore.com>
789
790 * exp_strm.adb: Minor reformatting.
791
7922011-08-04 Vadim Godunko <godunko@adacore.com>
793
794 * s-atocou.adb: Replace by dummy version and use on targets where atomic
795 operations are not supported.
796 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
797 * s-atocou-x86.adb: New file.
798 * Makefile.rtl: Add s-atocou.o file
799
8002011-08-04 Arnaud Charlet <charlet@adacore.com>
801
802 * make.adb (Compile): Move setting of CodePeer_Mode to ...
803 (Compilation_Phase): ... here.
804 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
805
8062011-08-04 Thomas Quinot <quinot@adacore.com>
807
808 * Make-generated.in: Fix minor typo in comment.
809
26e7e1a0
AC
8102011-08-04 Thomas Quinot <quinot@adacore.com>
811
812 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
813 the project path.
814
8152011-08-04 Robert Dewar <dewar@adacore.com>
816
817 * a-coinho.adb: Minor reformatting.
818
8192011-08-04 Robert Dewar <dewar@adacore.com>
820
821 * a-coinho.ads: Minor reformatting.
822
8232011-08-04 Vadim Godunko <godunko@adacore.com>
824
825 * s-atocou.ads, s-atocou.adb: New files.
826 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
827 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
828 direct use of GCC's atomic builtins and replace them by use of new
829 atomic counter package.
830
8312011-08-04 Ed Schonberg <schonberg@adacore.com>
832
833 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
834
8352011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
836
837 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
838 with a call to Get_External_Tag.
839 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
840 subprogram usage. Remove the guard against package declarations and
841 bodies since Build_Cleanup_Statements is no longer invoked in that
842 context.
843 (Build_Components): Initialize Tagged_Type_Stmts when the context
844 contains at least one library-level tagged type.
845 (Build_Finalizer): New local variables Has_Tagged_Types and
846 Tagged_Type_Stmts along with associated comments on usage. Update the
847 logic to include tagged type processing.
848 (Create_Finalizer): Insert all library-level tagged type unregistration
849 code before the jump block circuitry.
850 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
851 (Expand_N_Package_Declaration): Remove the call to
852 Build_Cleanup_Statements.
853 (Process_Tagged_Type_Declaration): New routine. Generate a call to
854 unregister the external tag of a tagged type.
855 (Processing_Actions): Reimplemented to handle tagged types.
856 (Process_Declarations): Detect the declaration of a library-level
857 tagged type and carry out the appropriate actions.
858 (Unregister_Tagged_Types): Removed. The machinery has been directly
859 merged with Build_Finalizer.
860
7483c888
AC
8612011-08-04 Robert Dewar <dewar@adacore.com>
862
863 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
864 gnatls.adb, exp_ch3.adb: Minor reformatting.
865
8662011-08-04 Marc Sango <sango@adacore.com>
867
868 * sem_attr.adb (Analyze_Attribute): Replace the message
869 "invisible attribute of}" of the spark restriction violation in
870 attribute reference by the simple message "invisible attribute of type".
871 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
872 two insertion characters: '&' and '}'.
873
8742011-08-04 Vadim Godunko <godunko@adacore.com>
875
876 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
877 * a-coinho.ads, a-coinho.adb: New file.
878 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
879
5207696c
AC
8802011-08-04 Nicolas Roche <roche@adacore.com>
881
882 * alfa_test.adb: Not all ali files are containing alfa information even
883 if compiled with -gnatd.F. So suppress warning about missing ALFA
884 information.
885
8862011-08-04 Yannick Moy <moy@adacore.com>
887
888 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
889 scope.
890 * put_alfa.adb: Check that scope name is not empty.
891
8922011-08-04 Ed Schonberg <schonberg@adacore.com>
893
894 * exp_ch3.adb (Stream_Operation_Ok): new predicate
895 Needs_Elementary_Stream_Operation, to determine whether user-defined
896 Read and Write attributes are available for the elementary components
897 of the given type. If only the predefined attributes are available,
898 then when restriction No_Default_Stream_Attributes is active the
899 predefined stream attributes for the composite type cannot be created.
900
9012011-08-04 Robert Dewar <dewar@adacore.com>
902
903 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
904 Put routines in alpha order
905
2bd2d858
JR
9062011-08-04 Jose Ruiz <ruiz@adacore.com>
907
908 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
909 * gcc-interface/Make-lang.in: Update dependencies.
910
8fae6016
AC
9112011-08-04 Arnaud Charlet <charlet@adacore.com>
912
913 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
914 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
915 gnat1why).
916
a54d0eb4
AC
9172011-08-04 Robert Dewar <dewar@adacore.com>
918
919 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
920 lib-xref-alfa.adb: Minor reformatting.
921
9222011-08-04 Marc Sango <sango@adacore.com>
923
924 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
925 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
926 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
927 mode.
928
9292011-08-04 Tristan Gingold <gingold@adacore.com>
930
931 * bindgen.adb (Gen_Adainit_C): Remove.
932 (Gen_Adafinal_C): Ditto.
933 (Gen_Elab_Externals_C): Ditto.
934 (Gen_Elab_Calls_C): Ditto.
935 (Gen_Elab_Order_C): Ditto.
936 (Gen_Elab_Defs_C): Ditto.
937 (Gen_Finalize_Library_C): Ditto.
938 (Gen_Finalize_Library_Defs_C): Ditto.
939 (Gen_Main_C): Ditto.
940 (Gen_Output_File_C): Ditto.
941 (Gen_Restrictions_C): Ditto.
942 (Gen_Versions_C): Ditto.
943 (Write_Info_Ada_C): Ditto.
944 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
945 (Gen_Output_File): Do not force Ada_Bind_File anymore.
946 Always call Gen_Output_File_Ada.
947 * gnatlink.adb (Begin_Info): Now a constant.
948 (End_Info): Ditto.
949 (Ada_Bind_File): Remove
950 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
951 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
952 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
953 * opt.ads (Ada_Bind_File): Remove.
954
9552011-08-04 Thomas Quinot <quinot@adacore.com>
956
957 * projects.texi: Document target-specific directory in default project
958 path for gnatmake.
959
9602011-08-04 Thomas Quinot <quinot@adacore.com>
961
962 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
963 path in all cases .
964
24558db8
AC
9652011-08-04 Yannick Moy <moy@adacore.com>
966
967 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
968 opt.ads, lib-xref.ads: Code clean up.
969
9702011-08-04 Yannick Moy <moy@adacore.com>
971
972 * gnat_rm.texi: Update description of Test_Case
973 * gnat_ugn.texi: Typo.
974
9752011-08-04 Ed Falis <falis@adacore.com>
976
977 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
978
9792011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
980
981 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
982 it is of type Root_Controlled. This action eliminates fields Prev and
983 Next from type equality.
984
9852011-08-04 Yannick Moy <moy@adacore.com>
986
987 * lib-xref-alfa.adb: Correct typo.
988
9892011-08-04 Matthew Heaney <heaney@adacore.com>
990
991 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
992 component.
993
1f9939b5
AC
9942011-08-04 Yannick Moy <moy@adacore.com>
995
996 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
997 (Analyze_Pragma): allow static string expression for name of Test_Case,
998 instead of simply string literals.
999 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
1000 expressions.
1001
10022011-08-04 Vincent Celier <celier@adacore.com>
1003
1004 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
1005 case suffixes to find truncated main sources.
1006
10072011-08-04 Tristan Gingold <gingold@adacore.com>
1008
1009 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
1010 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
1011 (Compute_Current_Task): Ditto.
1012
10132011-08-04 Tristan Gingold <gingold@adacore.com>
1014
1015 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
1016
10172011-08-04 Yannick Moy <moy@adacore.com>
1018
1019 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
1020 library-level constant.
1021 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
1022 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
1023 used as selector of parameter association, in ALFA mode.
1024
15d8a51d
AC
10252011-08-04 Robert Dewar <dewar@adacore.com>
1026
1027 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
1028 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
1029 reformatting.
1030
10312011-08-04 Arnaud Charlet <charlet@adacore.com>
1032
1033 * make.adb (Linking_Phase): Set source search path before calling
1034 gnatlink in CodePeer mode.
1035
f46faa08
AC
10362011-08-04 Javier Miranda <miranda@adacore.com>
1037
1038 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
1039 Remove code which takes care of building TSDs.
1040 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
1041 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
1042 the accessibility check in VM targets.
1043 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
1044 (Building_Static_DT): Now returns false for VM targets.
1045 (Build_VM_TSDs): Removed.
1046 (Expand_Interface_Conversion): Generate missing runtime check for
1047 conversions to interface types whose target type is unknown at compile
1048 time.
1049 (Make_VM_TSD): Add missing code to disable the generation of calls to
1050 Check_TSD if the tagged type is not defined at library level, or not
1051 has a representation clause specifying its external tag, or -gnatdQ is
1052 active.
1053 * exp_disp.ads (Build_VM_TSDs): Removed.
1054 (Make_VM_TSDs): Spec relocated from exp_disp.adb
1055 * sem_disp.adb (Check_Dispatching_Operation): No code required to
1056 register primitives in the dispatch tables in VM targets.
1057 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
1058 initialization of class-wide interface objects in VM targets.
1059 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
1060 of Make_DT).
1061
10622011-08-04 Jerome Lambourg <lambourg@adacore.com>
1063
1064 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
1065 when dotnet-ld cannot be found.
1066
10672011-08-04 Arnaud Charlet <charlet@adacore.com>
1068
1069 * bindgen.adb: Simplify significantly generation of binder body file in
1070 CodePeer mode.
1071 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
1072 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
1073 not expanded).
1074
2ba7e31e
AC
10752011-08-04 Yannick Moy <moy@adacore.com>
1076
1077 * sem_prag.adb, sem.ads: Code cleanup.
1078
10792011-08-04 Tristan Gingold <gingold@adacore.com>
1080
1081 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
1082 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
1083 results if possible.
1084 * s-stusta.adb (Print): Adjust after changes in s-stausa.
1085 * gnat_ugn.texi: Update dynamic stack usage section.
1086
10872011-08-04 Steve Baird <baird@adacore.com>
1088
1089 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
1090 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
1091 contains only a call to the user-defined main subprogram.
1092 (Gen_Main_Ada) - If CodePeer_Mode is set, then
1093 call the "wrapper" subprogram instead of directly
1094 calling the user-defined main subprogram.
1095
10962011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1097
1098 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
1099 alternatives of a case statement for controlled objects. Rename local
1100 variable A to Dead_Alt.
1101 (Expand_N_If_Statement): Check the then and else statements of an if
1102 statement for controlled objects. Check the then statements of all
1103 elsif parts of an if statement for controlled objects.
1104 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
1105 objects.
1106 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
1107 detects a loop associated with the expansion of an array object.
1108 Augment the processing of the loop statements to account for a possible
1109 wrap done by Process_Statements_For_Controlled_Objects.
1110 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
1111 statements and abortable part of an asynchronous select for controlled
1112 objects.
1113 (Expand_N_Conditional_Entry_Call): Check the else statements of a
1114 conditional entry call for controlled objects.
1115 (Expand_N_Selective_Accept): Check the alternatives of a selective
1116 accept for controlled objects.
1117 (Expand_N_Timed_Entry_Call): Check the entry call and delay
1118 alternatives of a timed entry call for controlled objects.
1119 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
1120 exception handler for controlled objects.
1121 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1122 Add formal parameter Nested_Constructs along with its associated
1123 comment.
1124 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
1125 Requires_Cleanup_Actions.
1126 (Process_Statements_For_Controlled_Objects): New routine.
1127 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
1128 routine. Inspect a node which contains a non-handled sequence of
1129 statements for controlled objects. If such an object is found, the
1130 statements are wrapped in a block.
1131
1bf773bb
AC
11322011-08-04 Bob Duff <duff@adacore.com>
1133
1134 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
1135 need to compare with Class_Wide_Type (T2), in order to get at the
1136 original class-wide type node.
1137 * sem_type.ads (Covers): Improve the comment.
1138 * einfo.ads (Class_Wide_Type): Improve the comment.
1139 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
1140 the type of the Deref.
1141
11422011-08-04 Yannick Moy <moy@adacore.com>
1143
1144 * gnat_rm.texi: Document that Test_Case pragma can only appear on
1145 separate declarations.
1146 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
1147 check identifier of pragma argument.
1148 (Chain_TC): check that no other test case associated to the same entity
1149 share the same name.
1150 (Check_Test_Case): disallow test case inside subprogram body
1151 (Analyze_Pragma): correct call to check identifier and not argument
1152 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
1153 function gets name from test case pragma.
1154
dac3bede
YM
11552011-08-04 Yannick Moy <moy@adacore.com>
1156
1157 * gnat_rm.texi: Document new pragma and aspect.
1158 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
1159 (No_Duplicates_Allowed): new constant array defining whether duplicates
1160 aspects of each kind can appear on the same declaration.
1161 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
1162 field, which points to a node holding the previous Spec_PPC_List.
1163 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
1164 through the indirection with Contract.
1165 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
1166 * par-prag.adb (Prag): do nothing on Test_Case pragma
1167 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
1168 be called directly.
1169 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
1170 component Ensures of Test_Case.
1171 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
1172 (Analyze_Generic_Subprogram_Declaration,
1173 Analyze_Subprogram_Instantiation,
1174 Analyze_Abstract_Subprogram_Declaration,
1175 Analyze_Subprogram_Body_Helper,
1176 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
1177 insert contract in subprogram node at point of definition
1178 * sem_ch13.adb
1179 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
1180 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
1181 corresponding pragma
1182 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
1183 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
1184 similar to the analysis of pre/post
1185 (Derive_Subprogram): insert contract in subprogram node at point of
1186 derivation.
1187 * sem_prag.adb, sem_prag.ads
1188 (Check_Arg_Is_String_Literal, Check_Identifier):
1189 new checking procedures to be called in treatment of pragmas
1190 (Check_Test_Case): new procedure to check that a Test_Case aspect or
1191 pragma is well-formed. This does not check currently that 'Result is
1192 used only in the Ensures component of a Test_Case.
1193 (Analyze_Pragma): add case for Test_Case
1194 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
1195 components of a Test_Case.
1196 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
1197 expressions in the 3rd (and 4th if present) arguments of a Test_Case
1198 pragma, treated as spec expressions.
1199 (Sig_Flags): add value -1 for Test_Case.
1200 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
1201 Get_Requires_From_Test_Case_Pragma): getters for both expression
1202 components of a Test_Case.
1203 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
1204 indirection between an entry or [generic] subprogram entity and its
1205 pre/post + test-cases.
1206 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
1207 get/set for fields of an N_Contract node.
1208 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
1209 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
1210 names and pragma for Test_Case.
1211 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
1212
6a2e5d0f
AC
12132011-08-04 Vincent Celier <celier@adacore.com>
1214
1215 * gnat_ugn.texi: Improve documentation of gnatmake switch
1216 --source-info-file=.
1217
12182011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1219
1220 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
1221 type). Initialize Atyp to the appropriate type which is later checked
1222 for completion. Rewrite the assertion associated with private type
1223 completion.
1224
12252011-08-04 Ed Falis <falis@adacore.com>
1226
1227 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
1228 initialize the number of CPUs.
1229
12302011-08-04 Ed Schonberg <schonberg@adacore.com>
1231
1232 * sem_type.adb (Disambiguate): New subsidiary routine
1233 In_Same_Declaration_List, to implement AI05-0020: a user-defined
1234 equality on an anonymous access type whose designated type is private
1235 does not lead to an ambiguity with the universal access equality
1236 operator in the body or child units of the defining package. The same
1237 is true for a multiplication operator on a private type completed with
1238 a fixed-point-type.
1239
12402011-08-04 Javier Miranda <miranda@adacore.com>
1241
1242 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
1243 (Normalize_Scalars_Config): Removed.
1244 * opt.adb
1245 (Register_Opt_Config_Switches): Remove registering config values of
1246 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
1247 (Restore_Opt_Config_Switches): Remove code which restores the values of
1248 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1249 Init_Or_Norm_Scalars.
1250 (Save_Opt_Config_Switches): Remove code which saves values of
1251 Init_Or_Norm_Scalars and Normalize_Scalars.
1252 (Set_Opt_Config_Switches): Remove code which restores config values of
1253 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1254 Init_Or_Norm_Scalars.
1255
12562011-08-04 Yannick Moy <moy@adacore.com>
1257
1258 * frontend.adb (Frontend): remove previous patch to avoid full
1259 qualification in ALFA mode.
1260 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
1261 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
1262 unique name for an entity, which could be used to identify the entity
1263 across compilation units.
1264
12652011-08-04 Thomas Quinot <quinot@adacore.com>
1266
1267 * prj-env.adb
1268 (Initialize_Default_Project_Path): Add target specific directory
1269 ($prefix/$target/lib/gnat) in front of project path in all cases
1270 (making gnatmake's behaviour consistent with gprbuild).
1271 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
1272 Pass target name from Sdefault to project subsystem.
1273 * gnatls.adb: Show new target specific default project directory.
1274
12752011-08-04 Johannes Kanig <kanig@adacore.com>
1276
1277 * cstand.adb: Add Information to Identifier in Standard
1278 (Identifer_For): Set Entity to the corresponding entity
1279
483361a6
AC
12802011-08-04 Sergey Rybin <rybin@adacore.com>
1281
1282 * gnat_ugn.texi: Update doc on gnatcheck.
1283
12842011-08-04 Yannick Moy <moy@adacore.com>
1285
1286 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
1287 xrefs in a scope.
1288
12892011-08-04 Yannick Moy <moy@adacore.com>
1290
1291 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
1292 performing expansion.
1293 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
1294 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
1295 it is not called in ALFA mode.
1296
ef5569c6
AC
12972011-08-04 Emmanuel Briot <briot@adacore.com>
1298
1299 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
1300 after all, so removed.
1301
13022011-08-04 Sergey Rybin <rybin@adacore.com>
1303
1304 * vms_data.ads: Add missing VMS qualifiers.
1305
1ab4a286
EB
13062011-08-04 Emmanuel Briot <briot@adacore.com>
1307
1308 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
1309 the list of files on the command line after processing it through
1310 Complete_Mains.
1311
7ae0d98c
AC
13122011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1313
1314 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
1315 processing for .NET/JVM. These targets can now benefit from
1316 Raise_From_Controlled_Operation and they share the same processing with
1317 standard targets.
1318 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
1319 These targets need transient scopes in order to properly finalize short
1320 lived controlled objects.
1321 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
1322 NET/JVM. These targets can now benefit from
1323 Raise_From_Controlled_Operation and they share the same processing with
1324 standard targets.
1325
13262011-08-04 Geert Bosch <bosch@adacore.com>
1327
1328 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1329
13302011-08-04 Ed Schonberg <schonberg@adacore.com>
1331
1332 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1333 Expand_Record_Aggregate, to determine whether aggregate must be
1334 expanded into assignments. This is the case if the ancestor part is
1335 private, regarless of the setting of the flag Has_Private_Ancestor.
1336
13372011-08-04 Ed Falis <falis@adacore.com>
1338
1339 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
1340
13412011-08-04 Bob Duff <duff@adacore.com>
1342
1343 * sinfo.ads: Fix comment.
1344
13452011-08-04 Steve Baird <baird@adacore.com>
1346
1347 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
1348 choose a package name in much the same way as is
1349 done for JGNAT when VM_Target /= No_VM, except that
1350 a slightly more distinctive prefix string is used.
1351
13522011-08-04 Emmanuel Briot <briot@adacore.com>
1353
1354 * makeutl.adb (Complete_Mains): no longer accept unit names on the
1355 gnatmake command line.
1356 This behavior was never documented (and was supported only because of
1357 an early bug in the code). This case might lead to ambiguous cases
1358 (between unit names and truncated base names without suffixes).
1359
87729e5a
AC
13602011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1361
1362 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
1363 Remove the external tag of a tagged type from the internal hash table.
1364 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
1365 expanded usage of the routine. Strenghten the check for Is_Master. Add
1366 processing for tagged types.
1367 (Build_Finalizer): Create all the necessary lists used in finalizer
1368 creation when the processed context is a package that may contain
1369 tagged types.
1370 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
1371 Requires_Cleanup_Actions.
1372 (Expand_N_Package_Body): Package bodies may need clean up code
1373 depending on whether they contain tagged types.
1374 (Expand_N_Package_Declaration): Package declarations may need clean up
1375 code depending on whether they contain tagged types.
1376 (Unregister_Tagged_Types): New routine. Search through a list of
1377 declarations or statements, looking for non-abstract Ada tagged types.
1378 For each such type, generate code to unregister the external tag.
1379 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
1380 Requires_Cleanup_Actions.
1381 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
1382 through a list of declarations or statements looking for non-abstract
1383 Ada tagged types or controlled objects.
1384 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
1385 Requires_Cleanup_Actions.
1386 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
1387 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
1388 RE_Unit_Table.
1389
13902011-08-04 Vincent Celier <celier@adacore.com>
1391
1392 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
1393 has Ada sources, not project Project, because if the root project
1394 Project has no sources of its own, all projects will be deemed without
1395 sources.
1396
13972011-08-04 Gary Dismukes <dismukes@adacore.com>
1398
1399 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
1400 of the No_Param_Proc acc-to-subp type used for initialization of
1401 __gnat_finalize_library_objects so that it's declared at library level
1402 rather than nested inside of the adainit routine.
1403
14042011-08-04 Javier Miranda <miranda@adacore.com>
1405
1406 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
1407 if the tagged type has a representation clause which specifies its
1408 external tag.
1409
14102011-08-04 Ed Schonberg <schonberg@adacore.com>
1411
1412 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
1413 Remove previous procedure with that name.
1414 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
1415 when appropriate.
1416 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
1417 subtype mark, the ancestor cannot have unknown discriminants.
1418 (Resolve_Record_Aggregate): if the type has invisible components
1419 because of a private ancestor, the aggregate is illegal.
1420
14212011-08-04 Vincent Celier <celier@adacore.com>
1422
1423 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
1424 account switches -gnat2005, -gnat12 and -gnat2012.
1425
14262011-08-04 Bob Duff <duff@adacore.com>
1427
1428 * s-tasdeb.ads: Minor comment fix.
1429
14302011-08-04 Arnaud Charlet <charlet@adacore.com>
1431
1432 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
1433 CodePeer mode.
1434 * switch.ads, switch.adb (Is_Language_Switch): New function.
1435
14362011-08-04 Vincent Celier <celier@adacore.com>
1437
1438 * switch-c.adb: Minor comment addition.
1439
14402011-08-04 Vincent Celier <celier@adacore.com>
1441
1442 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
1443 ending with '=' is followed by a space (missing file name).
1444
14452011-08-04 Pascal Obry <obry@adacore.com>
1446
1447 * g-regist.ads: Fix size of HKEY on x86_64-windows.
1448
14492011-08-04 Ed Schonberg <schonberg@adacore.com>
1450
1451 * sem_ch12.adb (Analyze_Associations): New routine
1452 Check_Overloaded_Formal_Subprogram to reject a formal package when
1453 there is a named association or a box initialisation for an overloaded
1454 formal subprogram of the corresponding generic.
1455
14562011-08-04 Yannick Moy <moy@adacore.com>
1457
1458 * alfa.ads (ALFA_Xref_Record): add component for type of entity
1459 * get_alfa.adb, put_alfa.adb: Read and write new component of
1460 cross-reference.
1461 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
1462
88f47280
AC
14632011-08-04 Pascal Obry <obry@adacore.com>
1464
1465 * urealp.adb: Minor reformatting.
1466
14672011-08-04 Tristan Gingold <gingold@adacore.com>
1468
1469 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
1470 Handle the case when Cleanup_Protected_Object returns Empty.
1471
14722011-08-04 Yannick Moy <moy@adacore.com>
1473
1474 * frontend.adb (Frontend): only qualify names in non-ALFA mode
1475
14762011-08-04 Ed Schonberg <schonberg@adacore.com>
1477
1478 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
1479 call, ignore functions.
1480
05c53a69
GB
14812011-08-04 Geert Bosch <bosch@adacore.com>
1482
1483 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
1484 point.
1485
23cc1ace
EB
14862011-08-04 Emmanuel Briot <briot@adacore.com>
1487
1488 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
1489 as an index for Builder'Switches. This conforms to the documentation.
1490 * make.adb (Insert_Project_Sources): avoid duplicate code
1491
cef14201
AC
14922011-08-04 Emmanuel Briot <briot@adacore.com>
1493
1494 * makeutl.adb (Complete_Mains): if the user has passed a relative file
1495 name on the command line (for instance "../dummy"), never assume it can
1496 be a unit name.
1497
14982011-08-04 Tristan Gingold <gingold@adacore.com>
1499
1500 * bindgen.adb: Remove code the reference or create the
1501 Break_Start/__gnat_break_start procedure.
1502 * s-stalib.adb (Break_Start): Removed.
1503
e2fee30d
EB
15042011-08-04 Emmanuel Briot <briot@adacore.com>
1505
1506 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
1507 shared with gprbuild.
1508
2d395256
AC
15092011-08-04 Yannick Moy <moy@adacore.com>
1510
1511 * par-ch4.adb (P_Primary): preferentially issue an error message about
1512 a missing parenthesis arount a conditional or case expression in Ada
1513 2012 mode, if we detect that the alignment is not correct for a
1514 statement.
1515
15162011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1517
1518 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1519 tag-to-class-wide conversion as needing finalization actions.
1520 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1521 a tag-to-class-wide conversion as needing finalization actions.
1522 (Is_Finalizable_Transient): The result of a tag-to-class-wide
1523 conversion does not need finalization actions.
1524 (Is_Tag_To_CW_Conversion): New routine.
1525 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1526 whether an object is the result of a tag-to-class-wide conversion.
1527
15282011-08-04 Yannick Moy <moy@adacore.com>
1529
1530 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1531 the left-hand-side and right-hand-side of a conjunct are inserted when
1532 translating a pre- or postcondition
1533 * sem_ch6.adb: Correct typo in comment
1534
15352011-08-04 Ed Schonberg <schonberg@adacore.com>
1536
1537 * gnat_rm.texi: Ravenscar does not prohibit dependence on
1538 Unchecked_Conversion and Unchecked_Deallocation.
1539
15402011-08-04 Thomas Quinot <quinot@adacore.com>
1541
1542 * make.adb: Minor reformatting.
1543
767ab2fd
EB
15442011-08-04 Emmanuel Briot <briot@adacore.com>
1545
1546 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1547 sources in the project and its imported projects, but not in the whole
1548 tree.
1549
8fb3f5df
AC
15502011-08-04 Emmanuel Briot <briot@adacore.com>
1551
1552 * make.adb: Remove debug trace.
1553
15542011-08-04 Vincent Celier <celier@adacore.com>
1555
1556 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
1557 path in canonical form, to be able to compare path names on platforms
1558 such as Windows or Darwin.
1559
15602011-08-04 Thomas Quinot <quinot@adacore.com>
1561
1562 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
1563 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
1564 * scos.ads: Update documentation accordingly.
1565 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
1566 pragmas.
1567
9515740f
AC
15682011-08-04 Ed Schonberg <schonberg@adacore.com>
1569
1570 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
1571 attribute only if prefix type is scalar.
1572
15732011-08-04 Emmanuel Briot <briot@adacore.com>
1574
1575 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
1576 in gnatmake for specifying mains on the command line that do not belong
1577 to the main project. These mains must currently all belong to the same
1578 project, though.
1579 (Ultimate_Extension_Of): removed, since duplicated
1580 Ultimate_Extending_Project.
1581
92966893
AC
15822011-08-04 Arnaud Charlet <charlet@adacore.com>
1583
1584 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
1585 instead.
1586 (CodePeer_Mode_String): New.
1587 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
1588 CodePeer mode.
1589 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
1590 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
1591 mode, since no useful elaboration subprogram is needed by CodePeer.
1592 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
1593 In this mode, compile binder file with -gnatC and do stop after this
1594 step.
1595
15962011-08-04 Vincent Celier <celier@adacore.com>
1597
1598 * exp_ch7.adb: Minor comment fix.
1599
5969611f
RD
16002011-08-04 Robert Dewar <dewar@adacore.com>
1601
1602 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
1603 exp_ch4.adb, makeutl.adb: Minor reformatting.
1604
6367dd30
AC
16052011-08-04 Emmanuel Briot <briot@adacore.com>
1606
1607 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
1608 Create several new subprograms to move code out of Make. This makes the
1609 code more readable, removes code duplication, and is a preparation work
1610 for adding support for aggregate projects.
1611
16122011-08-04 Tristan Gingold <gingold@adacore.com>
1613
1614 * s-po32gl.ads, s-po32gl.adb: New files.
1615 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
1616 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
1617 (Build_Finalization_Collection): Use it.
1618 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
1619 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
1620 literals.
1621 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
1622 * gcc-interface/Make-lang.in: Update dependencies.
1623
cd8bfe35
EB
16242011-08-04 Emmanuel Briot <briot@adacore.com>
1625
1626 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
1627 the command line.
1628
7db29ea7
EB
16292011-08-04 Emmanuel Briot <briot@adacore.com>
1630
1631 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
1632 command line is not a file name, also check whether it could be a unit
1633 name.
1634
d9b056ea
AC
16352011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1636
1637 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
1638 the header of the finalization routine.
1639 If the unit has no finalizer but is a body whose spec has one, then
1640 generate the decrement of the elaboration entity only.
1641 If the unit has a finalizer and is a spec, then do not generate the
1642 decrement of the elaboration entity.
1643 (Gen_Finalize_Library_C): Likewise.
1644
16452011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1646
1647 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
1648 (Bounds_Size_Expression): Removed.
1649 (Double_Alignment_Of): New subsidiary routine.
1650 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
1651 for a hole in the dope vector of unconstrained arrays due to different
1652 index and element alignments.
1653
16542011-08-04 Ed Schonberg <schonberg@adacore.com>
1655
1656 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
1657 raise program_error because body has not been seen yet.
1658
16592011-08-04 Ed Schonberg <schonberg@adacore.com>
1660
1661 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
1662 an unresolved name.
1663
16642011-08-04 Vincent Celier <celier@adacore.com>
1665
1666 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
1667
16682011-08-04 Yannick Moy <moy@adacore.com>
1669
1670 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
1671 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
1672
16732011-08-04 Thomas Quinot <quinot@adacore.com>
1674
1675 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
1676 instantiation in RCI.
1677
16782011-08-04 Emmanuel Briot <briot@adacore.com>
1679
1680 * make.adb: Share more code with gprbuild
1681
f5fc5b9d
AC
16822011-08-04 Emmanuel Briot <briot@adacore.com>
1683
1684 * projects.texi: Added documentation for the IDE'Gnat project file
1685 attribute.
1686
16872011-08-04 Nicolas Roche <roche@adacore.com>
1688
1689 * gnat_rm.texi: Minor editing.
1690
16912011-08-04 Javier Miranda <miranda@adacore.com>
1692
1693 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
1694 and the library case for VM targets.
1695 (Gen_Adainit_Ada): Likewise.
1696
16972011-08-04 Robert Dewar <dewar@adacore.com>
1698
1699 * g-altive.ads: Minor comment updates.
1700 * prj-nmsc.adb: Minor reformatting.
1701
17022011-08-04 Javier Miranda <miranda@adacore.com>
1703
1704 * opt.ads
1705 (Normalize_Scalars_Config): Value of the configuration switch set by
1706 pragma Normalize_Scalars when it appears in the gnat.adc file.
1707 (Normalize_Scalars): New field for record Config_Switches_Type. Used
1708 to save and restore settings of this pragma.
1709 * opt.adb
1710 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
1711 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
1712
17132011-08-04 Vincent Celier <celier@adacore.com>
1714
1715 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
1716
0c4683cf
AC
17172011-08-04 Arnaud Charlet <charlet@adacore.com>
1718
1719 * makeutl.adb: Minor reformatting.
1720
17212011-08-04 Olivier Hainque <hainque@adacore.com>
1722
1723 * g-altive.ads: Update comments to reflect that only the soft
1724 binding is available today.
1725
2598ee6d
RD
17262011-08-04 Robert Dewar <dewar@adacore.com>
1727
1728 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
1729 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
1730 * gcc-interface/Make-lang.in: Update dependencies.
1731
c2db4b32
AC
17322011-08-04 Arnaud Charlet <charlet@adacore.com>
1733
1734 * prj-env.adb: Remove local debug traces.
1735
17362011-08-04 Yannick Moy <moy@adacore.com>
1737
1738 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
1739 was used instead of Hi_OK, which could cause a read of an uninitialized
1740 value later on. Detected while working on the new warning.
1741 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
1742 to local variable.
1743 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
1744 in more cases, in order to detect more unreferenced values.
1745 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
1746 object for expression, if any.
1747
17482011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1749
1750 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
1751 the operand types instead of the Esize.
1752
17532011-08-04 Steve Baird <baird@adacore.com>
1754
1755 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
1756 enable CodePeer_Mode.
1757 * bindusg.adb (Display): Add help message describing -P binder switch.
1758 * gnat_ugn.texi: Document -P binder switch.
1759 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
1760 user-defined main program directly.
1761 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
1762 user-defined main program in the context clause of the package body.
1763
ad05f2e9
AC
17642011-08-04 Yannick Moy <moy@adacore.com>
1765
1766 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
1767 duplicate of Defining_Entity
1768 (Get_Unique_Entity_For_Decl): rename function into
1769 Unique_Defining_Entity
1770 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
1771 (Formal_Proof_On): remove synthesized flag
1772 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1773 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
1774 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
1775 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
1776 Annotate (Formal_Proof)
1777
17782011-08-04 Emmanuel Briot <briot@adacore.com>
1779
1780 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
1781 source files with non-standard naming schemes, in imported projects
1782
756ef2a0
AC
17832011-08-04 Emmanuel Briot <briot@adacore.com>
1784
1785 * makeutl.adb (Complete_Mains): when a multi-unit source file is
1786 specified on the gprbuild command line, we need to compile all units
1787 within that file, not just the first one we find
1788 Fix error message for mains that are not found.
1789
17902011-08-04 Thomas Quinot <quinot@adacore.com>
1791
1792 * sem_ch6.adb: Update comment.
1793 * sem_ch12.adb: Minor reformatting.
1794
17952011-08-04 Bob Duff <duff@adacore.com>
1796
1797 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
1798 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
1799 race condition whose symptom is to fail to lock Parent. That, in turn,
1800 causes Parent.Awake_Count to be accessed without locking Parent, which
1801 causes another race condition whose symptom is that Parent.Awake_Count
1802 can be off by 1 (either too high or too low). The solution is to lock
1803 Parent unconditionally, and then lock Acceptor, before reading
1804 Acceptor.Terminate_Alternative.
1805
4fdebd93
AC
18062011-08-04 Arnaud Charlet <charlet@adacore.com>
1807
1808 * debug.adb: Update comment.
1809
18102011-08-04 Robert Dewar <dewar@adacore.com>
1811
1812 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
1813 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
1814 exp_ch6.adb: Minor reformatting.
1815
18162011-08-04 Gary Dismukes <dismukes@adacore.com>
1817
1818 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
1819 checks for -gnateE.
1820
18212011-08-04 Ed Schonberg <schonberg@adacore.com>
1822
1823 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
1824
18252011-08-04 Thomas Quinot <quinot@adacore.com>
1826
1827 * sinfo.ads: Minor reformatting.
1828
18292011-08-04 Emmanuel Briot <briot@adacore.com>
1830
1831 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
1832 even if there is no location.
1833
6aaa0587
ES
18342011-08-04 Ed Schonberg <schonberg@adacore.com>
1835
1836 * sem_res.adb, sem_ch4.adb: move check for restriction
1837 No_Task_Hierarchy to resolve_allocator.
1838
35a1c212
AC
18392011-08-04 Thomas Quinot <quinot@adacore.com>
1840
1841 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
1842 This flag of N_Pragma nodes is not used, remove it as well as all of
1843 the associated circuitry.
1844
18452011-08-04 Javier Miranda <miranda@adacore.com>
1846
1847 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
1848 runtime check on duplicated externa tags
1849 * debug.adb Document switch -gnatdQ.
1850
18512011-08-04 Gary Dismukes <dismukes@adacore.com>
1852
1853 * a-fihema.ads: Minor typo fix.
1854
18552011-08-04 Yannick Moy <moy@adacore.com>
1856
1857 * sem_ch10.adb: Minor comment update.
1858
18592011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1860
1861 * einfo.adb: Update the node field usage to reflect the renaming of
1862 Return_Flag to Return_ Flag_Or_Transient_Decl.
1863 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
1864 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
1865 (Write_Field15_Name): Change Return_Flag to
1866 Return_Flag_Or_Transient_Decl.
1867 * einfo.ads: Rename node field Return_Flag to
1868 Return_Flag_Or_Transient_Decl. Update the associated comment and all
1869 occurrences in entities.
1870 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
1871 associated Inline pragma.
1872 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
1873 associated Inline pragma.
1874 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
1875 routine.
1876 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
1877 Return_Flag and Set_Return_Flag.
1878 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
1879 objects generated for controlled transients declared inside an
1880 Exception_With_Actions. Update the calls to Return_Flag.
1881 (Process_Object_Declaration): Add code to add a null guard for hook
1882 objects generated for controlled transients declared inside an
1883 Exception_With_Actions. Update related comment.
1884 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
1885 objects generated for controlled transients declared inside an
1886 Exception_With_Actions. Update the calls to Return_Flag.
1887 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
1888
18892011-08-04 Ed Schonberg <schonberg@adacore.com>
1890
1891 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
1892 positional aggregate.
1893
18942011-08-04 Vincent Celier <celier@adacore.com>
1895
1896 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
1897 SLOC only for pragmas.
1898
18992011-08-04 Emmanuel Briot <briot@adacore.com>
1900
1901 * projects.texi: Minor typo fix.
1902
19032011-08-04 Emmanuel Briot <briot@adacore.com>
1904
1905 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
1906 on case-sensitive file systems.
1907
c2873f74
TQ
19082011-08-04 Thomas Quinot <quinot@adacore.com>
1909
1910 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
1911 nested in a disabled pragma.
1912 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
1913 enclosing pragma, if any, for X decisions.
1914
19152011-08-04 Thomas Quinot <quinot@adacore.com>
1916
1917 * sem_prag.adb: Minor reformatting.
1918
46414266
VC
19192011-08-04 Vincent Celier <celier@adacore.com>
1920
1921 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
1922 allowed in no run time mode.
1923
19242011-08-04 Vincent Celier <celier@adacore.com>
1925
1926 * make.adb (Check): When -gnatc is used, check for the source file
1927 inside the ALI file with a canonical case file name.
1928
afab164f
EB
19292011-08-04 Emmanuel Briot <briot@adacore.com>
1930
1931 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
1932 overriding the separator.
1933
fe0ec02f
AC
19342011-08-04 Robert Dewar <dewar@adacore.com>
1935
1936 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
1937 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
1938
19392011-08-04 Robert Dewar <dewar@adacore.com>
1940
1941 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
1942
19432011-08-04 Yannick Moy <moy@adacore.com>
1944
1945 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
1946 'Result only appears in postcondition of function.
1947
19482011-08-04 Thomas Quinot <quinot@adacore.com>
1949
1950 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
1951 external tag, include the value of the external tag in the exception
1952 message.
1953
0180fd26
AC
19542011-08-04 Yannick Moy <moy@adacore.com>
1955
1956 * sem_attr.adb (Result): modify error message for misplaced 'Result
1957
19582011-08-04 Sergey Rybin <rybin@adacore.com>
1959
1960 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
1961 clear that the second argument must be an identifier.
1962
19632011-08-04 Thomas Quinot <quinot@adacore.com>
1964
1965 * exp_ch9.adb (Build_Barrier_Function): When compiling with
1966 -fpreserve-control-flow, insert an IF statement on the barrier
1967 condition to ensure that a conditional branch instruction is generated.
1968
19692011-08-04 Emmanuel Briot <briot@adacore.com>
1970
1971 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
1972 (Processing_Flags.Ignore_Missing_With): new flag.
1973
19742011-08-04 Emmanuel Briot <briot@adacore.com>
1975
1976 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
1977 Source_List_File on case-insensitive systems where the file is actually
1978 on a case-sensitive file system (NFS,...).
1979
19802011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1981
1982 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
1983 function return contains a controlled [extension] aggregate and the
1984 return statement is not part of a handled sequence of statements, wrap
1985 the return in a block. This ensures that all controlled temporaries
1986 generated during aggregate resolution will be picked up by the
1987 finalization machinery.
1988
19892011-08-04 Ed Schonberg <schonberg@adacore.com>
1990
1991 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
1992 components, freeze type before resolution, to ensure that default
1993 initializations are present for all components.
1994 * sem_res.adb (Resolve_Actuals): the designated object of an
1995 accces-to-constant type is a legal actual in a call to an
1996 initialization procedure.
1997
19982011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1999
2000 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
2001 N_Unchecked_Type_Conversion to the possible containers of a renamed
2002 transient variable.
2003
78efd712
AC
20042011-08-04 Yannick Moy <moy@adacore.com>
2005
2006 * par-ch13.adb (Aspect_Specifications_Present): recognize
2007 "with Identifier'Class =>" as an aspect, so that a meaningful warning
2008 is issued in Strict mode.
2009 * par.adb: Fix typos in comments.
2010
20112011-08-04 Yannick Moy <moy@adacore.com>
2012
2013 * sem_attr.adb (Result): modify error message to take into account Post
2014 aspect when compiling Ada 2012 (or newer) code.
2015
20162011-08-04 Nicolas Roche <roche@adacore.com>
2017
2018 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2c7f9cc0 2019 remove need for GCC exceptions.
78efd712
AC
2020
20212011-08-04 Vincent Celier <celier@adacore.com>
2022
2023 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
2024 project, not the source file name.
2025 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
2026 excluded, continue looking. This excluded source will only be returned
2027 if there is no other source with the same base name that is not locally
2028 removed.
2029
20302011-08-04 Ed Schonberg <schonberg@adacore.com>
2031
2032 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
2033 private and one of the operands is a real literal, use a qualified
2034 expression rather than a conversion which is not meaningful to the
2035 back-end.
2036
0170a691
AC
20372011-08-04 Yannick Moy <moy@adacore.com>
2038
2039 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
2040 corresponding aspect X'Class are allowed, proceed with analysis of the
2041 aspect instead of skipping it.
2042
20432011-08-04 Tristan Gingold <gingold@adacore.com>
2044
2045 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
2046 This will allow to have an Ada implementation for the subprogram.
2047
deb4f5ba
ES
20482011-08-04 Ed Schonberg <schonberg@adacore.com>
2049
2050 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
2051 completion and aspects are present, apply them to the entity for the
2052 type which is currently the partial view, but which is the one that
2053 will be frozen.
2054 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
2055 applies to a partial view, indicate that the full view has predicates
2056 and delayed aspects.
2057 (Replace_Type_Reference): Handle properly predicates that apply to the
2058 full view of a private completion.
2059
fc893455
AC
20602011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2061
2062 * layout.adb (Layout_Type): For composite types, do not set Esize.
2063 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
2064 set Esize.
2065 (Size_Known): Look at the RM size of components instead of the Esize.
2066 (Freeze_Record_Type): Look at the RM size instead of the Esize to
2067 issue warning and activate Implicit_Packing.
2068 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
2069 if the Esize is not known.
2070 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
2071 for elementary types only.
2072 (Analyze_Record_Representation_Clause): Look at the RM size instead
2073 of the Esize to issue errors.
2074 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
2075 is not known.
2076 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
2c7f9cc0 2077 obsolete block.
fc893455
AC
2078 Look at the RM size instead of the Esize for types if the latter is
2079 not known.
2080 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
2081
20822011-08-04 Ed Schonberg <schonberg@adacore.com>
2083
2084 * sem_type.adb: proper handling of equality not involving anonymous
2085 access types.
2086
b37d5bc6
AC
20872011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2088
2089 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
2090 Vis_Decls. When creating a library-level finalizer for a package spec,
2091 both the declaration and body of the finalizer are inserted either in
2092 the visible or private declarations of the package spec.
2093
20942011-08-04 Javier Miranda <miranda@adacore.com>
2095
2096 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
2097 use of the full-view of a type when invoking Is_Ancestor.
2098 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
2099 the full-view of private parents is requested, then use also the
2100 full-view of the parent of the first derivation.
2101
7ab4d95a
AC
21022011-08-04 Tristan Gingold <gingold@adacore.com>
2103
2104 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
2105 instead of the locally imported procedure.
2106 * s-taprop-mingw.adb (Enter_Task): Ditto.
2107 * s-valrea.adb (Scan_Real): Ditto.
2108 * s-imgrea.adb (Set_Image_Real): Ditto.
2109 * s-flocon.ads: Make the package pure.
2110
21112011-08-04 Thomas Quinot <quinot@adacore.com>
2112
2113 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
2114 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
2115 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
2116 New subprogram, moved here from...
2117 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
2118 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
2119 rewriting of the last argument into a procedure call statement here...
2120 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
2121 instead.
2122
21232011-08-04 Thomas Quinot <quinot@adacore.com>
2124
2125 * par_sco.adb: Minor reformatting.
2126
51c400f5
AC
21272011-08-04 Robert Dewar <dewar@adacore.com>
2128
2129 * erroutc.adb: Minor reformatting.
2130
21312011-08-04 Thomas Quinot <quinot@adacore.com>
2132
2133 * par_sco.adb: Comment update.
2134
21352011-08-04 Tristan Gingold <gingold@adacore.com>
2136
2137 * s-flocon.ads: New file.
2138 * g-flocon.ads: Now a renaming of s-flocon.
2139 * Makefile.rtl: Add s-flocon.o
2140
6a49f110
AC
21412011-08-04 Javier Miranda <miranda@adacore.com>
2142
2143 * exp_strm.adb (Build_Array_Input_Function): if the array type is
2144 constrained, do not attempt to build a subtype of it.
2145
21462011-08-04 Yannick Moy <moy@adacore.com>
2147
2148 * errout.ads Change comments: remove 'R'M as an example where quotes
2149 are needed; add ALFA as another case where quotes are not needed
2150 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
2151 case where quotes are not needed.
2152 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2153 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
2154 Remove all occurrences of 'A'L'F'A
2155
21562011-08-04 Ed Schonberg <schonberg@adacore.com>
2157
2158 * sem_ch13.adb: check legality of invariant pragma.
2159
a4640a39
AC
21602011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2161
2162 * bindgen.adb: Add comments.
2163
21642011-08-04 Yannick Moy <moy@adacore.com>
2165
2166 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
2167 synthesized flag.
2168 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
2169 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
2170
21712011-08-04 Robert Dewar <dewar@adacore.com>
2172
2173 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
2174 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
2175 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
2176
39ade2f9
AC
21772011-08-04 Thomas Quinot <quinot@adacore.com>
2178
2179 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
2180
21812011-08-04 Thomas Quinot <quinot@adacore.com>
2182
2183 PR ada/47880
2184 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
2185 allocated object.
2186
21872011-08-04 Robert Dewar <dewar@adacore.com>
2188
2189 * einfo.ads, exp_ch4.adb: Minor reformatting.
2190
21912011-08-04 Jerome Lambourg <lambourg@adacore.com>
2192
2193 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
2194
7efc3f2d
AC
21952011-08-04 Ed Schonberg <schonberg@adacore.com>
2196
2197 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
2198 type in all cases to compute list of primitive operations, because full
2199 view may be an itype that is not attached to the list of declarations.
2200
22012011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2202
2203 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
2204 library has already been finalized.
2205 (Gen_Adafinal_C): Likewise.
2206 (Gen_Adainit_Ada): Generate an early return if the library has
2207 already been elaborated.
2208 (Gen_Adainit_C): Likewise.
2209 (Gen_Output_File_Ada): Generate an elaboration flag.
2210 (Gen_Output_File_C): Likewise.
2211
f65df609
HK
22122011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2213
2214 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
2215 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
2216 built in the first place.
2217 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
2218 for CodePeer because Finalize_Address was not built to begin with.
2219 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
2220
a0fb8fe8
AC
22212011-08-04 Pascal Obry <obry@adacore.com>
2222
2223 * adaint.c (__gnat_tmp_name): Use current process id to create temp
2224 filenames, this ensures unicity of filenames across processes.
2225
22262011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2227
2228 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
2229 Raise_Controlled to Raise_From_Controlled_Operation. Update the
2230 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
2231 Add False as the actual to From_Abort in the generated call to
2232 Raise_From_Controlled_Operation.
2233
22342011-08-04 Jerome Lambourg <lambourg@adacore.com>
2235
2236 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
2237 so that the ali file name can be retrieved from outside of this package.
2238 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
2239 doing nothing in the general case, but used to update the object file
2240 timestamp if directly generated by the backend.
2241 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
2242 to a later time than the ali file one.
2243
9534ab17
AC
22442011-08-04 Yannick Moy <moy@adacore.com>
2245
2246 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
2247 entities whose body contains an Annotate pragma which forces formal
2248 proof on this body.
2249 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2250 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
2251 Mark_Non_ALFA_Subprogram to pass in a message and node.
2252 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
2253 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
2254 surrounding subprogram.
2255 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
2256 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
2257 as not in ALFA is annotated with Formal_Proof being On, then an error
2258 is issued based on the additional parameters for message and node.
2259 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
2260 * gcc-interface/Make-lang.in: Update dependencies.
2261
22622011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2263
2264 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
2265 Finalize_Address when CodePeer is enabled.
2266
22672011-08-04 Pascal Obry <obry@adacore.com>
2268
2269 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
2270 the latter returns a pointer to a static buffer which is deallocated
2271 at the end of the routine.
2272
5c0e97dd
AC
22732011-08-04 Yannick Moy <moy@adacore.com>
2274
2275 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
2276 after index creation; mark unconstrained base array type generated as
2277 being in/not in ALFA as well
2278 (Make_Index): mark subtype created as in/not in ALFA
2279 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
2280 over a loop as in/not in ALFA, depending on its type and form of loop
2281 iteration.
2282
22832011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2284
2285 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
2286 directly to False on .NET and JVM.
2287
7a93c64b
YM
22882011-08-04 Yannick Moy <moy@adacore.com>
2289
2290 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
2291 constraint that subtype must come from source code to be in ALFA, so
2292 that anonymous subtypes can be in ALFA too.
2293
e9a1ed9b
YM
22942011-08-04 Yannick Moy <moy@adacore.com>
2295
2296 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
2297 reference for ALFA mode.
2298 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
2299 procedure public so as to use it from formal verification back-end.
2300
8e293fbd
AC
23012011-08-04 Jerome Lambourg <lambourg@adacore.com>
2302
2303 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
2304 invalid checks of the Parameter, making Remove_Switch not working
2305 correctly.
2306
23072011-08-04 Arnaud Charlet <charlet@adacore.com>
2308
2309 * targparm.ads: Update header: no run-time exception is needed on this
2310 file.
2311
23122011-08-04 Vincent Celier <celier@adacore.com>
2313
2314 * a-fihema.adb: Use System.IO instead of GNAT.IO
2315
23162011-08-04 Thomas Quinot <quinot@adacore.com>
2317
2318 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
2319 are forbidden in Compiler_Unit mode.
2320
cfae2bed
AC
23212011-08-04 Robert Dewar <dewar@adacore.com>
2322
2323 * sem_util.adb: Minor reformatting.
2324
23252011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2326
2327 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2328 library-level finalizers.
2329 (Gen_Finalize_Library_C): Update the import string for library-level
2330 finalizers.
2331 (Gen_Finalize_Library_Defs_C): Update the definition name of a
2332 library-level finalizer.
2333 * exp_ch7.adb: Remove with and use clauses for Stringt.
2334 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
2335 Spec_Decl. Add local variable Body_Id. The names of library-level
2336 finalizers are now manually fully qualified and are no longer external.
2337 A single name is now capable of servicing .NET, JVM and non-VM targets.
2338 Pragma Export is no longer required to provide visibility for the name.
2339 (Create_Finalizer_String): Removed.
2340 (New_Finalizer_Name): New routine which mimics New_..._Name.
2341
01f0729a
AC
23422011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2343
2344 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
2345 elaboration counter to Standard_Short_Integer.
2346 * sem_util.adb (Build_Elaboration_Entity): Likewise.
2347 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
2348 (Gen_Elab_Externals_C): Likewise.
2349
23502011-08-04 Ed Falis <falis@adacore.com>
2351
2352 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2353 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2354 system-vxworks-mips.ads, system-vxworks-x86.ads
2355 (Always_Compatible_Rep): set to False for all VxWorks targets.
2356
2c1b72d7
AC
23572011-08-04 Robert Dewar <dewar@adacore.com>
2358
2359 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
2360 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
2361 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
2362 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
2363 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
2364 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
2365 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
2366 Minor reformatting and code reorganization.
2367
23682011-08-04 Emmanuel Briot <briot@adacore.com>
2369
2370 * projects.texi: Added doc for aggregate projects.
2371
824e9320
AC
23722011-08-04 Emmanuel Briot <briot@adacore.com>
2373
2374 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
2375 Add support for overriding the Project_Path in aggregate projects.
2376
23772011-08-04 Robert Dewar <dewar@adacore.com>
2378
2379 * a-cofove.ads: Minor reformatting.
2380
23812011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2382
2383 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
2384 on the generated code.
2385 (Build_Finalize_Statements): Update the comment on the generated code.
2386 (Build_Initialize_Statements): Update the comment on the generated code.
2387 (Build_Object_Declarations): Add local variable Result. The object
2388 declarations are now built in sequence.
2389 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
2390 RE_Unit_Table.
2391
23922011-08-04 Robert Dewar <dewar@adacore.com>
2393
2394 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
2395
23962011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2397
2398 * einfo.ads (Elaboration_Entity): Document new definition and use.
2399 (Elaboration_Entity_Required): Adjust to above change.
2400 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
2401 * exp_ch12.adb: And with and use for Snames.
2402 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
2403 * exp_util.adb (Set_Elaboration_Flag): Likewise.
2404 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
2405 <Check_Unit_Name>: Deal with N_Expanded_Name.
2406 <Attribute_Elaborated>: Extend to all unit names.
2407 * sem_elab.adb: And with and use for Uintp.
2408 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
2409 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
2410 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
2411 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
2412 from Gen_Adainit_Ada.
2413 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
2414 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
2415 case, do not call System.Standard_Library.Adafinal; instead call
2416 finalize_library if needed.
2417 (Gen_Adafinal_C): Likewise.
2418 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
2419 non-main program case.
2420 (Gen_Adainit_C): Generate a couple of external declarations here.
2421 In the main program case, set SSL.Finalize_Library_Objects.
2422 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
2423 (Gen_Elab_Calls_C): Likewise.
2424 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
2425 (Gen_Finalize_Library_C): Likewise. Generate a full function.
2426 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
2427 objects here.
2428 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
2429 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
2430 Gen_Adafinal_Ada.
2431 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
2432 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2c7f9cc0 2433 of external declarations. Call Gen_Finalize_Library_C.
824e9320 2434
316d9d4f
EB
24352011-08-04 Emmanuel Briot <briot@adacore.com>
2436
2437 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
2438 Compute_Compilation_Phases): new subprogram.
2439 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
2440 The number of mains as well as the various compilation phases that
2441 need to be run are now project tree specific, since various
2442 aggregated trees might have different requirements. In particular,
2443 they do not all require bind or link phases.
2444
9434c32e
EB
24452011-08-04 Emmanuel Briot <briot@adacore.com>
2446
2447 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
2448 (Project_Tree_Appdata): New type.
2449 It is now possible to associate application-specific data to a project
2450 tree. In particular, this is used in the gprbuild builder to avoid a
2451 number of global tables and htables, especially now that there can be
2452 several project trees loaded at once because of aggregate projects.
2453 (Debug_Name): new procedure.
2454 * projects.texi: Clarify syntax of "**" for Source_Dirs
2455
41ba34db
EB
24562011-08-03 Emmanuel Briot <briot@adacore.com>
2457
2458 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
2459 the "roots" for a main.
2460 (Fill_From_Project): add support for aggregate projects. Main units
2461 in aggregated projects are now automatically added in the list of
2462 files to build (although this fails later on in gprbuild, because
2463 these files are not using the root proejct tree, so this needs
2464 further cleanup)
2465 * gcc-interface/Make-lang.in: Update dependencies.
2466
fccd42a9
AC
24672011-08-03 Yannick Moy <moy@adacore.com>
2468
2469 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
2470 conditional expression in ALFA.
2471 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
2472 expressions as not in ALFA.
2473
24742011-08-03 Robert Dewar <dewar@adacore.com>
2475
2476 * a-cofove.adb: Minor reformatting.
2477
24782011-08-03 Emmanuel Briot <briot@adacore.com>
2479
2480 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
2481 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
2482 gprbuild sources.
2483 These packages are more logically placed in the Queue package, since
2484 they manipulate the queue. It is also likely that they can be adapted
2485 for gnatmake, thus sharing more code.
2486 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
2487 that we could move the above.
2488
24892011-08-03 Emmanuel Briot <briot@adacore.com>
2490
2491 * errutil.adb (Finalize): clean up the list of error messages on exit.
2492 Calling this subprogram multiple times will no longer show duplicate
2493 error messages on stderr.
2494
24952011-08-03 Emmanuel Briot <briot@adacore.com>
2496
2497 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
2498 Getopt_Switches when we have already define a command line
2499 configuration.
2500
5e8c8e44
YM
25012011-08-03 Yannick Moy <moy@adacore.com>
2502
2503 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
2504 in ALFA. Instead, they are considered as assertions to prove.
2505 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
2506 nodes as not in ALFA. Instead, include conditional expressions in ALFA
2507 if they have no ELSE part, or if they occur in pre- and postconditions,
2508 where the Condition cannot have side-effects in ALFA
2509 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
2510 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2511 Instead, include type conversion between scalar types in ALFA.
2512 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2513 if-and-only-if its type is in ALFA.
2514
5ffe0bab
AC
25152011-08-03 Thomas Quinot <quinot@adacore.com>
2516
2517 * scos.adb, get_scos.adb, put_scos.adb
2518 New code letter for decisions: G (entry guard)
2519 * par_sco.adb
2520 (Traverse_Subprogram_Body): Rename to...
2521 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2522 (Traverse_Protected_Body): New subprogram
2523 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2524 protected bodies and entry bodies.
2525
25262011-08-03 Yannick Moy <moy@adacore.com>
2527
2528 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2529 entities with get/set subprograms, which is set on procedure entities
2530 generated by the compiler for a postcondition.
2531 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2532 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2533 entity for a declaration
2534 (Get_Unique_Entity_For_Decl): new function returning an entity which
2535 represents a declaration, so that matching spec and body have the same
2536 entity.
2537
25382011-08-03 Robert Dewar <dewar@adacore.com>
2539
2540 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2541 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2542
25432011-08-03 Yannick Moy <moy@adacore.com>
2544
2545 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2546 library-level because retriction No_Implicit_Dynamic_Code in the
2547 front-end prevents its definition as a local subprogram
2548 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2549 for reuse in other contexts
2550 (Traverse_Declarations_Or_Statements,
2551 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2552 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2553 procedures take a callback parameter to be called on all declarations
2554 * lib-xref.ads
2555 (Traverse_All_Compilation_Units): new generic function to traverse a
2556 compilation unit and call a callback parameter on all declarations
2557
f9ad6b62
AC
25582011-08-03 Javier Miranda <miranda@adacore.com>
2559
2560 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
2561 in Java since they are always enclosed in a namespace that
2562 differentiates them, and overloaded entities are supported by the VM.
2563
25642011-08-03 Ed Schonberg <schonberg@adacore.com>
2565
2566 * checks.adb (Determine_Range): If a computed bound of an operation is
2567 outside the range of the base type of the expression, and overflow
2568 checks are enabled, the result is unknown and cannot be used for any
2569 subsequent constant folding.
2570 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
2571 unknown, so is the result of the comparison.
2572
25732011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2574
2575 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
2576 From_Abort. When finalization was triggered by an abort, propagate
2577 Standard'Abort_Signal rather than Program_Error.
2578 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
2579 From_Abort.
2580 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
2581 From_Abort. When finalization was triggered by an abort, propagate
2582 Standard'Abort_Signal rather than Program_Error.
2583 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
2584 From_Abort.
2585 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
2586 Abort_Id. Update the calls to Build_Object_Declarations and
2587 Build_Raise_Statement to include Abort_Id.
2588 (Build_Adjust_Statements): New local variable Abort_Id. Update the
2589 calls to Build_Object_Declarations and Build_Raise_Statement to include
2590 Abort_Id.
2591 (Build_Finalize_Statements): New local variable Abort_Id. Update the
2592 calls to Build_Object_Declarations and Build_Raise_Statement to include
2593 Abort_Id.
2594 (Build_Components): Create an entity for Abort_Id when exceptions are
2595 allowed on the target.
2596 (Build_Finalizer): New local variable Abort_Id.
2597 (Build_Initialize_Statements): New local variable Abort_Id. Update the
2598 calls to Build_Object_Declarations and Build_Raise_Statement to include
2599 Abort_Id.
2600 (Build_Object_Declarations): Add new formal Abort_Id. Create the
2601 declaration of flag Abort_Id to preserve the original abort status
2602 before finalization code is executed.
2603 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
2604 runtime routine Raise_From_Controlled_Operation.
2605 (Create_Finalizer): Update the call to Build_Raise_Statement to include
2606 Abort_Id. Update the call to Build_Object_Declarations to include
2607 Abort_Id. Update the layout of the finalizer body.
2608 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
2609 (Process_Transient_Objects): New local variable Abort_Id. Remove the
2610 clunky code to create all flags and objects related to
2611 exception propagation and replace it with a call to
2612 Build_Object_Declarations. Update the call to Build_Raise_Statement to
2613 include Abort_Id.
2614 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
2615 Add new formal Abort_Id and associated comment on its use.
2616 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
2617 on its use.
2618 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
2619 Remove the clunky code to create all flags and objects related to
2620 exception propagation and replace it with a call to
2621 Build_Object_Declarations. Update the call to Build_Raise_Statement.
2622
26232011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2624
2625 * s-tassta.adb: Fix minor typos.
2626
26272011-08-03 Robert Dewar <dewar@adacore.com>
2628
2629 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
2630 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
2631
1cdfa9be
AC
26322011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2633
2634 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
2635 to packages. This ensures that the finalizer body will not end up
2636 inside the freeze node.
2637 (Process_Declarations): Add code to detect whether a freeze node has a
2638 nested finalization collection.
2639
26402011-08-03 Pascal Obry <obry@adacore.com>
2641
2642 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
2643 (Current_Session): Return a not null access to Session_Type.
2644 (Default_Session): Likewise.
2645
243cae0a
AC
26462011-08-03 Robert Dewar <dewar@adacore.com>
2647
2648 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
2649 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
2650
26512011-08-03 Pascal Obry <obry@adacore.com>
2652
2653 * g-awk.ads: Minor comment fix.
2654
26552011-08-03 Sergey Rybin <rybin@adacore.com>
2656
2657 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2658 the tree structure related to discriminant constraints.
2659 Original_Discriminant cannot be used any more for computing the
2660 defining name for the reference to a discriminant.
2661
26622011-08-03 Ed Schonberg <schonberg@adacore.com>
2663
2664 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
2665 function is not visibly tagged, this is not a dispatching call and
2666 therfore is not Tag_Indeterminate, even if the function is marked as
2667 dispatching on result.
2668
f553e7bc
AC
26692011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2670
2671 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
2672 (Expand_N_Free_Statement): Add a guard to protect against run-times
2673 which do not support controlled types.
2674 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
2675 against run-times which do not support controlled types.
2676 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
2677 against run-times which do not support controlled types.
2678 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
2679 against run-times which do not support controlled types.
2680 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
2681 protect against run-times which do not support controlled types.
2682
26832011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2684
2685 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
2686 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
2687
e4982b64
AC
26882011-08-03 Ed Schonberg <schonberg@adacore.com>
2689
2690 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
2691 modified in the source, to prevent spurious warnings when compiling
2692 with -gnatg.
2693
26942011-08-03 Thomas Quinot <quinot@adacore.com>
2695
2696 * a-except-2005.adb: Minor reformatting.
2697
26982011-08-03 Ed Schonberg <schonberg@adacore.com>
2699
2700 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
2701 is a renaming declaration in the private part of a package, do not emit
2702 a warning that the with_clause could be moved because the renaming may
2703 be used in the body or in a child unit.
2704
27052011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2706
2707 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2708 Propagate the Comes_From_Source attribute from the original return
2709 object to the renaming.
2710
27112011-08-03 Jose Ruiz <ruiz@adacore.com>
2712
2713 * exp_ch7.adb (Build_Raise_Statement): Do not call
2714 Raise_From_Controlled_Operation when this routine is not present in
2715 the run-time library.
2716 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
2717 libraries (Ravenscar), tasks are non-terminating, and protected objects
2718 and tasks can only appear at library level, so we do not want
2719 finalization of protected objects nor tasks.
2720 * exp_intr.adb: Minor clarification in comment.
2721 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
2722 Gen_Output_File_C): Remove references to finalization of library-level
2723 objects when using restricted run-time libraries.
2724
27252011-08-03 Ed Schonberg <schonberg@adacore.com>
2726
2727 * sem_ch3.adb (Build_Discriminant_Constraints): Set
2728 Original_Discriminant only if the parent type is a generic formal.
2729
deb8dacc
HK
27302011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2731
2732 * exp_ch13.adb: Add with and use clause for Targparm;
2733 (Expand_N_Free_Statement): Prevent the generation of a custom
2734 Deallocate on .NET/JVM targets since this requires pools and address
2735 arithmetic.
2736 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
2737 .NET/JVM targets, attach the newly allocated object to the access
2738 type's finalization collection. Do not generate a call to
2739 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
2740 exist in the runtime.
2741 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
2742 create a custom Allocate for object that do not require initialization.
2743 Attach a newly allocated object to the access type's finalization
2744 collection on .NET/JVM.
2745 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
2746 assignment of controlled types on .NET/JVM. The two hidden pointers
2747 Prev and Next and stored and later restored after the assignment takes
2748 place.
2749 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
2750 kludge for .NET/JVM to recognize a particular piece of code coming from
2751 Heap_Management and change the call to Finalize into Deep_Finalize.
2752 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
2753 finalization collections on .NET/JVM only for types derived from
2754 Controlled. Separate the association of storage pools with a collection
2755 and only allow it on non-.NET/JVM targets.
2756 (Make_Attach_Call): New routine.
2757 (Make_Detach_Call): New routine.
2758 (Process_Object_Declarations): Suppress the generation of
2759 build-in-place return object clean up code on .NET/JVM since it uses
2760 pools.
2761 * exp_ch7.ads (Make_Attach_Call): New routine.
2762 (Make_Detach_Call): New routine.
2763 * exp_intr.adb Add with and use clause for Targparm.
2764 (Expand_Unc_Deallocation): Detach a controlled object from a collection
2765 on .NET/JVM targets.
2766 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
2767 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
2768 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
2769 names used in finalization.
2770
27712011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2772
2773 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
2774 (Attach, Detach): Lock the current task when chaining an object onto a
2775 collection.
2776
df3e68b1
HK
27772011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2778
2779 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
2780 Rewritten to create the message strings when the exception is not
2781 raised by an abort during finalization.
2782 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
2783 Raise_From_Controlled_Operation and update its associated comment.
2784 * a-fihema.ads, a-fihema.adb: New GNAT unit.
2785 Ada.Finalization.Heap_Management provides key functionality
2786 associated with controlled objects on the heap, their creation,
2787 finalization and reclamation. Type Finalization_Collection is
2788 effectively a wrapper which sits ontop of a storage pool and performs
2789 all necessary bookkeeping for all the objects it contains. Each
2790 access-to-controlled or access-to-class-wide type receives a collection
2791 as part of its expansion. The compiler generates buffer code and
2792 invokes Allocate / Deallocate to create and destroy allocated
2793 controlled objects.
2794 * a-finali.adb ("="): Removed.
2795 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
2796 fields Prev and Next.
2797 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
2798 A library unit with at least one controlled object on the library level
2799 has a special finalizer which is invoked by the binder. To signal this,
2800 ali files carry field PF.
2801 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
2802 associated comment on field usage.
2803 * a-tags.adb (Get_RC_Offset): Removed.
2804 (Needs_Finalization): New routine.
2805 * a-tags.ads: Update the structure of the GNAT dispatch tables.
2806 Dispatch tables now carry field Needs_Finalization which provides
2807 runtime indication whether a type is controlled or has controlled
2808 components or both. Remove field RC_Offset.
2809 (Get_RC_Offset): Removed along with its associated pragma Export.
2810 Since tagged types with controlled components no longer carry hidden
2811 field _controller, the special mechanism to retrieve its location is no
2812 longer needed.
2813 (Needs_Finalization): New routine.
2814 * atree.ads, atree.adb (Elist24): New routine.
2815 (Set_Elist24): New routine.
2816 * atree.h: Add a define clause for Elist24.
2817 * bindgen.adb New library-level variable Lib_Final_Built.
2818 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
2819 presence of a VM target, the routine generates calls to the proper
2820 library finalization routine.
2821 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
2822 targets. Set the correct library finalization routine depending on
2823 whether the library has controlled objects or this is a VM compilation.
2824 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
2825 to library-level finalizers of compiled units in reverse order of
2826 elaboration. It also produces exception management code and reraises a
2827 potential exception after all units have been finalized.
2828 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
2829 library-level finalizers of compiled units in reverse order of
2830 elaboration.
2831 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
2832 definitions of all library-level finalizers available to the compilation
2833 (Gen_Main_Ada): Directly call Adafinal which now contails all target
2834 dependent code.
2835 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
2836 System.Standard_Library.Adafinal directly. If the library needs
2837 finalization actions, create the sequence of finalization calls.
2838 (Gen_Output_File_Ada): Alphabetize local variables and constants.
2839 Generate a with clause for System.Soft_Links when compiling for a VM.
2840 Remove the code which imports System.Standard_Library.Adafinal as
2841 Do_Finalize. Generate the library finalization routine.
2842 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
2843 If the library needs finalization actions, create all the definitions
2844 of library- level finalizers.
2845 (Has_Finalizer): New routine. Determines whether at least one compiled
2846 unit has a library-level finalizer.
2847 Add type Qualification_Mode.
2848 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
2849 * einfo.adb: New usage of field 15 as Return_Flag.
2850 Remove Finalization_Chain_Entity from the usages of field 19.
2851 Remove Associated_Final_Chain from the usages of field 23.
2852 New usage of field 23 as Associated_Collection.
2853 New usage of field 24 as Finalizer.
2854 New usage of flag 252 as Is_Processed_Transient.
2855 (Associated_Final_Chain): Removed.
2856 (Associated_Collection): New routine.
2857 (Finalization_Chain_Entity): Removed.
2858 (Finalizer): New routine.
2859 (Is_Finalizer): New routine.
2860 (Is_Processed_Transient): New routine.
2861 (Return_Flag): New routine.
2862 (Set_Associated_Final_Chain): Removed.
2863 (Set_Associated_Collection): New routine.
2864 (Set_Finalization_Chain_Entity): Removed.
2865 (Set_Finalizer): New routine.
2866 (Set_Is_Processed_Transient): New routine.
2867 (Set_Return_Flag): New routine.
2868 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
2869 displayed flags.
2870 (Write_Field8_Name): Alphabetize the output.
2871 (Write_Field11_Name): Alphabetize the output.
2872 (Write_Field12_Name): Alphabetize the output.
2873 (Write_Field13_Name): Alphabetize the output.
2874 (Write_Field14_Name): Alphabetize the output.
2875 (Write_Field15_Name): Alphabetize the output.
2876 (Write_Field16_Name): Alphabetize the output.
2877 (Write_Field17_Name): Alphabetize the output.
2878 (Write_Field18_Name): Alphabetize the output.
2879 (Write_Field19_Name): Alphabetize the output. Remove the output of
2880 Finalization_Chain_Entity.
2881 (Write_Field20_Name): Alphabetize the output.
2882 (Write_Field21_Name): Alphabetize the output.
2883 (Write_Field22_Name): Alphabetize the output.
2884 (Write_Field23_Name): Alphabetize the output. Remove the output of
2885 Associated_Final_Chain. Add output for Associated_Collection.
2886 (Write_Field24_Name): Alphabetize the output.
2887 (Write_Field25_Name): Add output for Finalizer.
2888 (Write_Field26_Name): Alphabetize the output.
2889 (Write_Field27_Name): Alphabetize the output.
2890 (Write_Field28_Name): Alphabetize the output.
2891 * einfo.ads: Add new field description for Associated_Collection and
2892 its uses in nodes.
2893 Remove Associated_Final_Chain and its uses in nodes.
2894 Remove Finalization_Chain_Entity and its uses in nodes.
2895 Add new field description for Finalizer and its uses in nodes.
2896 Add new synthesized attribute Is_Finalizer.
2897 Add new flag description for Is_Processed_Transient and its uses in
2898 nodes.
2899 Add new field description for Return_Flag and its uses in nodes.
2900 (Associated_Final_Chain): Removed along with its pragma Inline.
2901 (Associated_Collection): New routine and pragma Inline.
2902 (Finalization_Chain_Entity): Removed along with its pragma Inline.
2903 (Finalizer): New routine and pragma Inline.
2904 (Is_Finalizer): New routine and pragma Inline.
2905 (Is_Processed_Transient): New routine and pragma Inline.
2906 (Return_Flag): New routine and pragma Inline.
2907 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
2908 (Set_Associated_Collection): New routine and pragma Inline.
2909 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
2910 (Set_Finalizer): New routine and pragma Inline.
2911 (Set_Is_Processed_Transient): New routine and pragma Inline.
2912 (Set_Return_Flag): New routine and pragma Inline.
2913 * exp_aggr.adb: Alphabetize subprograms.
2914 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
2915 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
2916 associated comments. Remove local variables External_Final_List and
2917 Attach.
2918 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
2919 Ancestor. Remove the retrieval of finalization lists. Update the call to
2920 Make_Adjust_Call.
2921 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
2922 lists. Update the call to Late_Expansion.
2923 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
2924 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
2925 (Gen_Assign): Remove the retrieval of the finalization list used to
2926 build the assignment. Update the calls to Make_Init_Call and
2927 Make_Adjust_Call.
2928 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
2929 Remove the mechanism to determine attachment levels and finalization
2930 list retrieval. Remove the processing for coextensions.
2931 (Init_Controller): Removed. Controllers no longer exist.
2932 (Late_Expansion): Remove formals Flist and Obj along with their
2933 associated comments. Update the calls to Build_Record_Aggr_Code and
2934 Build_Array_Aggr_Code.
2935 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
2936 (Expand_N_Freeze_Entity): Add special processing for finalizers which
2937 appear in entry bodies, protected subprograms and task bodies.
2938 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
2939 * exp_ch3.adb (Add_Final_Chain): Removed.
2940 (Build_Array_Init_Proc): Alphabetize local variables.
2941 (Build_Assignment): Alphabetize local variables. Update the call to
2942 Maked_Adjust_Call.
2943 (Build_Class_Wide_Master): Rename local variables to better reflect
2944 their role.
2945 (Build_Discriminant_Assignments): Code reformatting.
2946 (Build_Init_Call_Thru): Code reformatting.
2947 (Build_Init_Procedure): Code reformatting. Generate a special version
2948 of Deep_Finalize which is capable of finalizing all initialized
2949 components and ignore the rest.
2950 (Build_Init_Statements): Rename local variables to better reflect their
2951 role.
2952 Reimplement the mechanism to include the creation and update of an index
2953 variable called a "counter". It is used as a bookmark for tracing
2954 initialized and non-initialized components.
2955 (Build_Initialization_Call): Remove local variable Controller_Typ.
2956 Alphabetize all local variables. Remove the initialization of the
2957 record controller and update the call to Make_Init_Call.
2958 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
2959 New local variable Counter.
2960 (Constrain_Array): Alphabetize.
2961 (Expand_Freeze_Array_Type): Create a collection instead of a
2962 finalization list.
2963 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
2964 Finalize_Address which is used in conjunction with allocated controlled
2965 objects.
2966 (Expand_N_Object_Declaration): Remove the creation of a finalization
2967 list for anonymous access types. Update the calls to Make_Init_Call and
2968 Make_Adjust_Call.
2969 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
2970 retrieval of finalization lists. Remove the expansion of the record
2971 controller. Create TSS primitive Finalize_Address used in conjunction
2972 with controlled objects on the heap. Create finalization collections
2973 for access-to-controlled record components.
2974 (Expand_Record_Controller): Removed.
2975 (Freeze_Type): Remove the freezing of record controllers. Freezing of
2976 class-wide types now requires additional processing. Create
2977 finalization collections for access-to-controlled types.
2978 (Increment_Counter): New routine.
2979 (Make_Counter): New routine.
2980 (Make_Eq_If): Remove the mention of Name_uController.
2981 (Make_Predefined_Primitive_Specs): There is no longer need to skip
2982 types coming from System.Finalization_Root.
2983 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
2984 (Predefined_Primitive_Bodies): There is no longer need to skip types
2985 coming from System.Finalization_Root.
2986 (Stream_Operation_OK): Do not generate stream routines for
2987 type Ada.Finalization.Heap_Management.Finalization_Collection.
2988 * exp_ch3.ads: Alphabetize subprograms.
2989 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
2990 Add with and use clause for Lib.
2991 (Complete_Coextension_Finalization): Removed.
2992 (Complete_Controlled_Allocation): New routine. Create a finalization
2993 collection for anonymous access-to-controlled types. Create a custom
2994 Allocate which interfaces with the back end and the machinery in
2995 Heap_Management.
2996 (Expand_Allocator_Expression): Add necessary calls to
2997 Complete_Controlled_Allocation. Remove the retrieval of finalization
2998 lists. Update the calls to Make_Adjust_Call. Generate a call to
2999 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3000 the associated collection.
3001 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
3002 Code clean up. Remove the retrieval of finalization lists and
3003 attachment levels.
3004 Update the call to Make_Init_Call. Generate a call to
3005 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3006 the associated collection.
3007 (Get_Allocator_Final_List): Removed. Finalization lists are not
3008 available.
3009 (Suitable_Element): Remove the mention of Name_uController.
3010 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
3011 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
3012 the left hand side, carry out the assignment and adjust the left hand
3013 side.
3014 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
3015 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
3016 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
3017 BIP_Collection and BIPcollection.
3018 (Build_Heap_Allocator): New routine used to allocate the return object
3019 of a build-in-place function onto a collection.
3020 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
3021 (Expand_Call): Do not replace direct calls to Deep routines with their
3022 aliases.
3023 (Expand_N_Extended_Return_Statement): Give all variables shorter names
3024 and update their occurrences. Add a special return flag to monitor the
3025 [ab]normal execution of the function. The flag is set right before the
3026 return statement.
3027 Rewrite the mechanism used to allocate a build-in-place return object
3028 on the heap or on a storage pool.
3029 (Is_Direct_Deep_Call): New routine.
3030 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
3031 build-in-place function call instead of a final list. Build a call to
3032 Set_Finalize_Address_Ptr to decorate the associated collection.
3033 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
3034 order to name the build-in-place function call's result for later
3035 finalization. Add a collection to a build-in-place function call
3036 instead of a final list.
3037 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
3038 build-in-place function call instead of a final list. Remove the code
3039 which moves one final list and transforms it into the actual in a
3040 nested build-in-place call.
3041 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
3042 build-in-place function call instead of a final list.
3043 (Move_Final_List): Removed.
3044 (Needs_BIP_Collection): New routine.
3045 (Needs_BIP_Final_List): Removed.
3046 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
3047 enumeration type BIP_Formal_Kind.
3048 Update the related comment.
3049 (Needs_BIP_Collection): New routine.
3050 (Needs_BIP_Final_List): Removed.
3051 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
3052 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
3053 majority of subprograms in this unit. Add Name_Finalize_Address to
3054 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
3055 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
3056 statements for an array type.
3057 (Build_Adjust_Statements): Create the adjust statements for a record
3058 type.
3059 (Build_Cleanup_Statements): New routine. A procedure which given any
3060 construct containing asynchronous calls, references to _master, or is a
3061 task body, a task allocation or a protected body produces the necessary
3062 runtime calls to clean up these constructs.
3063 (Build_Exception_Handler): New routine.
3064 (Build_Final_List): Removed.
3065 (Build_Finalization_Collection): New routine. A core procedure which
3066 creates a collection to service heap allocated controlled objects
3067 associated with an access-to-controlled type.
3068 (Build_Finalize_Statements): Create the finalization statements for a
3069 record types.
3070 (Build_Finalizer): New routine. A core procedure which given any
3071 construct with declarations and/or statements detects all objects which
3072 need any type of clean up (controlled objects, protected objects) and
3073 generates all necessary code to clean up the said objects in the proper
3074 order.
3075 (Build_Finalizer_Call): New routine.
3076 (Build_Initialize_Statements): Create the initialization statements for
3077 an array type. The generated routine contains code to finalize partially
3078 initialized arrays.
3079 (Build_Object_Declarations): New routine.
3080 (Build_Raise_Statement): New routine.
3081 (Clean_Simple_Protected_Objects): Removed.
3082 (Controller_Component): Removed.
3083 (Enclosing_Function): New routine.
3084 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
3085 either declarations or statements or both.
3086 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
3087 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
3088 package.
3089 (Find_Final_List): Removed.
3090 (Global_Flist_Ref): Removed.
3091 (In_Finalization_Root): Removed.
3092 (Insert_Actions_In_Scope_Around): Determine the range of the transient
3093 scope in terms of tree nodes. Process all transient variables within
3094 that range.
3095 (Make_Adjust_Call): Rewritten. There is no longer an attach call
3096 generated after the adjust.
3097 (Make_Attach_Call): Removed.
3098 (Make_Call): New routine.
3099 (Make_Clean): Removed.
3100 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
3101 build routines.
3102 (Make_Deep_Proc): Rewritten to generate the new profile signature used
3103 in Deep routines.
3104 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
3105 build routines.
3106 (Make_Final_Call): Modified to simply create a call to either
3107 Deep_Finalize or Finalize.
3108 (Make_Finalize_Address_Body): New routine.
3109 (Make_Finalize_Address_Stmts): New routine. A function which produces
3110 TSS primitive Finalize_Address used in conjunction with heap allocated
3111 controlled objects.
3112 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
3113 (Make_Init_Call): Rewritten. There is no longer an attach call
3114 generated after initialization.
3115 (Make_Local_Deep_Finalize): New routine.
3116 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3117 (Make_Transient_Block): Remove the finalization list retrieval and
3118 manipulation.
3119 (Needs_Finalization): Moved to Exp_Util.
3120 (Parent_Field_Type): New routine.
3121 (Preprocess_Components): New routine.
3122 (Process_Transient_Objects): New routine.
3123 (Wrap_HSS_In_Block): New routine.
3124 (Wrap_Transient_Declaration): Remove finalization list management and
3125 controller insertion.
3126 (Wrap_Transient_Expression): Code reformatting.
3127 (Wrap_Transient_Statement): Code reformatting.
3128 * exp_ch7.ads (Build_Final_List): Removed.
3129 (Build_Finalization_Collection): New routine.
3130 (Build_Raise_Statement): New routine.
3131 (Controller_Component): Removed.
3132 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
3133 (Find_Final_List): Removed.
3134 (In_Finalization_Root): Removed.
3135 (Is_Simple_Protected_Type): Update related comment.
3136 (Make_Adjust_Call): New parameter profile and associated comments.
3137 (Make_Attach_Call): Removed.
3138 (Make_Final_Call): New parameter profile and associated comments.
3139 (Make_Finalize_Address_Body): New routine.
3140 (Make_Init_Call): New parameter profile and associated comments.
3141 (Make_Local_Deep_Finalize): New routine.
3142 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3143 (Needs_Finalization): Moved to Exp_Util.
3144 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
3145 (Expand_N_Protected_Body): Remove the handling of finalization lists.
3146 (Find_Protection_Type): Moved to Exp_Util.
3147 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
3148 (Make_DT): Update sequence of dispatch table initialization. Remove the
3149 initialization of field RC_Offset. Add initialization of field Needs_
3150 Finalization.
3151 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
3152 Reimplement how an object is first finalized, then deallocated.
3153 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3154 Code reformatting.
3155 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
3156 Register TSS_Finalize_Address with type TSS_Names.
3157 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
3158 procedure provides the interface between an allocation / deallocation
3159 and the support machinery in Ada.Finalization.Heap_Management.
3160 (Find_Init_Call): Code reformatting.
3161 (Find_Init_Call_In_List): Code reformatting.
3162 (Find_Protection_Type): Moved from Exp_Ch9.
3163 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
3164 (Has_Controlled_Coextensions): Removed.
3165 (Has_Controlled_Objects): New routine.
3166 (In_Library_Level_Package_Body): New routine.
3167 (Insert_Action_After): New routine.
3168 (Is_Finalizable_Transient): New routine. This predicate determines
3169 whether an object declaration is one of the many variants of controlled
3170 transients.
3171 (Is_Null_Access_BIP_Func_Call): New routine.
3172 (Is_Non_BIP_Func_Call): New routine.
3173 (Is_Related_To_Func_Return): New routine.
3174 (Needs_Finalization): Moved from Exp_Ch7.
3175 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
3176 (Find_Protection_Type): Moved from Exp_Ch9.
3177 (Has_Controlled_Coextensions): Removed.
3178 (Has_Controlled_Objects): New routine.
3179 (In_Library_Level_Package_Body): New routine.
3180 (Insert_Action_After): New routine.
3181 (Is_Finalizable_Transient): New routine.
3182 (Is_Null_Access_BIP_Func_Call): New routine.
3183 (Is_Non_BIP_Func_Call): New routine.
3184 (Is_Related_To_Func_Return): New routine.
3185 (Needs_Finalization): Moved from Exp_ch7.
3186 * expander.adb (Expand): Add a case for N_Free_Statement.
3187 * freeze.adb (Freeze_All): Replace the generation of a finalization
3188 list with a collection for access-to-controlled types.
3189 (Freeze_Entity): Code reformatting.
3190 (Freeze_Record_Type): Remove the freezing of a record controller
3191 component.
3192 (Freeze_Subprogram): Code reformatting.
3193 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
3194 finalization list.
3195 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
3196 has a library-level finalizer.
3197 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
3198 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
3199 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
3200 files. Add a-fihema to the list of object files.
3201 * par-ch4.adb:
3202 Alphabetize the associations in type Is_Parameterless_Attribute.
3203 * rtsfind.ads: Ada.Finalization_List.Controller and
3204 System.Finalization_Implementation are no longer a GNAT unit.
3205 Update the range of type Ada_Finalization_Child. Remove the following
3206 recoverable entities:
2c7f9cc0 3207
df3e68b1
HK
3208 RE_Attach_To_Final_List
3209 RE_Deep_Tag_Attach
3210 RE_Finalize_List
3211 RE_Finalize_One
3212 RE_Finalizable_Ptr_Ptr
3213 RE_Global_Final_List
3214 RE_Limited_Record_Controller
3215 RE_List_Controller
3216 RE_Move_Final_List
3217 RE_Record_Controller
3218 RE_Simple_List_Controller
2c7f9cc0 3219
df3e68b1 3220 Add the following recoverable entities:
2c7f9cc0 3221
df3e68b1
HK
3222 RE_Add_Offset_To_Address
3223 RE_Allocate
3224 RE_Base_Pool
3225 RE_Deallocate
3226 RE_Exception_Identity
3227 RE_Finalization_Collection
3228 RE_Finalization_Collection_Ptr
3229 RE_Needs_Finalization
3230 RE_Save_Library_Occurrence
3231 RE_Set_Finalize_Address_Ptr
3232 RE_Set_Storage_Pool_Ptr
3233 RE_Storage_Count
3234 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
3235 Name_uController.
3236 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
3237 (First_Stored_Discriminant): Remove the mention of Name_uController.
3238 * sem_aux.ads: Comment reformatting.
3239 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
3240 to redecorate an already existing class-wide type.
3241 (Decorate_Tagged_Type): New parameter profile and associated comment.
3242 Create a "shadow class-wide type" for a shadow entity.
3243 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
3244 of the final chain along with the associated comment.
3245 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
3246 Full_Desig and set it to the full view of the designated type.
3247 Initialize the finalization collection to empty.
3248 (Build_Derived_Record_Type): Alphabetize local variables. Code
3249 reformatting.
3250 (Collect_Fixed_Components): Remove the mention of Name_uController.
3251 (Create_Constrained_Components): Remove the mention of Name_uController.
3252 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
3253 class-wide type of a shadow entity.
3254 (Process_Full_View): Update the machinery which marks type
3255 Limited_Controlled's entity as limited.
3256 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
3257 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
3258 list, instead make a collection build-in-place formal.
3259 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
3260 a designated type in order to establish a match between the renaming
3261 and the renamed entity.
3262 (Find_Selected_Component): Add guard to prevent spurious exceptions
3263 from being raised on .NET/JVM.
3264 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
3265 to the list of primitive that need special processing. Update arrays
3266 C_Names and D_Names.
3267 (Replace_Types): Handle class-wide types.
3268 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
3269 different parameter profile, look at the first formal.
3270 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
3271 use clauses for Exp_Util.
3272 * sem_res.adb: Remove with and use clauses for Elists.
3273 (Propagate_Coextensions): Removed.
3274 (Resolve_Allocator): Do not propagate the list of coextensions from one
3275 allocator to another.
3276 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
3277 Deaccessed_T to Desig_Typ.
3278 (Enter_Name): Remove the mention of Name_uController.
3279 (Gather_Components): Remove the mention of Name_uController.
3280 (Incomplete_Or_Private_View): New routine.
3281 (Is_Coextension_Root): Removed.
3282 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
3283 * sem_util.ads (Incomplete_Or_Private_View): New routine.
3284 (Is_Coextension_Root): Removed.
3285 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
3286 Controlled types are now derived from a null tagged record. Remove
3287 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
3288 * sinfo.adb (Coextensions): Removed.
3289 (Set_Coextensions): Removed.
3290 * sinfo.ads: Remove Coextensions from the explanation of node fields
3291 and its uses in nodes.
3292 Update the field usage of N_Allocator.
3293 (Coextensions): Removed along with its pragma Inline.
3294 (Set_Coextensions): Removed along with its pragma Inline.
3295 * snames.ads-tmpl: Remove names
2c7f9cc0 3296
df3e68b1
HK
3297 Name_uClean
3298 Name_uController
3299 Name_uFinal_List
3300 Name_uLocal_Final_List
3301 Name_Finalization_Root
3302 Name_Next
3303 Name_Prev
2c7f9cc0 3304
df3e68b1 3305 Add names
2c7f9cc0 3306
df3e68b1
HK
3307 Name_uFinalizer
3308 Name_Finalize_Address
3309 * s-pooglo.adb (Allocate): Add overriding indicator.
3310 (Deallocate): Add overriding indicator.
3311 (Storage_Size): Add overriding indicator.
3312 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
3313 than Finalize_Global_List.
3314 (Null_Finalize_Global_List): Removed.
3315 (Save_Library_Occurrence): New routine.
3316 * s-soflin.ads: Remove variable Finalize_Global_List along with its
3317 initialization. Add variable Finalize_Library_Objects along with its
3318 pragma Export. Add variables Library_Exception and
3319 Library_Exception_Set along with their pragma Export.
3320 (Null_Finalize_Global_List): Removed.
3321 (Save_Library_Occurrence): New routine.
3322 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
3323 rather than Finalize_Global_List.
3324 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
3325 of the constructed node.
3326
2ee06322
RO
33272011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3328
3329 * link.c: Include "auto-host.h" before system headers.
3330
f77b022b
VC
33312011-08-03 Vincent Celier <celier@adacore.com>
3332
3333 * make.adb (Gnatmake): Add to table Library_Projs only library projects
3334 that are not extended. Do not check if a library project that is
3335 extended should be regenerated. Do not add to table Library_Paths the
3336 libraries that are in extended projects. Link only with libraries that
3337 are in libray projects that are not extended.
3338 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
3339 for a library project that is extended.
3340
0187b60e
AC
33412011-08-03 Gary Dismukes <dismukes@adacore.com>
3342
3343 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
3344 conforming subprogram renamings that appear to be completions if they
3345 are not fully conformant.
3346 Such renamings are homographs but not completions.
3347 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
3348 names in a subprogram renaming that appears in an instance.
3349
33502011-08-03 Ed Schonberg <schonberg@adacore.com>
3351
3352 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
3353 not immutably limited, build actual subtype from expression to provide
3354 proper bounds to caller.
3355
33562011-08-03 Gary Dismukes <dismukes@adacore.com>
3357
3358 * sem_ch8.adb: Minor comment correction.
3359
33602011-08-03 Thomas Quinot <quinot@adacore.com>
3361
3362 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
3363 returning a limited array, use an extended return statement.
3364
33652011-08-03 Vincent Celier <celier@adacore.com>
3366
3367 * make.adb (Initialize): If --subdirs= is used, but no project file is
3368 specified, attempt to create the specify subdir if it does not already
3369 exist and use it as the object directory as if -D had been specified.
3370
33712011-08-03 Arnaud Charlet <charlet@adacore.com>
3372
3373 * s-tpopsp-vms.adb: New file.
3374 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
3375 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
3376
e280f981
AC
33772011-08-03 Emmanuel Briot <briot@adacore.com>
3378
3379 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
3380 package.
3381
33822011-08-03 Yannick Moy <moy@adacore.com>
3383
3384 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
3385 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
3386 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
3387 detect that an array has static bounds.
3388
98c99a5a
AC
33892011-08-03 Thomas Quinot <quinot@adacore.com>
3390
3391 * exp_dist.adb: Minor reformatting.
3392
33932011-08-03 Arnaud Charlet <charlet@adacore.com>
3394
3395 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
3396 (ATCB_Key): Removed, not always used.
3397
33982011-08-03 Emmanuel Briot <briot@adacore.com>
3399
3400 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
3401 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
3402 most remaining global variables.
3403
686d0984
AC
34042011-08-03 Robert Dewar <dewar@adacore.com>
3405
3406 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
3407 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
3408 reformatting.
3409
34102011-08-03 Javier Miranda <miranda@adacore.com>
3411
3412 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
3413 that must be passed by copy in VM targets.
3414
34152011-08-03 Emmanuel Briot <briot@adacore.com>
3416
3417 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
3418 duplicates a similar htable now in the project tree.
3419
34202011-08-03 Claire Dross <dross@adacore.com>
3421
3422 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
3423 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
3424 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
3425 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
3426 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
3427 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
3428 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
3429 update.
3430
34312011-08-03 Arnaud Charlet <charlet@adacore.com>
3432
3433 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
3434 (ATCB_Key): Removed, not always used.
3435 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
3436 s-taprop-posix.adb.
3437 * s-tpopsp-tls.adb: New file.
3438 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
3439 x86/x64/ia64/powerpc/sparc Linux.
3440
34412011-08-03 Arnaud Charlet <charlet@adacore.com>
3442
3443 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
3444 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
3445
34462011-08-03 Thomas Quinot <quinot@adacore.com>
3447
3448 * rtsfind.ads, exp_dist.adb, exp_dist.ads
3449 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
3450 Fix type selection for mapping integer types to PolyORB types.
3451
34522011-08-03 Bob Duff <duff@adacore.com>
3453
3454 * sem_ch7.adb: Minor comment clarification.
3455
34562011-08-03 Bob Duff <duff@adacore.com>
3457
3458 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
3459 an error analyzing a choice, skip further processing. Further
3460 processing could cause a crash or cascade errors.
3461
40ecf2f5
EB
34622011-08-03 Emmanuel Briot <briot@adacore.com>
3463
3464 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
3465 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
3466 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
3467 prj-env.ads (Shared_Project_Tree_Data): new type
3468 An aggregate project and its aggregated trees need to share the common
3469 data structures used for lists of strings, packages,... This makes the
3470 code simpler since otherwise we have to pass the root tree (also used
3471 for the configuration file data) in addition to the current project
3472 tree. This also avoids ambiguities as to which tree should be used.
3473 And finally this saves a bit of memory.
3474 (For_Every_Project_Imported): new parameter Tree.
3475 Since aggregated projects are using a different tree, we need to let
3476 the caller know which tree to use to manipulate the returned project.
3477
9fde638d
RD
34782011-08-03 Robert Dewar <dewar@adacore.com>
3479
3480 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
3481 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
3482 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
3483 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
3484
95eb8b69
AC
34852011-08-03 Javier Miranda <miranda@adacore.com>
3486
3487 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
3488 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
3489
34902011-08-03 Bob Duff <duff@adacore.com>
3491
3492 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
3493 the Base_Type.
3494
34952011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
3496
3497 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
3498 g-sehash.ads: Fix typo. Update header.
3499
35002011-08-03 Thomas Quinot <quinot@adacore.com>
3501
3502 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
3503 expansion.
3504
35052011-08-03 Gary Dismukes <dismukes@adacore.com>
3506
3507 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
3508 prefixes of private types along with records, since the selector may be
3509 a discriminant.
3510 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3511 private types along with records, since the selector may be a
3512 discriminant.
3513
92e77027
AC
35142011-08-03 Emmanuel Briot <briot@adacore.com>
3515
b2f7ebc1 3516 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
92e77027
AC
3517
35182011-08-03 Javier Miranda <miranda@adacore.com>
3519
3520 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3521 Tagged_Type_Expansion.
3522
35232011-08-03 Yannick Moy <moy@adacore.com>
3524
b2f7ebc1
GP
3525 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
3526 violation when the argument of concatenation is the name of a
3527 constant.
92e77027 3528
ab29a348
EB
35292011-08-03 Emmanuel Briot <briot@adacore.com>
3530
3531 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3532 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3533 (Process_Declarative_Items): new parameter Child_Env.
3534
9466892f
AC
35352011-08-03 Yannick Moy <moy@adacore.com>
3536
589ef536
GP
3537 * alfa.ads: Update format of ALFA section in ALI file in order to
3538 add a mapping from bodies to specs when both are present.
3539 (ALFA_Scope_Record): Add components for spec file/scope.
3540 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
3541 present.
3542 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
3543 collected, fill in the spec information when relevant.
3544 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9466892f
AC
3545 present.
3546
35472011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3548
3549 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3550 code unit to decide whether to add internally generated subprograms.
2c7f9cc0 3551
9466892f
AC
35522011-08-03 Javier Miranda <miranda@adacore.com>
3553
3554 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
589ef536
GP
3555 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
3556 be handled by copy in VM targets.
9466892f
AC
3557
35582011-08-03 Emmanuel Briot <briot@adacore.com>
3559
589ef536 3560 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9466892f
AC
3561 code with Makeutl.Get_Switches.
3562 * prj-tree.adb: Update comment.
3563
b5ea9143
AC
35642011-08-03 Thomas Quinot <quinot@adacore.com>
3565
3566 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
3567 subprogram with a limited formal that does not support external
3568 streaming.
3569
35702011-08-03 Yannick Moy <moy@adacore.com>
3571
3572 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
3573 continuation line
3574 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
3575 not from current unit in two phases, because it is not possible to
3576 change the table while iterating over its content.
3577 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
3578
35792011-08-03 Sergey Rybin <rybin@adacore.com>
3580
3581 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
3582 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
3583
668a19bc
ES
35842011-08-03 Ed Schonberg <schonberg@adacore.com>
3585
3586 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
3587 and the component type is composite, this is ambiguous for predefined
3588 concatenation, but if the node is not overloaded and the entity is a use
3589 -defined function its profile can be used to resolve that aggregate.
3590
170b2989
AC
35912011-08-03 Robert Dewar <dewar@adacore.com>
3592
3593 * exp_ch4.adb: Minor code cleanup.
3594
35952011-08-03 Thomas Quinot <quinot@adacore.com>
3596
3597 * exp_dist.adb: Do not generate distribution stubs if serious errors
3598 have been diagnosed.
3599
36002011-08-03 Ed Schonberg <schonberg@adacore.com>
3601
3602 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
3603 the first formal of a primitive operation, go to the base type to
3604 handle properly an access to a derived type with constrained
3605 discriminants.
3606 * sem_type.adb (Disambiguate): an immediately visible operator hides a
3607 user-defined function that is only use-visible.
170b2989 3608
e917aec2
RD
36092011-08-03 Robert Dewar <dewar@adacore.com>
3610
3611 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
3612 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
3613 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
3614 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
3615 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
3616 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
3617 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
3618 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
3619
36202011-08-03 Robert Dewar <dewar@adacore.com>
3621
3622 * repinfo.adb (List_Mechanism): Add handling of
3623 Convention_Ada_Pass_By_XXX.
3624 * sem_mech.adb (Set_Mechanism): Ditto.
3625 * sem_prag.adb (Process_Convention): Add entries for
3626 Convention_Ada_Pass_By_XXX.
3627 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
3628
49bfcf43
AC
36292011-08-03 Pascal Obry <obry@adacore.com>
3630
3631 * makeutl.adb: Minor reformatting.
3632
36332011-08-03 Vincent Celier <celier@adacore.com>
3634
3635 * fname-uf.adb
3636 (Get_File_Name) If the file cannot be found when there are no config
3637 pragmas file and May_Fail is True, return No_File instead of the file
3638 name, to be consistent.
3639
36402011-08-03 Pascal Obry <obry@adacore.com>
3641
3642 * adaint.c (__gnat_is_executable_file_attr): Avoid access
3643 to null pointer.
3644
36452011-08-03 Javier Miranda <miranda@adacore.com>
3646
3647 * sem_ch13.adb
3648 (Same_Representation): In VM targets the representation of arrays with
3649 aliased components differs from arrays with non-aliased components.
3650
34798441
EB
36512011-08-03 Emmanuel Briot <briot@adacore.com>
3652
3653 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
3654 not systematically lower case attribute indexes that contain no "."
3655 Fix definition of several Naming attributes, which take
3656 a unit name as index and therefore should be case insensitive.
3657 Minor refactoring (reduce length of variable names).
3658
36592011-08-03 Emmanuel Briot <briot@adacore.com>
3660
3661 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
3662
4437a530
EB
36632011-08-03 Emmanuel Briot <briot@adacore.com>
3664
3665 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
3666 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
3667 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
3668 prj-tree.ads (Prj.Tree.Environment): new type.
3669
804fe3c4
EB
36702011-08-03 Emmanuel Briot <briot@adacore.com>
3671
3672 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
3673 prj-tree.adb, prj-tree.ads (Environment): new type.
3674
c565bc66
AC
36752011-08-03 Emmanuel Briot <briot@adacore.com>
3676
3677 * prj-tree.ads: Remove unused variable.
3678
36792011-08-03 Yannick Moy <moy@adacore.com>
3680
3681 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
3682 issuing messages related to SPARK restriction violation.
3683
4ee646da
AC
36842011-08-03 Ed Schonberg <schonberg@adacore.com>
3685
3686 * sem_ch6.adb: guard against error nodes in return statements.
3687
36882011-08-03 Arnaud Charlet <charlet@adacore.com>
3689
3690 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
3691 a warning can only appear on a configuration file, so emit warning
3692 without further checks.
3693
36942011-08-03 Arnaud Charlet <charlet@adacore.com>
3695
3696 * s-interr.ads: add overriding keyword.
3697
36982011-08-03 Geert Bosch <bosch@adacore.com>
3699
3700 * exp_attr.adb: Fix minor typo.
3701
37022011-08-03 Ed Schonberg <schonberg@adacore.com>
3703
3704 * par-ch4.adb: improve error recovery.
3705
c0e538ad
AC
37062011-08-03 Emmanuel Briot <briot@adacore.com>
3707
3708 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
3709 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
3710 to Errout_Handling.
3711
37122011-08-03 Emmanuel Briot <briot@adacore.com>
3713
3714 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
3715 "external" as an attribute name in aggregate projects.
3716
37172011-08-03 Jose Ruiz <ruiz@adacore.com>
3718
3719 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
3720 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
3721 from 0, so we need to adjust.
3722
37232011-08-03 Emmanuel Briot <briot@adacore.com>
3724
3725 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
3726 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
3727
c4d67e2d
AC
37282011-08-03 Yannick Moy <moy@adacore.com>
3729
3730 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
3731 restriction on overloaded entity if the entity is not an operator.
3732
37332011-08-03 Yannick Moy <moy@adacore.com>
3734
3735 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
3736 restrict.ads: Rename remaining Check_Formal_Restriction* into
3737 Check_SPARK_Restriction*.
3738
37392011-08-03 Emmanuel Briot <briot@adacore.com>
3740
3741 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
3742 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
3743 qualifier.
3744 (Project_Empty): removed
3745 (Empty_Project): new parameter Qualifier
3746 This is used to have fields specific to aggregate projects, cleaner
3747 New field to store the list of aggregated projects.
3748 (Check_Aggregate_Project): removed
3749 (Process_Aggregated_Projects, Free): new subprograms.
3750
3f5a8fee
AC
37512011-08-03 Olivier Hainque <hainque@adacore.com>
3752
3753 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
3754
37552011-08-03 Ed Schonberg <schonberg@adacore.com>
3756
3757 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
3758 explicit dereference of an unconstrained type, create a constrained
3759 subtype for it, as is done for function calls that return an
3760 unconstrained type.
3761
37622011-08-03 Thomas Quinot <quinot@adacore.com>
3763
3764 * g-pehage.adb (Finalize): Avoid possible double-free.
3765
37662011-08-03 Steve Baird <baird@adacore.com>
3767
3768 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
3769 Elab_Spec/Body attrs in CodePeer_Mode.
3770
37712011-08-03 Javier Miranda <miranda@adacore.com>
3772
3773 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
3774 low bound is not known at compile time but they have no others choice.
3775 Done because in this case the bounds can be obtained directly from the
3776 aggregate.
3777
37782011-08-03 Ed Falis <falis@adacore.com>
3779
3780 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
3781 on VxWorks SMP. Remove unusable constant ANY_CPU.
3782
a96ca600
EB
37832011-08-03 Emmanuel Briot <briot@adacore.com>
3784
3785 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
3786 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
3787 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
3788 Prj.Env.Initialize_Empty): new subprograms
3789 (Get_Env, Find_Project): remove parameter Target_Name.
3790
3e582869
AC
37912011-08-03 Gary Dismukes <dismukes@adacore.com>
3792
3793 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
3794 as a condition for the delayed call to Derived_Subprograms done for the
3795 case of the rewriting of a derived type that constrains the
3796 discriminants of its parent type.
3797 Avoids redundant subprogram derivations for private subtype derivations.
3798
37992011-08-03 Javier Miranda <miranda@adacore.com>
3800
3801 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
3802 Build_Record_Aggr_Code.
3803 (Build_Record_Aggr_Code): Add missing support to initialize hidden
3804 discriminants in extension aggregates.
3805
38062011-08-03 Emmanuel Briot <briot@adacore.com>
3807
3808 * prj-pp.adb (Print): also output project qualifiers, since in
3809 particular "aggregate" is mandatory in an aggregate project.
3810
38112011-08-03 Emmanuel Briot <briot@adacore.com>
3812
3813 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
3814 (Debug_Output): new function.
3815
56e94186
AC
38162011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3817
3818 * gnat_ugn.texi: Document -Wstack-usage.
3819 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
3820
38212011-08-03 Thomas Quinot <quinot@adacore.com>
3822
3823 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
3824 have keyword LIMITED.
3825
38262011-08-03 Yannick Moy <moy@adacore.com>
3827
3828 * alfa.adb, alfa.ads, alfa_test.adb: New files.
3829 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
3830 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
3831 section (does not happen in compiler, only if code directly calls
3832 Scan_ALI).
3833 * get_alfa.adb, get_alfa.ads: New files.
3834 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
3835 needed.
3836 * lib-xref-alfa.adb: New file.
3837 * lib-xref.adb, lib-xref.ads
3838 (Xref_Entry): redefine information needed in cross-references for ALFA.
3839 Push ALFA treatments in separated local package.
3840 (Enclosing_Subpragram_Or_Package): treat specially subprogram
3841 identifiers. Return entity of package body instead of spec. Return
3842 Empty for a scope with no location.
3843 (Generate_Reference): adapt to new components for ALFA information.
3844 Remove the need for D references on definitions.
3845 (Is_Local_Reference): moved to ALFA local package
3846 (Output_References): extract subfunction as Extract_Source_Name
3847 (Output_Local_References): remove procedure, replaced by filtering of
3848 cross-references in package ALFA and printing in Put_ALFA.
3849 (Write_Entity_Name): remove procedure
3850 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
3851 print exact name of entity as it appears in source file
3852 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
3853 * put_alfa.adb, put_alfa.ads: New files.
3854 * xref_lib.adb (Search_Xref): protect read of cross-references against
3855 reading other sections of the ALI file, in gnatxref
3856 (Search): protect read of cross-references against reading other
3857 sections of the ALI file, in gnatfind.
3858 * gcc-interface/Make-lang.in: Update dependencies.
3859
38602011-08-03 Thomas Quinot <quinot@adacore.com>
3861
3862 * sem_ch3.adb: Minor reformatting.
3863
38642011-08-03 Jose Ruiz <ruiz@adacore.com>
3865
3866 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
3867 raising an exception.
3868
38692011-08-03 Ed Schonberg <schonberg@adacore.com>
3870
3871 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
3872 type, always use 1 as the lower bound or string, even if lower bound of
3873 context is not static, to handle properly null strings in a non-static
3874 context.
3875
38762011-08-03 Bob Duff <duff@adacore.com>
3877
3878 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
3879 always legal on the right-hand side of an assignment statement; there
3880 is always an applicable index constraint in this case. Therefore, the
3881 check for Pkind = N_Assignment_Statement is now unconditional -- it
3882 doesn't depend on whether Is_Constrained (Typ).
3883
4317e442
AC
38842011-08-03 Robert Dewar <dewar@adacore.com>
3885
3886 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
3887
38882011-08-03 Ed Schonberg <schonberg@adacore.com>
3889
3890 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
3891 for an itype created within a generic unit.
3892
38932011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3894
3895 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
3896 suppresses all inlining.
3897
53f29d4f
AC
38982011-08-03 Robert Dewar <dewar@adacore.com>
3899
3900 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
3901 exp_aggr.adb: Minor reformatting.
3902
39032011-08-03 Thomas Quinot <quinot@adacore.com>
3904
3905 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
3906 tagged assignment when discriminant checks are suppressed. This is
3907 useless and extremely costly in terms of static stack usage.
3908
39092011-08-03 Bob Duff <duff@adacore.com>
3910
3911 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
3912 of generics, because this leads to the wrong entity in the wrong scope,
3913 causing (e.g.) pragma Export_Procedure to get an error if the entity is
3914 an instance.
3915 (Process_Interface_Name): Follow Alias for instances of generics, to
3916 correct for the above change.
3917
39182011-08-03 Ed Schonberg <schonberg@adacore.com>
3919
3920 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
3921 is an integer literal it is always safe to replace the reference. In
3922 addition, if the reference appears in the generated code for an object
3923 declaration it is necessary to copy because otherwise the reference
3924 might be to the uninitilized value of the discriminant of the object
3925 itself.
3926
39272011-08-03 Pascal Obry <obry@adacore.com>
3928
3929 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
3930 ACL used, in this case we want to check for ending .exe, not .exe
3931 anywhere in the path.
3932
39332011-08-03 Sergey Rybin <rybin@adacore.com>
3934
3935 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3936 the tree structure (semantic decoration of references to record
3937 discriminants).
3938
c0b11850
AC
39392011-08-03 Gary Dismukes <dismukes@adacore.com>
3940
3941 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
3942 choices of a named array aggregate, bail out when any choices are
3943 marked as Errors_Posted.
3944
39452011-08-03 Ed Schonberg <schonberg@adacore.com>
3946
3947 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
3948 in which entity is frozen, to handle properly loop variables in
3949 iterators.
3950
39512011-08-03 Ed Schonberg <schonberg@adacore.com>
3952
3953 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
3954 subtype is not static, compute the upper bound using attributes, to
3955 handle properly index types that are not integer types.
3956
39572011-08-03 Bob Duff <duff@adacore.com>
3958
3959 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
3960 Update copyright notice.
3961
39622011-08-03 Ed Schonberg <schonberg@adacore.com>
3963
3964 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
3965 Original_Discriminant if within an instance.
3966 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
3967
39682011-08-03 Thomas Quinot <quinot@adacore.com>
3969
3970 * einfo.ads: Minor reformatting.
3971
39722011-08-03 Ed Schonberg <schonberg@adacore.com>
3973
3974 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
3975 composite type with an unfrozen subcomponent, in the profile of a
3976 primitive operation.
3977
5c34e9cd
AC
39782011-08-03 Robert Dewar <dewar@adacore.com>
3979
3980 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3981
39822011-08-03 Ed Schonberg <schonberg@adacore.com>
3983
3984 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
3985 unconstrained type with discriminants is initialized with an aggregate,
3986 use the constrained subtype of the aggregate as the type of the object,
3987 because it is immutable, and this allows the back-end to generate no
3988 code for the object declaration.
3989
abcd9db2
AC
39902011-08-03 Robert Dewar <dewar@adacore.com>
3991
3992 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
3993 comparison operand is variable, and turns out to be zero or negative.
3994
39952011-08-03 Javier Miranda <miranda@adacore.com>
3996
3997 * exp_intr.adb
3998 (Expand_Dispatching_Constructor_Call): Disable expansion of
3999 code required for native targets. Done to avoid generating
4000 references to unavailable runtime entities in VM targets.
4001 * exp_ch3.adb
4002 (Expand_N_Object_Declaration): Add missing support to handle
4003 the explicit initialization of class-wide interface objects.
4004 Fix documentation.
4005
40062011-08-03 Matthew Heaney <heaney@adacore.com>
4007
4008 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
4009
40102011-08-03 Matthew Heaney <heaney@adacore.com>
4011
4012 * a-cbdlli.adb (Splice): move source items from first to last
4013
40142011-08-03 Yannick Moy <moy@adacore.com>
4015
4016 * sem_util.ads: comment added.
4017
40182011-08-03 Javier Miranda <miranda@adacore.com>
4019
4020 * exp_aggr.adb
4021 (Expand_Record_Aggregate): In VM targets disable the expansion into
4022 assignments of aggregates whose type is not known at compile time.
4023
b474d6c3
ES
40242011-08-03 Ed Schonberg <schonberg@adacore.com>
4025
4026 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
4027 protected entries and task entries, to build the proper renaming
4028 declaration for entry formals, used in debugging.
4029 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
4030 parameters in the same way.
4031
0580d807
AC
40322011-08-02 Robert Dewar <dewar@adacore.com>
4033
4034 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
4035 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
4036 code reorganization.
4037
40382011-08-02 Robert Dewar <dewar@adacore.com>
4039
4040 * debug.adb: Debug flag d.P to suppress length comparison optimization
4041 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
4042 comparison of Length by comparing First/Last instead.
4043
40442011-08-02 Matthew Heaney <heaney@adacore.com>
4045
4046 * a-cobove.ads: Code clean up.
4047
b191a125
AC
40482011-08-02 Vincent Celier <celier@adacore.com>
4049
4050 * adaint.c (file_names_case_sensitive_cache): New static int.
4051 (__gnat_get_file_names_case_sensitive): Cache the return value in
4052 file_names_case_sensitive_cache at the first invocation, to avoid
4053 multiple calls to getenv.
4054
40552011-08-02 Bob Duff <duff@adacore.com>
4056
4057 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
4058
316a0661
AC
40592011-08-02 Yannick Moy <moy@adacore.com>
4060
4061 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
4062 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
4063 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
4064 indicate that we are in a precondition or postcondition. This is used in
4065 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
4066 decide whether to flag the spec or body of the current subprogram as
4067 not in ALFA.
4068
40692011-08-02 Fabien Chouteau <chouteau@adacore.com>
4070
4071 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
4072 list.
4073 * a-extiin.ads: New file.
4074
40752011-08-02 Bob Duff <duff@adacore.com>
4076
4077 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
4078 now raises Name_Error instead of Use_Error in certain cases. The other
4079 parts of this AI were already implemented properly.
4080
f9adb9d4
AC
40812011-08-02 Vincent Celier <celier@adacore.com>
4082
4083 * link.c: Only import "auto-host.h" when building the gnattools.
4084
40852011-08-02 Yannick Moy <moy@adacore.com>
4086
4087 * sem_util.adb: Inter-unit inlining does not work for a subprogram
4088 which calls a local subprogram, so extract subprogram
4089 from Mark_Non_ALFA_Subprogram_Body.
4090
40912011-08-02 Javier Miranda <miranda@adacore.com>
4092
4093 * exp_ch9.adb
4094 (Extract_Dispatching_Call): If the type of the dispatching object is an
4095 access type then return an explicit dereference in the Object out-mode
4096 parameter.
4097
40982011-08-02 Gary Dismukes <dismukes@adacore.com>
4099
4100 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
4101 compatibility checks for all indexes of an array subtype, not just the
4102 first. Reset Has_Dynamic_Range_Check on the subtype before each
4103 potential check to ensure that Insert_Range_Checks will not elide any
4104 of the dynamic checks.
4105
41062011-08-02 Yannick Moy <moy@adacore.com>
4107
4108 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
4109 SPARK restriction at parsing time.
4110 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
4111 directive only if the SPARK restriction is set for this unit.
4112
83f33150
YM
41132011-08-02 Yannick Moy <moy@adacore.com>
4114
4115 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
4116 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
4117 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
4118 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
4119 Mark_Non_ALFA_Subprogram_Body.
4120 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
4121 inlined.
4122
7b98672f
YM
41232011-08-02 Yannick Moy <moy@adacore.com>
4124
4125 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
4126 might be costly.
4127
052e0603
AC
41282011-08-02 Robert Dewar <dewar@adacore.com>
4129
4130 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
4131 exp_ch3.adb: Minor reformatting.
4132
41332011-08-02 Emmanuel Briot <briot@adacore.com>
4134
4135 * adaint.c (__gnat_locate_exec_on_path): only returns executable
4136 files, not any regular file.
4137 (__gnat_locate_file_with_predicate): new subprogram.
4138
41392011-08-02 Yannick Moy <moy@adacore.com>
4140
4141 * sinfo.adb, sinfo.ads: Restrict the use of flags
4142 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
4143 nodes, plus N_Subtype_Declaration for the 2nd one.
4144
4fbad0ba
AC
41452011-08-02 Sergey Rybin <rybin@adacore.com>
4146
4147 * gnat_rm.texi: Ramification of pragma Eliminate documentation
4148 - fix bugs in the description of Source_Trace;
4149 - get rid of UNIT_NAME;
4150
052e0603
AC
41512011-08-02 Javier Miranda <miranda@adacore.com>
4152
4153 * exp_ch9.adb
4154 (Build_Dispatching_Requeue): Adding support for VM targets
4155 since we cannot directly reference the Tag entity.
4156 * exp_sel.adb (Build_K): Adding support for VM targets.
4157 (Build_S_Assignment): Adding support for VM targets.
4158 * exp_disp.adb
4159 (Default_Prim_Op_Position): In VM targets do not restrict availability
4160 of predefined interface primitives to compiling in Ada 2005 mode.
4161 (Is_Predefined_Interface_Primitive): In VM targets this service is not
4162 restricted to compiling in Ada 2005 mode.
4163 (Make_VM_TSD): Generate code that declares and initializes the OSD
4164 record. Needed to support dispatching calls through synchronized
4165 interfaces.
4166 * exp_ch3.adb
4167 (Make_Predefined_Primitive_Specs): Enable generation of predefined
4168 primitives associated with synchronized interfaces.
4169 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
4170 primitives associated with synchronized interfaces.
4171
41722011-08-02 Yannick Moy <moy@adacore.com>
4173
4174 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
4175 statements hidden in SPARK if preceded by the HIDE directive
4176 (Parse_Exception_Handlers): mark each exception handler in a sequence of
4177 exception handlers as hidden in SPARK if preceded by the HIDE directive
4178 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
4179 if starting with the HIDE directive
4180 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
4181 starting with the HIDE directive; mark the declarations in a private
4182 part as hidden in SPARK if the private part starts with the HIDE
4183 directive
4184 * restrict.adb, restrict.ads
4185 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
4186 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
4187 argument node belongs to a part which is hidden in SPARK
4188 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
4189 parts in SPARK; protect the possibly costly call to
4190 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
4191 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
4192 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
4193 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
4194 Tok_SPARK_Hide.
4195 (Scan): recognize special comment starting with '#' and followed by
4196 SPARK keyword "hide" as a HIDE directive.
4197
41982011-08-02 Yannick Moy <moy@adacore.com>
4199
4200 * types.ads, erroutc.ads: Minor reformatting.
4201
42022011-08-02 Vincent Celier <celier@adacore.com>
4203
4204 * link.c: Add response file support for cross platforms.
4205
42062011-08-02 Ed Schonberg <schonberg@adacore.com>
4207
4208 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
4209 in an association, set parent field of copy before partial analysis.
4210 * sem_res.adb (Resolve_Slice): create reference to itype only when
4211 expansion is enabled.
4212
42132011-08-02 Yannick Moy <moy@adacore.com>
4214
4215 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
4216 for new flag denoting which subprogram bodies are in ALFA
4217 * restrict.adb, sem_ch7.adb: Update comment
4218 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4219 sem_ch9.adb, sem_res.adb: Add calls to
4220 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
4221 * sem_ch6.adb (Analyze_Function_Return): add calls to
4222 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
4223 middle of the body, and extended return.
4224 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
4225 False when missing return.
4226 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
4227 to True for subprograms whose spec is in ALFA. Remove later on the flag
4228 on the entity used for a subprogram body when there exists a separate
4229 declaration.
4230 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
4231 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
4232 False, otherwise do nothing.
4233
42342011-08-02 Robert Dewar <dewar@adacore.com>
4235
4236 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4237
42382011-08-02 Yannick Moy <moy@adacore.com>
4239
4240 * sem_ch4.ads: minor formatting.
4241
42422011-08-02 Yannick Moy <moy@adacore.com>
4243
4244 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
4245 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
4246 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
4247 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
4248 opt.ads: cleanup of SPARK mode
4249
42502011-08-02 Yannick Moy <moy@adacore.com>
4251
4252 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
4253 types.
4254 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
4255 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
4256 * sem_ch3.adb
4257 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
4258 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
4259 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
4260 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
4261 types.
4262 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
4263 non-static range.
4264 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
4265 functions whose return type is not in ALFA.
4266 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
4267 specifications.
4268 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4269 parameter's type is not in ALFA.
4270 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4271 types are in ALFA.
4272
42732011-08-02 Ed Schonberg <schonberg@adacore.com>
4274
4275 * sem_ch6 (Analyze_Expression_Function): treat the function as
4276 Inline_Always, and introduce a subprogram declaration for it when it is
4277 not a completion.
4278 * inline.adb (Add_Inlined_Body): recognize bodies that come from
4279 expression functions, so that the back-end can determine whether they
4280 can in fact be inlined.
4281 * sem_util.adb (Is_Expression_Function): predicate to determine whether
4282 a function body comes from an expression function.
4283
42842011-08-02 Gary Dismukes <dismukes@adacore.com>
4285
4286 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4287 null exclusions to test Can_Never_Be_Null on the anonymous access types
4288 of the formals rather than testing the formals themselves. Exclude this
4289 check in cases where the Old_Formal is marked as a controlling formal,
4290 to avoid issuing spurious errors for bodies completing dispatching
4291 operations (due to the flag not getting set on controlling access
4292 formals in body specs).
4293 (Find_Corresponding_Spec): When checking full and subtype conformance of
4294 subprogram bodies in instances, pass Designated and E in that order, for
4295 consistency with the expected order of the formals (New_Id followed by
4296 Old_Id).
4297
42982011-08-02 Robert Dewar <dewar@adacore.com>
4299
4300 * sem_ch8.adb: Minor reformatting.
4301
43022011-08-02 Ed Schonberg <schonberg@adacore.com>
4303
4304 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4305 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4306 primitive operations of class-wide actuals.
4307
43082011-08-02 Javier Miranda <miranda@adacore.com>
4309
4310 * exp_atag.ads, exp_atag.adb
4311 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4312 since its value is implicitly passed in argument Typ.
4313 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4314 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4315 Build_Common_Dispatching_Select_Statements.
4316
43172011-08-02 Robert Dewar <dewar@adacore.com>
4318
4319 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4320 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4321 Minor reformatting.
4322
43232011-08-02 Robert Dewar <dewar@adacore.com>
4324
4325 * sem_res.adb: Minor reformatting.
4326 * sem_prag.adb: Minor reformatting.
4327
43282011-08-02 Javier Miranda <miranda@adacore.com>
4329
4330 * exp_atag.adb, exp_atags.ads
4331 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4332 by the tagged type Entity. Required to use this routine in the VM
4333 targets since we do not have available the Tag entity in the VM
4334 platforms.
4335 * exp_ch6.adb
4336 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4337 Ada.Tags has not been previously loaded.
4338 * exp_ch7.adb
4339 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4340 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4341 * sem_aux.adb
4342 (Enclosing_Dynamic_Scope): Add missing support to handle the full
4343 view of enclosing scopes. Required to handle enclosing scopes that
4344 are synchronized types whose full view is a task type.
4345 * exp_disp.adb
4346 (Build_VM_TSDs): Minor code improvement to avoid generating and
4347 analyzing lists with empty nodes.
4348 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4349 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4350 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4351 (Make_Disp_Timed_Select_Body): Add support for VM targets.
4352 (Make_Select_Specific_Data_Table): Add support for VM targets.
4353 (Make_VM_TSD): Generate code to initialize the SSD structure of
4354 the TSD.
4355
43562011-08-02 Yannick Moy <moy@adacore.com>
4357
4358 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4359 cross-references section in ALI.
4360 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4361 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4362 Sub).
4363 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4364 subprogram or package entity of a node
4365 (Is_Local_Reference_Type): new function returns True for references
4366 selected in local cross-references.
4367 (Lt): function extracted from Lt in Output_References
4368 (Write_Entity_Name): function extracted from Output_References
4369 (Generate_Definition): generate reference with type 'D' for definition
4370 of objects (object declaration and parameter specification), with
4371 appropriate locations and units, for use in local cross-references.
4372 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4373 references of type 'I' for initialization in object definition.
4374 (Output_References): move part of function Lt and procedure
4375 Write_Entity_Name outside of the body. Ignore references of types 'D'
4376 and 'I' introduced for local cross-references.
4377 (Output_Local_References): new procedure to output the local
4378 cross-references sections.
4379 (Lref_Entity_Status): new array defining whether an entity is a local
4380 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4381 with 'I' type when initialization expression is present.
4382 * get_scos.adb, get_scos.ads: Correct comments and typos
4383
43842011-08-02 Javier Miranda <miranda@adacore.com>
4385
4386 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4387 the JVM target.
4388 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4389 the JVM target.
4390 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4391 TSD support.
4392
43932011-08-02 Vincent Celier <celier@adacore.com>
4394
4395 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4396 (No_Space_Img): New function
4397 (Find_Excluded_Sources): When reading from a file, record the file name
4398 and the line number for each excluded source.
4399 (Mark_Excluded_Sources): When reporting an error, if the excluded
4400 sources were read from a file, include file name and line number in
4401 the error message.
4402
44032011-08-02 Ed Schonberg <schonberg@adacore.com>
4404
4405 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4406
44072011-08-02 Robert Dewar <dewar@adacore.com>
4408
4409 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4410
44112011-08-02 Javier Miranda <miranda@adacore.com>
4412
4413 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4414 generation of TSDs to the DOTNET compiler.
4415 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4416 generation of TSDs to the DOTNET compiler.
4417
44182011-08-02 Javier Miranda <miranda@adacore.com>
4419
4420 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4421 record of all the tagged types declared inside library level package
4422 declarations, library level package bodies or library level subprograms.
4423 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4424 associated with a given tagged type.
4425 (Build_VM_TSDs): New subprogram.
4426 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4427 compilation units that are subprograms.
4428 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4429 compilation units that are package bodies.
4430 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4431 units that are a package declaration or a package instantiation.
4432 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4433 reorganization to improve the error generated by the frontend when the
4434 function Ada.Tags.Secondary_Tag is not available.
4435 * rtsfind.ads (RE_Register_TSD): New runtime entity.
4436 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4437
44382011-08-02 Javier Miranda <miranda@adacore.com>
4439
4440 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4441
44422011-08-02 Robert Dewar <dewar@adacore.com>
4443
4444 * s-imenne.ads: Minor reformatting.
4445
44462011-08-02 Robert Dewar <dewar@adacore.com>
4447
4448 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
4449 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
4450 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
4451
44522011-08-02 Robert Dewar <dewar@adacore.com>
4453
4454 * einfo.ads (Materialize_Entity): Document this is only for renamings
4455 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
4456 required debug information in the case where we transform the object
4457 declaration into a renaming declaration.
4458 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
4459 object
4460 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
4461 Materialize_Entity.
4462
44632011-08-02 Robert Dewar <dewar@adacore.com>
4464
4465 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
4466 Suppress_Init_Procs.
4467 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
4468 Suppress_Initialization/Initialization_Suppressed.
4469 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
4470 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
4471 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
4472 * sem_prag.adb: New processing for pragma Suppress_Initialization.
4473
44742011-08-02 Robert Dewar <dewar@adacore.com>
4475
4476 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
4477 Minor reformatting.
4478
44792011-08-02 Ed Schonberg <schonberg@adacore.com>
4480
4481 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4482 only have inheritable classwide pre/postconditions.
4483
44842011-08-02 Javier Miranda <miranda@adacore.com>
4485
4486 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4487 * rtsfind.ads (RE_Check_TSD): New runtime entity.
4488 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4489 checks if the external tag of a type is the same as the external tag
4490 of some other declaration.
4491
44922011-08-02 Thomas Quinot <quinot@adacore.com>
4493
4494 * s-taskin.ads: Minor reformatting.
4495
44962011-08-02 Emmanuel Briot <briot@adacore.com>
4497
4498 * g-comlin.adb (Display_Help): swap the order in which it prints the
4499 short help and the general usage.
4500
45012011-08-02 Ed Schonberg <schonberg@adacore.com>
4502
4503 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4504 the aspect declarations and attach them to the generic copy for
4505 subsequent analysis.
4506 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4507 declarations of the generic tree to the new subprogram declarations.
4508 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4509 conditions that apply to a subprogram instance.
4510
45112011-08-02 Robert Dewar <dewar@adacore.com>
4512
4513 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4514
45152011-08-02 Ed Schonberg <schonberg@adacore.com>
4516
4517 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4518 private type with a tagged full view is not derived in the immediate
4519 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4520
45212011-08-02 Robert Dewar <dewar@adacore.com>
4522
4523 * exp_ch4.adb: Minor reformatting.
4524
45252011-08-02 Ed Schonberg <schonberg@adacore.com>
4526
4527 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4528 Ada2012 iterator, the loop will be rewritten during expansion into a
4529 while loop with a cursor and an element declaration. Do not analyze the
4530 body in this case, because if the container is for indefinite types the
4531 actual subtype of the elements will only be determined when the cursor
4532 declaration is analyzed.
4533
45342011-08-02 Arnaud Charlet <charlet@adacore.com>
4535
4536 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4537 size/alignment related attributes in CodePeer_Mode.
4538
45392011-08-02 Gary Dismukes <dismukes@adacore.com>
4540
4541 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4542 Prepend_Element, since this can result in the operation getting the
4543 wrong slot in the full type's dispatch table if the full type has
4544 inherited operations. The incomplete type's operation will get added
4545 to the proper position in the full type's primitives
4546 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4547 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4548 dispatching operations, since there are cases where nonprimitive
4549 subprograms can get added to the list of incomplete dependents (such
4550 as subprograms in nested packages).
4551 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4552 private part when determining whether to add a primitive with a
4553 parameter of a tagged incomplete type to the Private_Dependents list.
4554 Such primitives can also occur in the visible part, and should not have
4555 been excluded from being private dependents.
4556 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4557 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4558 list of a Taft-amendment incomplete type is a primitive before issuing
4559 an error that the full type must appear in the same unit. There are
4560 cases where nonprimitives can be in the list (such as subprograms in
4561 nested packages).
4562 * sem_disp.adb (Derives_From): Use correct condition for checking that
4563 a formal's type is derived from the type of the corresponding formal in
4564 the parent subprogram (the condition was completely wrong). Add
4565 checking that was missing for controlling result types being derived
4566 from the result type of the parent operation.
4567
45682011-08-02 Yannick Moy <moy@adacore.com>
4569
4570 * errout.adb (First_Node): minor renaming
4571 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4572 first node.
4573
45742011-08-02 Yannick Moy <moy@adacore.com>
4575
4576 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4577 before accessing operands.
4578 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4579 decide whether an initialization expression respects SPARK rules, as
4580 the plain node is the expanded one. This allows for more valid warnings
4581 to be issued.
4582 * gnat_rm.texi: Minor update.
4583
45842011-08-02 Arnaud Charlet <charlet@adacore.com>
4585
4586 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4587 previous change.
4588
45892011-08-02 Robert Dewar <dewar@adacore.com>
4590
4591 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4592
45932011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4594
4595 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4596 loop statements and the element renaming declaration with a block when
4597 the element type is controlled.
4598
45992011-08-02 Yannick Moy <moy@adacore.com>
4600
4601 * sinfo.ads: Minor formatting.
4602
46032011-08-02 Ed Schonberg <schonberg@adacore.com>
4604
4605 * sem_aggr.adb (Add_Association): if the association has a box and no
4606 expression, use the Sloc of the aggregate itself for the new
4607 association.
4608 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4609 the Original_Node.
4610
46112011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4612
4613 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4614 When a container is provided via a function call, generate a renaming
4615 of the function result. This avoids the creation of a transient scope
4616 and the premature finalization of the container.
4617 * exp_ch7.adb (Is_Container_Cursor): Removed.
4618 (Wrap_Transient_Declaration): Remove the supression of the finalization
4619 of the list controller when the declaration denotes a container cursor,
4620 it is not needed.
4621
46222011-08-02 Yannick Moy <moy@adacore.com>
4623
4624 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4625 node is from source, instead of the original node being from source.
4626 * sem_aggr.adb
4627 (Resolve_Array_Aggregate): refine the check for a static expression, to
4628 recognize also static ranges
4629 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4630 Array_Type_Declaration): postpone the test for the type being a subtype
4631 mark after the type has been resolved, so that component-selection and
4632 expanded-name are discriminated.
4633 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4634 to distinguish the case of an iteration scheme, so that an error is
4635 issed on a non-static range in SPARK except in an iteration scheme.
4636 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4637 In_Iter_Schm = True.
4638 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4639 user-defined operators so that they are allowed in renaming
4640 * sem_ch8.adb
4641 (Find_Selected_Component): refine the check for prefixing of operators
4642 so that they are allowed in renaming. Move the checks for restrictions
4643 on selector name after analysis discriminated between
4644 component-selection and expanded-name.
4645 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4646 concatenation argument of string type if it is static.
4647 * sem_util.adb, sem_util.ads
4648 (Check_Later_Vs_Basic_Declarations): add a new function
4649 Is_Later_Declarative_Item to decice which declarations are allowed as
4650 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4651 mode, add that renamings are considered as later items.
4652 (Enclosing_Package): new function to return the enclosing package
4653 (Enter_Name): correct the rule for homonyms in SPARK
4654 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4655 from source (result of expansion) to avoid issuing wrong warnings.
4656
46572011-08-02 Ed Schonberg <schonberg@adacore.com>
4658
4659 * errout.adb: On anything but an expression First_Node returns its
4660 argument.
4661
46622011-08-02 Pascal Obry <obry@adacore.com>
4663
4664 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4665
46662011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4667
4668 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4669 Set the associated loop as the related expression of internally
4670 generated cursors.
4671 * exp_ch7.adb (Is_Container_Cursor): New routine.
4672 (Wrap_Transient_Declaration): Supress the finalization of the list
4673 controller when the declaration denotes a container cursor.
4674
46752011-08-02 Yannick Moy <moy@adacore.com>
4676
4677 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4678 command line now.
4679 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4680 expression is a simple expression. This check cannot be performed in
4681 the semantics, so just drop it.
4682 (P_Index_Or_Discriminant_Constraint): move check that the index or
4683 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4684 semantics. Other cases were previously checked in the semantics.
4685 * par-ch4.adb (P_Name): move checks that a selector name is not
4686 character literal or an operator symbol to Find_Selected_Component in
4687 the semantics
4688 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4689 declarations are not placed after later declarations in a separate
4690 procedure in Sem_Util (possibly not the best choice?), to be used both
4691 during parsing, for Ada 83 mode, and during semantic analysis, for
4692 SPARK mode.
4693 * par-endh.adb (Check_End): move check that end label is not missing
4694 to Process_End_Label in the semantics
4695 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4696 the special case for SPARK restriction
4697 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4698 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4699 parameter Force to issue the error message even on internal node (used
4700 for generated end label). Call Check_Restriction to check when an error
4701 must be issued. In SPARK mode, issue an error message even if the
4702 restriction is not set.
4703 (Check_Restriction): new procedure with an additional out parameter to
4704 inform the caller that a message has been issued
4705 * sem_aggr.adb: Minor modification of message
4706 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4707 instead of issuing an error message directly
4708 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4709 declarations are not placed after later declarations, by calling
4710 Check_Later_Vs_Basic_Declarations
4711 (Analyze_Subtype_Declaration): move here the check that an index or
4712 discriminant constraint must be a subtype mark. Change the check that
4713 a subtype of String must start at one so that it works on subtype marks.
4714 * sem_ch4.adb (Analyze_Call): move here the check that a named
4715 association cannot follow a positional one in a call
4716 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4717 instead of issuing an error message directly
4718 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4719 selector name is not a character literal or an operator symbol. Move
4720 here the check that the prefix of an expanded name cannot be a
4721 subprogram or a loop statement.
4722 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4723 procedure called from parsing and semantics to check that basic
4724 declarations are not placed after later declarations
4725 (Process_End_Label): move here the check that end label is not missing
4726
47272011-08-02 Arnaud Charlet <charlet@adacore.com>
4728
4729 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4730 representation clause in codepeer mode, since it confuses CodePeer and
4731 does not bring useful info.
4732
47332011-08-02 Ed Falis <falis@adacore.com>
4734
4735 * init.c: initialize fp hw on MILS.
4736
47372011-08-02 Ed Schonberg <schonberg@adacore.com>
4738
4739 * errout.adb (First_Node): for bodies, return the node itself (small
4740 optimization). For other nodes, do not check source_unit if the node
4741 comes from Standard.
4742
47432011-08-02 Robert Dewar <dewar@adacore.com>
4744
4745 * exp_ch3.adb: Minor comment additions.
4746 * sem_ch13.adb: Minor reformatting.
4747
47482011-08-02 Pascal Obry <obry@adacore.com>
4749
4750 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4751
47522011-08-02 Robert Dewar <dewar@adacore.com>
4753
4754 * sem_attr.adb: Minor reformatting.
4755
47562011-08-02 Robert Dewar <dewar@adacore.com>
4757
4758 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4759 (Has_Default_Component_Value): Removed
4760 * einfo.ads Comment updates
4761 (Has_Default_Aspect): Replaces Has_Default_Value
4762 (Has_Default_Component_Value): Removed
4763 * exp_ch13.adb
4764 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4765 * exp_ch3.adb
4766 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4767 (Get_Simple_Init_Val): Handle Default_Value aspect
4768 (Needs_Simple_Initialization): Handle Default_Value aspect
4769 * exp_ch3.ads: Needs_Simple_Initialization
4770 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4771 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4772 * sem_ch13.adb
4773 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4774 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4775 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4776
47772011-08-02 Ed Schonberg <schonberg@adacore.com>
4778
4779 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4780 package containing iteration primitives.
4781 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4782
47832011-08-02 Ed Schonberg <schonberg@adacore.com>
4784
4785 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4786 "of", pre-analyze expression in case it is a function call with
4787 finalization actions that must be placed ahead of the loop.
4788 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4789 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4790
47912011-08-02 Geert Bosch <bosch@adacore.com>
4792
4793 * cstand.adb (Create_Float_Types): Only consider C's long double for
4794 Long_Long_Float, in addition to double.
4795
47962011-08-02 Robert Dewar <dewar@adacore.com>
4797
4798 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4799 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4800 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4801 Minor reformatting.
4802
48032011-08-02 Ed Schonberg <schonberg@adacore.com>
4804
4805 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4806 indexed component.
4807
48082011-08-02 Javier Miranda <miranda@adacore.com>
4809
4810 * einfo.ads, einfo.adb
4811 (Original_Access_Type): Move this attribute to Node26 since there was
4812 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4813 which causes conflicts and breaks the generation of the .NET compiler.
4814 (Interface_Name): Add missing documentation on JGNAT only uses of
4815 this attribute.
4816
48172011-08-02 Geert Bosch <bosch@adacore.com>
4818
4819 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4820 (Find_Back_End_Float_Type): Likewise
4821 (Create_Back_End_Float_Types): Likewise
4822 (Create_Float_Types): Likewise
4823 (Register_Float_Type): Likewise
4824 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4825 Nlist and split out type selection in new local Find_Base_Type function.
4826 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4827 Nlist
4828 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4829
48302011-08-02 Robert Dewar <dewar@adacore.com>
4831
4832 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4833 alpha order).
4834 * opt.ads: Minor comment change.
4835 * sem_ch12.adb: Minor code reorganization.
4836
48372011-08-02 Gary Dismukes <dismukes@adacore.com>
4838
4839 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4840 subtype's list of rep items to the list on the full subtype in the case
4841 where the lists are the same.
4842
48432011-08-02 Geert Bosch <bosch@adacore.com>
4844
4845 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4846 using the one from System.Strings, which also deallocates all strings.
4847
48482011-08-02 Geert Bosch <bosch@adacore.com>
4849
4850 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4851 function.
4852 * gcc-interface/Make-lang.in: Update dependencies.
4853
48542011-08-02 Olivier Hainque <hainque@adacore.com>
4855
4856 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4857 end_locus.
4858
48592011-08-02 Javier Miranda <miranda@adacore.com>
4860
4861 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4862 associated with anonymous access to subprograms.
4863
48642011-08-02 Geert Bosch <bosch@adacore.com>
4865
4866 * opt.ads
4867 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4868 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4869 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4870 (Add_Symbol_Definition): Move to switch-c.adb
4871 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4872 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4873 (Add_Symbol_Definition): Move to switch-c.adb.
4874 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4875 * sem_warn.adb
4876 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4877 Move to warnsw.adb.
4878 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4879 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4880 Move to warnsw.adb.
4881 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4882 (Add_Symbol_Definition): Moved from Prepcomp.
4883 * switch-c.ads: Update copyright notice. Use String_List instead of
4884 Argument_List, removing dependency on System.OS_Lib.
4885
48862011-08-02 Yannick Moy <moy@adacore.com>
4887
4888 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4889 mode on initialization expression which does not respect SPARK
4890 restrictions.
4891 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4892 if the tree referenced by its argument represents an initialization
4893 expression in SPARK, suitable for initializing an object in an object
4894 declaration.
4895
48962011-08-02 Javier Miranda <miranda@adacore.com>
4897
4898 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4899 internally generated access to subprogram with its associated protected
4900 subprogram type.
4901 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4902
49032011-08-02 Geert Bosch <bosch@adacore.com>
4904
4905 * cstand.adb (Register_Float_Type): Print information about type to
4906 register, if the Debug_Flag_Dot_B is set.
4907 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4908 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4909 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4910 with a requested precision of more than Max_Digits digits and no more
4911 than Max_Base_Digits digits, if a range specification is present and the
4912 Predefined_Float_Types list has a suitable type to derive from.
4913 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4914 case of type completion with pragma Import
4915 * sem_prag.adb
4916 (Process_Import_Predefined_Type): Processing to complete a type
4917 with pragma Import. Currently supports floating point types only.
4918 (Set_Convention_From_Pragma): Do nothing without underlying type.
4919 (Process_Convention): Guard against absence of underlying type,
4920 which may happen when importing incomplete types.
4921 (Process_Import_Or_Interface): Handle case of importing predefined
4922 types. Tweak error message.
4923
49242011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4925
4926 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4927 functions to previous change. Reorganize code slightly.
4928
49292011-08-02 Geert Bosch <bosch@adacore.com>
4930
4931 * back_end.ads (Register_Type_Proc): New call back procedure type for
4932 allowing the back end to provide information about available types.
4933 (Register_Back_End_Types): New procedure to register back end types.
4934 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4935 available types.
4936 * cstand.adb (Back_End_Float_Types): New list for floating point types
4937 supported by the back end.
4938 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4939 (Copy_Float_Type): New procedure to make new copies of predefined types.
4940 (Register_Float_Type): New call back procedure to populate the BEFT list
4941 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4942 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4943 (Create_Float_Types): New procedure to create entities for floating
4944 point types predefined in Standard, and put these and any remaining
4945 BEFTs on the Predefined_Float_Types list.
4946 * stand.ads (Predefined_Float_Types): New list for predefined floating
4947 point types that do not have declarations in package Standard.
4948
49492011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4950
4951 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4952 entity node for the unit containing the parameter.
4953 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4954 (Add_Inlined_Subprogram): Likewise.
4955 * gcc-interface/Make-lang.in: Update dependencies.
4956
49572011-08-02 Thomas Quinot <quinot@adacore.com>
4958
4959 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4960 suitable value.
4961
49622011-08-02 Geert Bosch <bosch@adacore.com>
4963
4964 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4965
49662011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4967
4968 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4969 computed value of Base_Type.
4970
49712011-08-02 Yannick Moy <moy@adacore.com>
4972
4973 * restrict.adb (Check_Restriction): issue an error for any use of
4974 class-wide, even if the No_Dispatch restriction is not set.
4975 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4976 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4977 when completing a private extension, the type named in the private part
4978 is not the same as that named in the visible part.
4979 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4980 of an inherited primitive operations of a tagged type or type extension
4981 that returns the tagged type.
4982 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4983 function which returns True for an implicit operation inherited by the
4984 derived type declaration for the argument type.
4985 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4986 order.
4987
49882011-08-02 Ed Schonberg <schonberg@adacore.com>
4989
4990 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4991 Process_Bounds, to perform analysis with expansion of a range or an
4992 expression that is the iteration scheme for a loop.
4993 (Analyze_Iterator_Specification): If domain of iteration is given by a
4994 function call with a controlled result, as is the case if call returns
4995 a predefined container, ensure that finalization actions are properly
4996 generated.
4997 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4998
49992011-08-02 Javier Miranda <miranda@adacore.com>
5000
5001 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
5002 * gcc-interface/Make-lang.in: Update dependencies.
5003
50042011-08-02 Javier Miranda <miranda@adacore.com>
5005
5006 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
5007 determine if the analysis is performed using N or Original_Node (N).
5008 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
5009 functionality of routine Is_Variable avoids code duplication.
5010 * checks.adb (Determine_Range): Handle temporaries generated by
5011 Remove_Side_Effects.
5012
50132011-08-02 Javier Miranda <miranda@adacore.com>
5014
5015 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
5016 expansion of the condition. Required since the previous analysis was
5017 done with expansion disabled (see Resolve_Quantified_Expression) and
5018 hence checks were not inserted and record comparisons have not been
5019 expanded.
5020
50212011-08-02 Ed Falis <falis@adacore.com>
5022
5023 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5024 Update header.
5025
50262011-08-02 Bob Duff <duff@adacore.com>
5027
5028 * opt.ads: Minor comment fix.
5029
50302011-08-02 Bob Duff <duff@adacore.com>
5031
5032 * sem_ch12.adb (Analyze_Package_Instantiation,
5033 Analyze_Subprogram_Instantiation): Turn off style checking while
5034 analyzing an instance. Whatever style checks that apply to the generic
5035 unit should apply, so it makes no sense to apply them in an instance.
5036 This was causing trouble when compiling an instance of a runtime
5037 unit that violates the -gnatyO switch.
5038 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5039 one of the two case statements, causing spurious errors.
5040
50412011-08-02 Robert Dewar <dewar@adacore.com>
5042
5043 * uname.adb: Minor reformatting.
5044 * gnatcmd.adb: Minor reformatting.
5045 * exp_attr.adb: Minor reformatting.
5046
50472011-08-02 Ed Schonberg <schonberg@adacore.com>
5048
5049 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
5050 No_Dispatching_Calls, do not look for the Assign primitive, because
5051 predefined primitives are not created in this case.
5052
50532011-08-02 Bob Duff <duff@adacore.com>
5054
5055 * stylesw.ads: Minor comment fixes.
5056
50572011-08-02 Robert Dewar <dewar@adacore.com>
5058
5059 * freeze.adb (Add_To_Result): New procedure.
5060
50612011-08-02 Jose Ruiz <ruiz@adacore.com>
5062
5063 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
5064 time, if the specific run-time routines for handling streams of strings
5065 are not available, use the default mechanism.
5066
50672011-08-02 Arnaud Charlet <charlet@adacore.com>
5068
5069 * s-regpat.ads: Fix typo.
5070
50712011-08-02 Vincent Celier <celier@adacore.com>
5072
5073 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
5074 not null, call it to create the in memory config project file without
5075 parsing an existing default config project file.
5076
50772011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5078
5079 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
5080
50812011-08-02 Ed Schonberg <schonberg@adacore.com>
5082
5083 * sem_elim.adb: an abstract subprogram does not need an eliminate
5084 pragma for its descendant to be eliminable.
5085
50862011-08-02 Ed Falis <falis@adacore.com>
5087
5088 * init.c: revert to handling before previous checkin for VxWorks
5089 * s-intman-vxworks.adb: delete unnecessary declarations related to
5090 using Ada interrupt facilities for handling signals.
5091 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
5092 * s-intman-vxworks.ads: Import __gnat_install_handler as
5093 Initialize_Interrupts.
5094 * s-taprop-vxworks.adb: Delete Signal_Mask.
5095 (Abort_Handler): change construction of mask to unblock exception
5096 signals.
5097
50982011-08-02 Jerome Guitton <guitton@adacore.com>
5099
5100 * a-except-2005.adb (Raise_From_Signal_Handler): Call
5101 Debug_Raise_Exception before propagation starts.
5102
51032011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5104
5105 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
5106 to Restriction_Check_Required.
5107 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
5108 * sem_res.adb (Resolve_Call): Likewise.
5109 * sem_attr.adb (Check_Stream_Attribute): Likewise.
5110
51112011-08-02 Bob Duff <duff@adacore.com>
5112
5113 * stylesw.ads: Update comment.
5114 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
5115 * errout.ads: Remove obsolete comment.
5116
51172011-08-02 Javier Miranda <miranda@adacore.com>
5118
5119 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
5120 (Set_Is_Safe_To_Reevaluate): new procedure.
5121 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
5122 assignment is allowed on safe-to-reevaluate variables.
5123 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
5124 temporary created to remove side effects in expressions that use
5125 the secondary stack as safe-to-reevaluate.
5126 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
5127 variables that are not true constants.
5128
51292011-08-02 Robert Dewar <dewar@adacore.com>
5130
5131 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
5132 sem_res.adb, sem_ch6.adb: Minor reformatting.
5133
51342011-08-02 Jerome Guitton <guitton@adacore.com>
5135
5136 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
5137
51382011-08-02 Ed Schonberg <schonberg@adacore.com>
5139
5140 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
5141 not set Overridden_Operation if subprogram is an initialization
5142 procedure.
5143
51442011-08-02 Yannick Moy <moy@adacore.com>
5145
5146 * par-ch6.adb: Correct obsolete name in comments
5147 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
5148 which takes two message arguments (existing function takes one), with
5149 second message used for continuation.
5150 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
5151 block statements that originate from a source block statement, not
5152 generated block statements
5153 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
5154 symmetry with procedure case
5155 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
5156 function to issue an error in formal mode if a package specification
5157 contains more than one tagged type or type extension.
5158 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
5159 parameters matching formals of tagged types are objects (or ancestor
5160 type conversions of objects), not general expressions. Issue an error
5161 on view conversions that are not involving ancestor conversion of an
5162 extended type.
5163 (Resolve_Type_Conversion): in formal mode, issue an error on the
5164 operand of an ancestor type conversion which is not an object
5165 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
5166 procedure so that it works also for actuals of function calls
5167 (Is_Actual_Tagged_Parameter): new function which determines if its
5168 argument is an actual parameter of a formal of tagged type in a
5169 subprogram call
5170 (Is_SPARK_Object_Reference): new function which determines if the tree
5171 referenced by its argument represents an object in SPARK
5172
51732011-08-02 Robert Dewar <dewar@adacore.com>
5174
5175 * sem_ch3.adb: Minor reformatting
5176 Minor comment addition
5177 Minor error msg text change
5178
51792011-08-02 Javier Miranda <miranda@adacore.com>
5180
5181 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
5182 function. Used to be more precise when we generate a variable plus one
5183 assignment to remove side effects in the evaluation of the Bound
5184 expressions.
5185 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
5186 of the bound expression to force its re-analysis and thus expand the
5187 associated transient scope (if required). Code cleanup replacing the
5188 previous code that declared the constant entity by an invocation to
5189 routine Force_Evaluation which centralizes this work in the frontend.
5190
51912011-08-02 Robert Dewar <dewar@adacore.com>
5192
5193 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
5194 (Base_Type): Now uses improved Is_Base_Type function
5195 * einfo.ads (Base_Type): Inline this function
5196
51972011-08-02 Robert Dewar <dewar@adacore.com>
5198
5199 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
5200 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
5201
52022011-08-02 Arnaud Charlet <charlet@adacore.com>
5203
5204 * gcc-interface/Make-lang.in: Update dependencies.
5205 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
5206 targets.
5207
52082011-08-02 Yannick Moy <moy@adacore.com>
5209
5210 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
5211 non-simple expression used in delta constraint
5212 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
5213 index constraint which is not a subtype mark
5214 * par.adb: With and use Restrict
5215 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
5216 mode on component type which is not a subtype mark and default
5217 expression on component
5218 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
5219 of string which does not have a lower index bound equal to 1
5220 (Array_Type_Declaration): issue an error in formal mode on index or
5221 component type which is not a subtype mark, and on aliased keyword on
5222 component
5223 (Derived_Type_Declaration): issue an error in formal mode on interface,
5224 limited or abstract type
5225 (Record_Type_Declaration): issue an error in formal mode on interface
5226 (Record_Type_Definition): issue an error in formal mode on tagged types
5227 and type extensions not declared in the specification of a library unit
5228 package; on null non-tagged record; on variant part
5229
52302011-08-02 Vincent Celier <celier@adacore.com>
5231
5232 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
5233 not declared for qualified library project when Library_Name is not
5234 declared, but Library_Dir is.
5235
52362011-08-02 Robert Dewar <dewar@adacore.com>
5237
5238 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
5239 pragmas (affects aspects [Component_]Default_Value
5240 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
5241 component type for the resolution
5242
52432011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5244
5245 * einfo.adb (Base_Type): Tune implementation for speed.
5246
52472011-08-02 Robert Dewar <dewar@adacore.com>
5248
5249 * freeze.adb: Minor reformatting.
5250
52512011-08-02 Thomas Quinot <quinot@adacore.com>
5252
5253 * scos.ads: Update comments.
5254
52552011-08-02 Ed Schonberg <schonberg@adacore.com>
5256
5257 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
5258 base type, because the parent may be a subtype of a private type whose
5259 convention is established in a private part.
5260
52612011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5262
5263 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
5264 statement in a block when the expansion of the return expression has
5265 created a finalization chain.
5266 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
5267 with the parent node.
5268 Add N_Extended_Return_Statement to handle the case where a transient
5269 object declaration appears in the Return_Object_Declarations list of
5270 an extended return statement.
5271
52722011-08-02 Matthew Gingell <gingell@adacore.com>
5273
5274 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5275 unused parameter 'name'.
5276
52772011-08-02 Ed Schonberg <schonberg@adacore.com>
5278
5279 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5280 inherited operation, check whether its alias, which is the source
5281 operastion that it renames, has been marked eliminated.
5282
52832011-08-02 Javier Miranda <miranda@adacore.com>
5284
5285 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5286 in-mode parameter whose type is an access type since it can be used to
5287 modify its designated object. Enforce code that handles as safe an
5288 access type that is not access-to-constant but it is the result of a
5289 previous removal of side-effects.
5290 (Remove_Side_Effects): Minor code reorganization of cases which require
5291 no action. Done to incorporate documentation on new cases uncovered
5292 working in this ticket: no action needed if this routine was invoked
5293 too early and the nodes are not yet decorated.
5294 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5295 to routine Remove_Side_Effects by calls to Force_Evaluation since they
5296 were issued with actuals that are implicitly provided by
5297 Force_Evaluation.
5298
52992011-08-02 Robert Dewar <dewar@adacore.com>
5300
5301 * sem_ch3.adb, sem_res.adb: Minor reformatting.
5302
53032011-08-02 Yannick Moy <moy@adacore.com>
5304
5305 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5306 to issue an error in formal mode on attribute not supported in this mode
5307 (Analyze_Attribute): issue errors on standard attributes not supported
5308 in formal mode.
5309 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5310 comment, and issue error in formal mode on modulus which is not a power
5311 of 2.
5312 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5313 range.
5314 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5315 subtype mark.
5316 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5317 operator on modular type (except 'not').
5318
53192011-08-02 Robert Dewar <dewar@adacore.com>
5320
5321 * gnat_rm.texi: Minor reformatting.
5322
53232011-08-02 Arnaud Charlet <charlet@adacore.com>
5324
5325 * s-osinte-linux.ads: Minor comment update and reformatting.
5326 * i-cexten.ads: Make this unit pure, as for its parent.
5327 Will allow its usage in more contexts if needed.
5328
53292011-08-02 Robert Dewar <dewar@adacore.com>
5330
5331 * s-utf_32.ads: Minor comment fix.
5332
53332011-08-02 Ed Schonberg <schonberg@adacore.com>
5334
5335 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5336 operation of a tagged synchronized type, handle the case where the
5337 controlling argument is overloaded.
5338
53392011-08-02 Yannick Moy <moy@adacore.com>
5340
5341 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5342 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5343 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5344 SPARK mode and formal verification mode on processing SPARK restriction
5345 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5346 requiring consistency checking.
5347
53482011-08-02 Robert Dewar <dewar@adacore.com>
5349
5350 * sem_res.adb: Minor reformatting.
5351
53522011-08-02 Robert Dewar <dewar@adacore.com>
5353
5354 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5355 a-cforse.ads: Remove unneeded with of Ada.Containers
5356 Remove commented out pragma Inline's
5357 Move specifications of new subprograms to the actual specs
5358
53592011-08-02 Yannick Moy <moy@adacore.com>
5360
5361 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5362 a-cforse.ads: Update comments.
5363
53642011-08-02 Ed Schonberg <schonberg@adacore.com>
5365
5366 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5367
53682011-08-02 Robert Dewar <dewar@adacore.com>
5369
5370 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5371 a-cforse.ads, a-cofove.ads: Minor reformatting.
5372
53732011-08-02 Claire Dross <dross@adacore.com>
5374
5375 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5376 a-cofove.ads: Add comments.
5377
53782011-08-02 Yannick Moy <moy@adacore.com>
5379
5380 * gnat_rm.texi: Document formal containers.
5381
53822011-08-02 Emmanuel Briot <briot@adacore.com>
5383
5384 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5385 are empty sections.
5386
53872011-08-02 Robert Dewar <dewar@adacore.com>
5388
5389 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5390 reformatting.
5391
53922011-08-02 Robert Dewar <dewar@adacore.com>
5393
5394 * aspects.adb: New aspects Default_Value and Default_Component_Value
5395 New format of Aspect_Names table checks for omitted entries
5396 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5397 handling of boolean aspects for derived types.
5398 New aspects Default_Value and Default_Component_Value
5399 New format of Aspect_Names table checks for omitted entries
5400 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5401 (Has_Default_Value): New flag
5402 (Has_Default_Component_Value): New flag
5403 (Has_Default_Value): New flag
5404 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5405 table.
5406 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5407 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5408 Default_Value and Default_Component_Value
5409 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5410 New aspects Default_Value and Default_Component_Value
5411 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5412 * sprint.adb: Print N_Aspect_Specification node when called from gdb
5413
54142011-08-02 Vincent Celier <celier@adacore.com>
5415
5416 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5417 inherit library kind.
5418
54192011-08-02 Ed Schonberg <schonberg@adacore.com>
5420
5421 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5422 Minor reformatting.
5423
54242011-08-02 Robert Dewar <dewar@adacore.com>
5425
5426 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5427
54282011-08-02 Yannick Moy <moy@adacore.com>
5429
5430 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5431
54322011-08-02 Robert Dewar <dewar@adacore.com>
5433
5434 * impunit.adb: Add comment.
5435
54362011-08-02 Yannick Moy <moy@adacore.com>
5437
5438 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5439 qualification of aggregates in formal mode
5440 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5441 another aggregate
5442 (Resolve_Aggregate): complete the test that an aggregate is adequately
5443 qualified in formal mode
5444
54452011-08-02 Pascal Obry <obry@adacore.com>
5446
5447 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
5448 * mlib-prj.adb: Supress warning when compiling binder generated file.
5449 (Build_Library): Supress all warnings when compiling the binder
5450 generated file.
5451
54522011-08-02 Yannick Moy <moy@adacore.com>
5453
5454 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
5455 from here...
5456 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
5457 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
5458 Add with/use clauses to make Check_Formal_Restriction visible
5459
54602011-08-02 Ed Schonberg <schonberg@adacore.com>
5461
5462 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
5463 in-parameters when type of the generic formal is private in the generic
5464 spec and non-private in the body.
5465
54662011-08-02 Claire Dross <dross@adacore.com>
5467
5468 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
5469 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
5470 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
5471 * impunit.adb, Makefile.rtl: Take new files into account.
5472
54732011-08-02 Robert Dewar <dewar@adacore.com>
5474
5475 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
5476 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5477
54782011-08-02 Yannick Moy <moy@adacore.com>
5479
5480 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5481 formal mode
5482 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5483 matching static array bounds, taking into account the special case of
5484 string literals
5485 * sem_ch3.adb: Typo in comment.
5486
54872011-08-02 Yannick Moy <moy@adacore.com>
5488
5489 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5490 which issues an error in formal mode if its argument node is originally
5491 from source
5492 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5493 has a discriminant specification so that it does not include the case
5494 of derived types
5495 (Derived_Type_Declaration): move here the test that a derived type has a
5496 discriminant specification
5497 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5498 first element of a component association before accessing its choices
5499 (presence of component association is not enough)
5500 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5501 declaration is a library item before accessing the next element in a
5502 list, as library items are not member of lists
5503 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5504 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5505 Check_Formal_Restriction whenever possible.
5506
55072011-08-02 Ed Schonberg <schonberg@adacore.com>
5508
5509 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5510 reference when needed.
5511
55122011-08-02 Bob Duff <duff@adacore.com>
5513
5514 * gnat_ugn.texi: Fix typo.
5515
55162011-08-02 Vincent Celier <celier@adacore.com>
5517
5518 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5519 archive file name. Do not use the full path name of archives for Open
5520 VMS.
5521
55222011-08-02 Robert Dewar <dewar@adacore.com>
5523
5524 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5525 Analyze_Aspect_Specifications
5526 * sem_ch13.adb
5527 (Analyze_Aspect_Specifications): New handling for boolean aspects
5528 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5529 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5530 sequence for Analyze_Aspect_Specifications
5531 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5532 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5533
55342011-08-02 Robert Dewar <dewar@adacore.com>
5535
5536 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5537 aspects, since these no longer exist.
5538
55392011-08-02 Robert Dewar <dewar@adacore.com>
5540
5541 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5542 semicolon, do not try to see if there are aspects following it.
5543 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5544 aspect spec.
5545
55462011-08-02 Robert Dewar <dewar@adacore.com>
5547
5548 * sem_ch8.adb, aspects.ads: Minor reformatting.
5549
55502011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5551
5552 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5553 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5554 extracted from...
5555 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5556
55572011-08-02 Yannick Moy <moy@adacore.com>
5558
5559 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5560 mode on subprogram declaration outside of package specification, unless
5561 it is followed by a pragma Import
5562 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5563 Access_Type_Declaration): issue error in formal mode on access type
5564 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5565 incomplete type
5566 (Analyze_Object_Declaration): issue error in formal mode on object
5567 declaration which does not respect SPARK restrictions
5568 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5569 declaration which does not respect SPARK restrictions
5570 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5571 error in formal mode on digits or delta constraint
5572 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5573 decimal fixed point type
5574 (Derived_Type_Declaration): issue error in formal mode on derived type
5575 other than type extensions of tagged record types
5576 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5577 with check on access definition
5578 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5579 mode on protected definition.
5580 (Analyze_Task_Definition): issue error in formal mode on task definition
5581
55822011-08-02 Robert Dewar <dewar@adacore.com>
5583
5584 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5585
55862011-08-02 Javier Miranda <miranda@adacore.com>
5587
5588 * sem_ch6.adb (Can_Override_Operator): New function.
5589 (Verify_Overriding_Indicator): Add missing code to check overriding
5590 indicator in operators. Fixes regression.
5591 (Check_Overriding_Indicator): Minor reformating after replacing the
5592 code that evaluates if the subprogram can override an operator by
5593 invocations to the above new function.
5594 * einfo.adb
5595 (Write_Field26_Name): Add missing code to ensure that, following
5596 the documentation in einfo.ads, this field is not shown as attribute
5597 "Static_Initialization" on non-dispatching functions.
5598
55992011-08-02 Jose Ruiz <ruiz@adacore.com>
5600
5601 * sem_res.adb (Resolve_Call): A call to
5602 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5603 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5604 i.e., when the second parameter is of type Time_Span.
5605
56062011-08-02 Vincent Celier <celier@adacore.com>
5607
5608 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5609 with an archive instead of -L<library dir> -l<library name>.
5610
56112011-08-02 Ed Schonberg <schonberg@adacore.com>
5612
5613 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5614 mark the base types In_Use in addition to making the operations
5615 use_visible.
5616
56172011-08-02 Ed Falis <falis@adacore.com>
5618
5619 * init.c: add and setup __gnat_signal_mask for the exception signals
5620 * s-inmaop-vxworks.adb: new file.
5621 * s-intman-vxworks.adb: remove unnecessary initializations and
5622 simplify remaining
5623 * s-intman-vxworks.ads: remove unnecessary variable
5624 * s-taprop-vxworks.adb: simplify signal initialization
5625
56262011-08-02 Robert Dewar <dewar@adacore.com>
5627
5628 * sem_ch8.adb: Minor code reorganization, comment updates.
5629
56302011-08-02 Robert Dewar <dewar@adacore.com>
5631
5632 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5633 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5634 here from Sem_Res.
5635 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5636 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5637
56382011-08-02 Ed Schonberg <schonberg@adacore.com>
5639
5640 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5641 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5642 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5643 use_type_clauses, to handle more efficiently use_type and use_all_type
5644 constructs.
5645 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5646 Ada2012 Use_All_Type clause.
5647 (Use_Class_Wide_Operations): new procedure.
5648
56492011-08-02 Robert Dewar <dewar@adacore.com>
5650
5651 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5652 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5653 expression to expression function.
5654
56552011-08-02 Ed Schonberg <schonberg@adacore.com>
5656
5657 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5658 if types are compatible.
5659
56602011-08-02 Yannick Moy <moy@adacore.com>
5661
5662 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5663 returns True if its argument array types have same dimension and same
5664 static bounds at each index.
5665 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5666 OUT or IN OUT paramaters which are not view conversions in SPARK.
5667 (Resolve_Arithmetic_Op): issue an error in formal mode on
5668 multiplication or division with operands of fixed point types which are
5669 not qualified or explicitly converted.
5670 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5671 Boolean or array type (except String) operands.
5672 (Resolve_Equality_Op): issue an error in formal mode on equality
5673 operators for array types other than String with non-matching static
5674 bounds.
5675 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5676 for array types with non-matching static bounds. Factorize the code in
5677 Matching_Static_Array_Bounds.
5678 (Resolve_Qualified_Expression): issue an error in formal mode on
5679 qualified expressions for array types with non-matching static bounds.
5680 (Resolve_Type_Conversion): issue an error in formal mode on type
5681 conversion for array types with non-matching static bounds
5682
56832011-08-02 Robert Dewar <dewar@adacore.com>
5684
5685 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5686
56872011-08-02 Ed Schonberg <schonberg@adacore.com>
5688
5689 * par-ch9.adb: save location of entry for proper error message.
5690
56912011-08-02 Javier Miranda <miranda@adacore.com>
5692
5693 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5694 (Use_Full_View) which permits this routine to climb through the
5695 ancestors using the full-view of private parents.
5696 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5697 Use_Full_View to true in calls to Is_Ancestor.
5698 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5699 true in call to Is_Ancestor.
5700 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5701 Use_Full_View to true in call to Is_Ancestor.
5702 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5703 call to Is_Ancestor.
5704 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5705 Use_Full_View to true in calls to Is_Ancestor.
5706 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5707 Make_Select_Specific_Data_Table, Register_Primitive,
5708 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5709 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5710 to true in call to Is_Ancestor.
5711 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5712 Use_Full_View to true in calls to Is_Ancestor.
5713 * exp_cg.adb
5714 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5715 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5716
57172011-08-02 Robert Dewar <dewar@adacore.com>
5718
5719 * gnat_rm.texi: Minor reformatting.
5720 * sem_prag.adb: Minor reformatting.
5721
57222011-08-02 Tristan Gingold <gingold@adacore.com>
5723
5724 * vms_data.ads: Add VMS qualifier for -gnateP.
5725
57262011-08-02 Robert Dewar <dewar@adacore.com>
5727
5728 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5729 * par-ch7.adb (P_Package): Proper placement of aspects for package
5730 decl/instantiation.
5731 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5732 (End_Statements): Add Is_Sloc parameterr
5733 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5734 (Check_End): Ad Is_Sloc parameter
5735 (End_Statements): Add Is_Sloc parameterr
5736
57372011-08-02 Vincent Celier <celier@adacore.com>
5738
5739 * ug_words: Add VMS qualifier equivalent to -gnateP:
5740 /SYMBOL_PREPROCESSING.
5741
57422011-08-02 Jose Ruiz <ruiz@adacore.com>
5743
5744 * gnat-style.texi: For hexadecimal numeric literals the typical
5745 grouping of digits is 4 to represent 2 bytes.
5746 A procedure spec which is split into several lines is indented two
5747 characters.
5748
57492011-08-02 Yannick Moy <moy@adacore.com>
5750
5751 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5752 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5753 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5754 properly qualified
5755 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5756 choice in array aggregate
5757 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5758 mark as ancestor
5759 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5760 positional and named aggregate for record, or others in record
5761 aggregate, or multiple choice in record aggregate
5762 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5763 array operands to logical operations AND, OR and XOR do not have the
5764 same static lower and higher bounds
5765 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5766
57672011-08-01 Robert Dewar <dewar@adacore.com>
5768
5769 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5770 Replaces Last_Source_Node_In_Sequence.
5771 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5772 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5773 parens and blank in string (this was inconsistently implemented).
5774 * errout.ads
5775 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5776 blank in string (this was inconsistently implemented).
5777 * gnat1drv.adb
5778 (Set_Global_Switches): Set formal mode switches appropriately
5779 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5780 * par-prag.adb
5781 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5782 call Set_Error_Msg_Lang to set "spark" as language name.
5783 * par.adb: Remove unnecessary call to set formal language for errout
5784 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5785 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5786 name.
5787 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5788 calls to it, moved after resolution so that types are known
5789 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5790 result of concatenation is not of type String
5791 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5792 concatenation is not properly restricted
5793 * gnat_rm.texi: Add doc on pragma Spark_95.
5794 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5795 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5796 * gcc-interface/Make-lang.in: Update dependencies.
5797
57982011-08-01 Javier Miranda <miranda@adacore.com>
5799
5800 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5801 condition that detects if the overridden operation must replace an
5802 existing entity.
5803
58042011-08-01 Javier Miranda <miranda@adacore.com>
5805
5806 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5807 code declarations inserted by Insert_Actions in each alternative of the
5808 N_Case_Expression node.
5809
58102011-08-01 Robert Dewar <dewar@adacore.com>
5811
5812 * sem_ch6.adb: Minor code reorganization.
5813 * sem_util.adb: Minor reformatting.
5814
58152011-08-01 Pascal Obry <obry@adacore.com>
5816
5817 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5818 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5819
58202011-08-01 Yannick Moy <moy@adacore.com>
5821
5822 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5823 literal or operator symbol which is prefixed
5824 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5825 mode on access attributes.
5826 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5827 that concatenation operands are properly restricted in formal mode
5828 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5829 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5830 result of the concatenation has a type different from String.
5831 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5832 Analyze_Quantified_Expression, Analyze_Slice,
5833 Analyze_Null): issue an error in formal mode on unsupported constructs
5834 * sem_ch5.adb
5835 (Analyze_Block_Statement): only issue error on source block statement
5836 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5837 function which returns the last node in a list of nodes for which
5838 Comes_From_Source returns True, if any
5839 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5840 Last_Source_Node_In_Sequence
5841 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5842 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5843 mode on unsupported constructs
5844 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5845 rest of the actions may be needed later on since the error is marked as
5846 not serious.
5847 * sinfo.ads: Typos in comments.
5848
58492011-08-01 Pascal Obry <obry@adacore.com>
5850
5851 * projects.texi: Minor editing.
5852
58532011-08-01 Yannick Moy <moy@adacore.com>
5854
5855 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5856 insertion character ~~
5857 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5858 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5859 with insertion character ~~
5860 (Set_Msg_Text): treat insertion character ~~
5861 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5862 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5863 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5864 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5865 errors related to the formal language restriction not serious
5866 (insertion character |).
5867 * par.adb (Par): set formal language for error messages if needed
5868 * sem_ch6.adb (Check_Missing_Return): take into account possible
5869 generated statements at the end of the function
5870 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5871 enumeration value to define a new pragma SPARK_95
5872 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5873 SPARK_Version): new type and variables to store the SPARK version
5874 (none by default).
5875 (SPARK_Mode): return True when SPARK_Version is set
5876 * par-prag.adb: Correct indentation
5877 (Prag): take Pragma_SPARK_95 into account
5878 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5879 into account.
5880
58812011-08-01 Robert Dewar <dewar@adacore.com>
5882
5883 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5884 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5885 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5886
58872011-08-01 Pascal Obry <obry@adacore.com>
5888
5889 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5890 Target_Name to Get_Path call.
5891 (Parse_Single_Project): Likewise.
5892 (Post_Parse_Context_Clause): Likewise.
5893 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5894 Call Initialise_Project_Path with the proper Target_Name.
5895 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5896 search path.
5897 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5898 with the proper Target_Name.
5899 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5900 Part.Parse routine.
5901 (Parse_Project_And_Apply_Config): Likewise.
5902 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5903 This is fine as this part of the code is supporting only native
5904 compilation.
5905 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5906 is fine as this part of the code is supporting only native compilation.
5907
59082011-08-01 Yannick Moy <moy@adacore.com>
5909
5910 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5911 of homonym, unless the homonym is one of the cases allowed in SPARK
5912 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5913 package declaration occurring after a body.
5914
59152011-08-01 Robert Dewar <dewar@adacore.com>
5916
5917 * checks.adb, exp_ch4.adb: Minor reformatting.
5918
59192011-08-01 Javier Miranda <miranda@adacore.com>
5920
5921 * einfo.ads (Access_Disp_Table): Fix documentation.
5922 (Dispatch_Table_Wrappers): Fix documentation.
5923
59242011-08-01 Pascal Obry <obry@adacore.com>
5925
5926 * prj-env.adb, prj-env.ads: Minor reformatting.
5927
59282011-08-01 Yannick Moy <moy@adacore.com>
5929
5930 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5931 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5932 procedures out of these packages.
2c7f9cc0 5933 * errout.ads, errout.adb
052e0603
AC
5934 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5935 procedures in of this package
5936 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5937 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5938 on misplaced later vs initial declarations, like in Ada 83
5939 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5940 formal mode on attribute of private type whose full type declaration
5941 is not visible
5942 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5943 package declaration inside a package specification
5944 (Analyze_Full_Type_Declaration): issue error in formal mode on
5945 controlled type or discriminant type
5946 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5947 user-defined operator means that it should come from the source
5948 (New_Overloaded_Entity): issue error in formal mode on overloaded
5949 entity.
5950 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5951
59522011-08-01 Thomas Quinot <quinot@adacore.com>
5953
5954 * atree.adb: Minor reformatting.
5955 * checks.adb: Minor reformatting.
5956
59572011-08-01 Vincent Celier <celier@adacore.com>
5958
5959 * s-parame-vms-ia64.ads: Fix typo in comment
5960 Minor reformatting
5961 * s-parame-vms-restrict.ads: Removed, unused.
5962
59632011-08-01 Javier Miranda <miranda@adacore.com>
5964
5965 * exp_ch3.adb
5966 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5967 * sem_ch3.adb
5968 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5969 * sem_ch3.ads, sem_ch3.adb
5970 (Is_Constant_Bound): New extended version of the subprogram that was
5971 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5972 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5973 * sem_aux.ads (Constant_Value): Fix typo in comment.
5974 * checks.adb (Generate_Index_Checks): New implementation which, for
5975 array objects with constant bounds, generates the runtime check
5976 referencing the bounds of the array type. For other cases this routine
5977 provides its previous behavior obtaining such values from the array
5978 object.
5979 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5980 parent type.
5981 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5982 we cannot have semantic interpretations of the new node.
5983
59842011-08-01 Ed Schonberg <schonberg@adacore.com>
5985
5986 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5987 expressions.
5988
59892011-08-01 Arnaud Charlet <charlet@adacore.com>
5990
5991 * sem_ch8.adb: Minor code editing.
5992 * s-vxwext.adb: Remove trailing space.
5993 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5994 consistency with other files.
5995
59962011-08-01 Thomas Quinot <quinot@adacore.com>
5997
5998 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5999
60002011-08-01 Ed Schonberg <schonberg@adacore.com>
6001
6002 * par-ch10.adb: reject parameterized expressions as compilation unit.
6003 * sem_ch4.adb: handle properly conditional expression with overloaded
6004 then_clause and no else_clause.
6005
60062011-08-01 Tristan Gingold <gingold@adacore.com>
6007
6008 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
6009 like done by System.Aux_DEC.
6010 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
6011
60122011-08-01 Yannick Moy <moy@adacore.com>
6013
6014 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
6015 missing label at end of declaration (subprogram or package)
6016 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
6017 of positional and named parameter association
6018 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
6019 Error_Msg_SP which adds a prefix to the error message giving the name
6020 of the formal language analyzed
6021 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
6022 access result type in subprogram, unconstrained array as result type,.
6023 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6024 procedure
6025 * sem_ch8.adb: Code clean up.
6026
60272011-08-01 Javier Miranda <miranda@adacore.com>
6028
6029 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6030 * einfo.ads (Access_Disp_Table): Fix documentation.
6031 (Dispatch_Table_Wrappers): Fix documentation.
6032 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6033 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6034 to enforce the documentation of this attribute.
6035 (Set_Is_Interface): Cleanup the assertion.
6036 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6037 the Underlying_Type entity before reading attribute Access_Disp_Table.
6038 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6039 Locate the Underlying_Type before reading attribute Access_Disp_Table.
6040 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6041 the Underlying_Type entity before reading attribute Access_Disp_Table.
6042 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6043 Locate the Underlying_Type entity before reading attribute
6044 Access_Disp_Table.
6045
60462011-08-01 Ed Schonberg <schonberg@adacore.com>
6047
6048 * s-poosiz.ads: Additional overriding indicators.
6049
60502011-08-01 Yannick Moy <moy@adacore.com>
6051
6052 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
6053 formal mode.
6054 (Analyze_Iteration_Scheme): issue error in formal mode when loop
6055 parameter specification does not include a subtype mark.
6056 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
6057 formal mode on abstract subprogram.
6058 (Analyze_Subprogram_Specification): issue error in formal mode on
6059 user-defined operator.
6060 (Process_Formals): issue error in formal mode on access parameter and
6061 default expression.
6062 * sem_ch9.adb (Analyze_Abort_Statement,
6063 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
6064 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
6065 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
6066 Analyze_Requeue, Analyze_Selective_Accept,
6067 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
6068 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
6069 issue error in formal mode on user-defined raise statement.
6070
60712011-08-01 Thomas Quinot <quinot@adacore.com>
6072
6073 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
6074 declaration being hidden when overriding an implicit inherited
6075 subprogram.
6076 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
6077 (-gnats), do not complain about a source file that contains only a
6078 pragma No_Body.
6079
60802011-08-01 Ed Schonberg <schonberg@adacore.com>
6081
6082 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
6083 variable if already set.
6084
60852011-08-01 Arnaud Charlet <charlet@adacore.com>
6086
6087 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
6088 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
6089 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
6090 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
6091 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
6092 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
6093 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
6094 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
6095 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
6096 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
6097 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
6098 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
6099 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
6100 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
6101 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
6102 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
6103 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
6104 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
6105 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
6106 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
6107 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
6108 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
6109 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
6110 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
6111 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
6112 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
6113 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
6114 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
6115 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
6116 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
6117 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
6118 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
6119 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
6120 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
6121 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
6122 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
6123 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
6124 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
6125 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
6126 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
6127 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
6128 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
6129 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
6130 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
6131 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
6132 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
6133 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
6134 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
6135 s-osinte-mingw.ads: Update to GPLv3 run-time license.
6136 Use GNAT instead of GNARL.
6137
61382011-08-01 Bob Duff <duff@adacore.com>
6139
6140 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6141 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
6142 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
6143 reformatting.
6144
61452011-08-01 Yannick Moy <moy@adacore.com>
6146
6147 * debug.adb (d.D) reverve flag for the SPARK mode
6148 (d.E) reverve flag for SPARK generation mode
6149 (d.F) reverve flag for Why generation mode
2c7f9cc0 6150 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
052e0603
AC
6151 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
6152 functions which return True when the corresponding modes are set
6153 (Formal_Language): return "spark" or "alfa" when in formal verification
6154 mode.
6155 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
6156 Error_Msg to prefix the error message with a tag giving the formal
6157 language
6158 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
6159 message with a tag giving the formal language
6160 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
6161 block statement
6162 (Analyze_Case_Statement): issue error in formal mode on case statement
6163 with a single "others" case alternative
6164 (Analyze_Exit_Statement): issue errors in formal mode on exit
6165 statements which do not respect SPARK restrictions
6166 (Analyze_Goto_Statement): issue error in formal mode on goto statement
6167 (Check_Unreachable_Code): always issue an error (not a warning) in
6168 formal mode on unreachable code (concerns both code after an infinite
6169 loop and after an unconditional jump, both not allowed in SPARK)
6170 * sem_ch6.adb (Analyze_Return_Statement): add call to
6171 Set_Return_Present for a procedure containing a return statement
6172 (already done for functions in Analyze_Function_Return)
6173 (Analyze_Function_Return): issue error in formal mode on extended
6174 return or if return is not last statement in function
6175 (Check_Missing_Return): issue error in formal mode if function does
6176 not end with return or if procedure contains a return
6177 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
6178 function to detect if there is an inner scope of its parameter S which
6179 is a loop.
6180
61812011-08-01 Thomas Quinot <quinot@adacore.com>
6182
6183 * sem_ch6.ads: Minor reformatting.
6184
61852011-08-01 Javier Miranda <miranda@adacore.com>
6186
6187 * sem_util.adb (Abstract_Interface_List): Complete condition when
6188 processing private type declarations to avoid reading unavailable
6189 attribute.
6190 (Is_Synchronized_Tagged_Type): Complete condition when processing
6191 private extension declaration nodes to avoid reading unavailable
6192 attribute.
6193
61942011-08-01 Thomas Quinot <quinot@adacore.com>
6195
6196 * sem_ch3.adb: Minor reformatting.
6197
61982011-08-01 Thomas Quinot <quinot@adacore.com>
6199
6200 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
6201 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
6202 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
6203 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
6204 for VMS, instead parametrize the common implementation with
6205 System.Parameters declarations.
6206
62072011-08-01 Eric Botcazou <ebotcazou@adacore.com>
6208
6209 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
6210
62112011-08-01 Tristan Gingold <gingold@adacore.com>
6212
6213 * seh_init.c: Fix SEH handler installation on win64.
6214
62152011-08-01 Ed Schonberg <schonberg@adacore.com>
6216
6217 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
6218 double analysis of an anonymous access to subprogram, because it can
6219 lead to improper sharing of profiles and a back-end crash.
6220
62212011-08-01 Robert Dewar <dewar@adacore.com>
6222
6223 * make.adb, sem_ch4.adb: Minor reformatting.
6224 * gcc-interface/Make-lang.in: Update dependencies.
6225 * sem_util.adb, exp_ch5.adb: Minor reformatting.
6226
62272011-08-01 Arnaud Charlet <charlet@adacore.com>
6228
6229 * gnat_rm.texi: Fix definition of Long_Integer.
6230
62312011-08-01 Ed Schonberg <schonberg@adacore.com>
6232
6233 * exp_aggr.adb: check limit size of static aggregate unconditionally,
6234 to prevent storage exhaustion.
6235 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
6236 finalized is a function body, insert the cleanup code before the final
6237 return statement, to prevent spurious warnings.
6238 * s-pooglo.ads: add overriding indicator.
6239
62402011-08-01 Ed Schonberg <schonberg@adacore.com>
6241
6242 * sem_ch4.adb (Operator_Check): improve error message when both a
6243 with_clause and a use_clause are needed to make operator usage legal.
6244 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
6245 determine whether a compilation unit is visible within an other,
6246 either through a with_clause in the current unit, or a with_clause in
6247 its library unit or one one of its parents.
6248
62492011-08-01 Ed Schonberg <schonberg@adacore.com>
6250
6251 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
6252 over an arbitrary expression of an array or container type.
6253 * lib-xref.adb: clarify comment.
6254
62552011-08-01 Bob Duff <duff@adacore.com>
6256
6257 * einfo.ads: Minor reformatting.
6258 * debug.adb: Minor comment improvement.
6259
62602011-08-01 Javier Miranda <miranda@adacore.com>
6261
6262 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
6263 consider hidden subprograms as valid candidates.
6264
62652011-08-01 Arnaud Charlet <charlet@adacore.com>
6266
6267 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6268
62692011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
6270
6271 * gnat_ugn.texi: Fix typo.
6272
62732011-08-01 Robert Dewar <dewar@adacore.com>
6274
6275 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6276 lib-xref.adb: Minor reformatting
6277
62782011-08-01 Gary Dismukes <dismukes@adacore.com>
6279
6280 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6281 when to generate a call to Move_Final_List.
6282 (Has_Controlled_Parts): Remove this function.
6283
62842011-08-01 Geert Bosch <bosch@adacore.com>
6285
6286 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6287 "," in choice list.
6288
62892011-08-01 Thomas Quinot <quinot@adacore.com>
6290
6291 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6292 explicit raise of a predefined exception as Comes_From_Source if the
6293 original N_Raise_Statement comes from source.
6294
62952011-08-01 Robert Dewar <dewar@adacore.com>
6296
6297 * sinfo.ads: Add comment.
6298 * sem_ch6.adb: Minor reformatting.
6299
63002011-08-01 Robert Dewar <dewar@adacore.com>
6301
6302 * freeze.adb (Freeze_Entity): Refine check for bad component size
6303 clause to avoid rejecting confirming clause when atomic/aliased present.
6304
63052011-08-01 Ed Schonberg <schonberg@adacore.com>
6306
6307 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6308 better determine whether an entity reference is a write.
6309 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6310 subcomponent.
6311 * lib-xref.adb (Output_References): Do no suppress a read reference at
6312 the same location as an immediately preceeding modify-reference, to
6313 handle properly in-out actuals.
6314
63152011-08-01 Tristan Gingold <gingold@adacore.com>
6316
6317 * env.c (__gnat_setenv) [VMS]: Refine previous change.
6318
63192011-08-01 Quentin Ochem <ochem@adacore.com>
6320
6321 * i-cstrin.adb (New_String): Changed implementation, now uses only the
6322 heap to compute the result.
6323
63242011-08-01 Robert Dewar <dewar@adacore.com>
6325
6326 * atree.ads: Minor reformatting.
6327
63282011-08-01 Emmanuel Briot <briot@adacore.com>
6329
6330 * g-expect.adb (Get_Command_Output): Fix memory leak.
6331
63322011-08-01 Geert Bosch <bosch@adacore.com>
6333
6334 * cstand.adb (P_Float_Type): New procedure to print the definition of
6335 predefined fpt types.
6336 (P_Mixed_Name): New procedure to print a name using mixed case
6337 (Print_Standard): Use P_Float_Type for printing floating point types
6338 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6339 precision IEEE float.
6340
63412011-08-01 Thomas Quinot <quinot@adacore.com>
6342
6343 * sem_ch3.adb: Minor reformatting.
6344
63452011-08-01 Ed Schonberg <schonberg@adacore.com>
6346
6347 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6348 the completion of a generic function, insert the new body rather than
6349 rewriting the original.
6350
63512011-08-01 Yannick Moy <moy@adacore.com>
6352
6353 * sinfo.ads, errout.ads: Typos in comments.
6354
63552011-08-01 Robert Dewar <dewar@adacore.com>
6356
6357 * par-endh.adb: Minor reformatting.
6358
63592011-08-01 Robert Dewar <dewar@adacore.com>
6360
6361 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6362 (Pre_Post_Aspects): New subtype.
6363 * par-ch12.adb (P_Generic): New syntax for aspects in packages
6364 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6365 * par-ch7.adb (P_Package): Remove Decl parameter
6366 (P_Package): Handle new syntax for aspects (before IS)
6367 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6368 new aspect syntax
6369 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6370 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6371 (P_Package): Remove Decl parameter
6372 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6373 aspects
6374 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6375 specs
6376 * sem_util.ads, sem_util.adb (Static_Boolean): New function
6377 * sinfo.ads: Document new syntax for aspects in packages etc.
6378 * sprint.adb: Handle new syntax of aspects before IS in package
6379
63802011-08-01 Thomas Quinot <quinot@adacore.com>
6381
6382 * atree.ads: Minor reformatting.
6383 * sem_prag.adb: Minor reformatting.
6384
63852011-08-01 Robert Dewar <dewar@adacore.com>
6386
6387 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6388 case expr alternative.
6389
63902011-08-01 Ed Schonberg <schonberg@adacore.com>
6391
6392 * sem_ch12.adb: Fix typo.
6393
63942011-08-01 Geert Bosch <bosch@adacore.com>
6395
6396 * sem_prag.adb (Check_No_Link_Name): New procedure.
6397 (Process_Import_Or_Interface): Use Check_No_Link_Name.
6398 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6399 instead of Standard_Long_Long_Float_Size global. Preparation for
6400 eventual removal of per type constants.
6401 * exp_util.ads (Get_Stream_Size): New function returning the stream
6402 size value of subtype E.
6403 * exp_util.adb (Get_Stream_Size): Implement new function.
6404 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6405 function.
6406 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6407 * einfo.adb:
6408 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6409
64102011-08-01 Geert Bosch <bosch@adacore.com>
6411
6412 * cstand.adb: Fix comments.
6413 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6414 count of arguments.
6415
64162011-08-01 Robert Dewar <dewar@adacore.com>
6417
6418 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6419
64202011-08-01 Geert Bosch <bosch@adacore.com>
6421
6422 * atree.ads: Fix comment.
6423
64242011-08-01 Robert Dewar <dewar@adacore.com>
6425
6426 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6427 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6428 * par.adb: Add with for Namet.Sp.
6429 * par-tchk.adb: Minor reformatting.
6430
64312011-08-01 Vincent Celier <celier@adacore.com>
6432
6433 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6434 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6435 of the init procedure of a SAL.
6436 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6437 New procedure.
6438
64392011-08-01 Thomas Quinot <quinot@adacore.com>
6440
6441 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6442 reformatting.
6443
64442011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6445
6446 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
6447
64482011-08-01 Thomas Quinot <quinot@adacore.com>
6449
6450 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
6451 conformant with its spec (return True only for types that have
6452 an overriding Initialize primitive operation that prevents them from
6453 having preelaborable initialization).
6454 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
6455 initialization for controlled types in Ada 2005 or later mode.
6456
64572011-08-01 Robert Dewar <dewar@adacore.com>
6458
6459 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
6460 Postcondition.
6461 (Same_Aspect): New function.
6462 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
6463 Type_Invariant, Precondition, Postcondition.
6464 * snames.ads-tmpl: Add Name_Type_Invariant.
6465
64662011-08-01 Robert Dewar <dewar@adacore.com>
6467
6468 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
6469 here.
6470 (Freeze_All_Ent): Fix error in handling inherited aspects.
6471 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
6472 already analyzed, but don't skip entire processing of a declaration,
6473 that's wrong in some cases of declarations being rewritten.
6474 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
6475 Don't delay for integer, string literals
6476 Treat predicates in usual manner for delay, remove special case code,
6477 not needed.
6478 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
6479 (Build_Predicate_Function): Update saved expression in aspect
6480 (Build_Invariant_Procedure): Update saved expression in aspect
6481 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6482 of replacement of discriminant references if the reference is simple.
6483
64842011-08-01 Robert Dewar <dewar@adacore.com>
6485
6486 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6487 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6488 Static_Predicate and Dynamic_Predicate.
6489 (Build_Predicate_Function): Add processing for Static_Predicate
6490 and Dynamic_Predicate.
6491 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6492 (From_Static_Predicate): New flag
6493 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6494
64952011-08-01 Robert Dewar <dewar@adacore.com>
6496
6497 * usage.adb: Documentation cleanup for Ada version modes in usage.
6498 * expander.adb: Minor reformatting.
6499
65002011-08-01 Robert Dewar <dewar@adacore.com>
6501
6502 * atree.ads: Minor comment fix.
6503 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6504 a-witeio.ads, sem_prag.adb: Minor reformatting.
6505
65062011-08-01 Doug Rupp <rupp@adacore.com>
6507
6508 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6509 pointers. Use descrip.h header file for convenience. Add some
6510 comments.
6511
65122011-08-01 Robert Dewar <dewar@adacore.com>
6513
6514 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6515 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6516 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6517 New procedure.
6518 (Check_Aspect_At_End_Of_Declarations): New procedure
6519 (Analye_Aspect_Specification): Minor changes for above procedures
6520 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6521 specification node as well.
6522
65232011-08-01 Pascal Obry <obry@adacore.com>
6524
6525 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6526 Windows files. Use GetFilesAttributes() in this case to check for file
6527 existence instead of returning with an error code.
6528
65292011-08-01 Vincent Celier <celier@adacore.com>
6530
6531 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6532 High is above Source length.
6533
65342011-08-01 Robert Dewar <dewar@adacore.com>
6535
6536 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6537
65382011-08-01 Robert Dewar <dewar@adacore.com>
6539
6540 * aspects.ads (Boolean_Aspects): New subtype.
6541 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6542 for derived types in cases where the parent type and derived type have
6543 aspects.
6544 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6545 with aspects when parent type also has aspects.
6546 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6547 boolean expression at this point).
6548 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6549 accordance with final decision on the Ada 2012 feature.
6550 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6551
65522011-08-01 Matthew Heaney <heaney@adacore.com>
6553
6554 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6555
65562011-08-01 Pascal Obry <obry@adacore.com>
6557
6558 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6559 Fix Replace_Slice when High is above current string size.
6560 (Replace_Slice): Fix DL computation when High is above current
6561 string length.
6562
65632011-08-01 Gary Dismukes <dismukes@adacore.com>
6564
6565 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6566
65672011-08-01 Matthew Heaney <heaney@adacore.com>
6568
6569 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6570 of node.
6571
65722011-08-01 Pascal Obry <obry@adacore.com>
6573
6574 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6575 reformatting.
6576
65772011-08-01 Ed Schonberg <schonberg@adacore.com>
6578
6579 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6580 access to protected subprograms in generic bodies.
6581 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6582 protected type, indicate that the convention of the subprogram is
6583 Convention_Protected, because it may be used in subsequent declarations
6584 within the protected declaration.
6585
65862011-08-01 Vincent Celier <celier@adacore.com>
6587
6588 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6589 and "final" procedures when the name of the library is "ada", to avoid
6590 duplicate symbols "adainit" and "adafinal" in executables.
6591
65922011-08-01 Ed Schonberg <schonberg@adacore.com>
6593
6594 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6595 quantified expression that appears within a postcondition and uses the
6596 Ada2012 'Result attribute.
6597
65982011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6599
6600 * init.c (__gnat_error_handler): Cast reason to int.
6601 (__gnat_install_handler): Explain sa_sigaction use.
6602
66032011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6604
6605 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6606 subprogram has copy-in copy-out parameters, try to promote the mode of
6607 the return type if it is passed in registers.
6608
66092011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6610
6611 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6612 left operand as addressable.
6613
66142011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6615
6616 * gcc-interface/gigi.h (build_function_stub): Remove.
6617 (build_return_expr): Likewise.
6618 (convert_vms_descriptor): Declare.
6619 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6620 (build_function_stub): Move to...
6621 * gcc-interface/utils2.c (build_return_expr): Move to...
6622 * gcc-interface/trans.c (build_function_stub): ...here.
6623 (build_return_expr): ...here.
6624 (Subprogram_Body_to_gnu): Add local variable for language_function.
6625 Disconnect the parameter attributes cache, if any, once done with it.
6626 Call end_subprog_body only after setting the end_locus.
6627 Build the stub associated with the function, if any, at the very end.
6628 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6629 variables and streamline control flow.
6630
66312011-07-23 Arnaud Charlet <charlet@adacore.com>
6632
6633 PR ada/49819
6634 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6635 g-trasym-dwarf.adb.
6636
66372011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6638
6639 PR bootstrap/49794
6640 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6641 Assign to act.sa_sigaction.
6642 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6643 current->return_address to char * before arithmetic.
6644
66452011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6646
6647 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6648 Correct argument types.
6649 Extract code from reason.
6650 (__gnat_install_handler): Assign to act.sa_sigaction.
6651
66522011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6653
6654 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6655 (GNAT1_OBJS): ...here.
6656
66572011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6658
6659 PR ada/48711
6660 * g-socthi-mingw.adb (Fill): Fix formatting.
6661
6662 * gcc-interface/gigi.h: Move around comment.
6663
66642011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6665
6666 PR ada/46350
6667 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6668
66692011-07-14 Florian Weimer <fw@deneb.enyo.de>
6670
6671 PR ada/48711
6672 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6673
66742011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6675
6676 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6677 range comparison if Pmode is SImode.
6678
66792011-07-12 Laurent GUERBY <laurent@guerby.net>
6680 Eric Botcazou <ebotcazou@adacore.com>
6681
6682 * adadecode.c: Wrap up in extern "C" block.
6683 * adadecode.h: Likewise.
6684 * adaint.c: Likewise. Remove 'const' keyword.
6685 * adaint.h: Likewise.
6686 * argv.c: Likewise.
6687 * atree.h: Likewise.
6688 * cio.c: Likewise.
6689 * cstreams.c: Likewise.
6690 * env.c: Likewise.
6691 * exit.c: Likewise.
6692 * fe.h: Likewise.
6693 * final.c: Likewise.
6694 * init.c: Likewise.
6695 * initialize.c: Likewise.
6696 * link.c: Likewise.
6697 * namet.h: Likewise.
6698 * nlists.h: Likewise.
6699 * raise.c: Likewise.
6700 * raise.h: Likewise.
6701 * repinfo.h: Likewise.
6702 * seh_init.c: Likewise.
6703 * targext.c: Likewise.
6704 * tracebak.c: Likewise.
6705 * uintp.h: Likewise.
6706 * urealp.h: Likewise.
6707 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6708 * xsinfo.adb: Likewise.
6709 * xsnamest.adb: Likewise.
6710 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6711 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6712 * gcc-interface/misc.c: Likewise.
6713 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6714 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6715 ada/targext.o here...
6716 (GNAT_ADA_OBJS): ...and not here.
6717 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6718 (GNATBIND_OBJS): Reorder.
6719
67202011-07-07 Richard Henderson <rth@redhat.com>
6721
6722 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6723 dwarf2out_frame_init.
6724
67252011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6726
6727 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6728
67292011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6730
6731 PR target/39150
6732 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6733
67342011-07-06 Richard Guenther <rguenther@suse.de>
6735
6736 * gcc-interface/misc.c (gnat_init): Merge calls to
6737 build_common_tree_nodes and build_common_tree_nodes_2.
6738 Re-initialize boolean_false_node.
6739
67402011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6741 Olivier Hainque <hainque@adacore.com>
6742 Nicolas Setton <setton@adacore.com>
6743
6744 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6745 the type according to the ARTIFICIAL_P parameter.
6746 (create_type_decl): Likewise.
6747 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6748
67492011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6750
6751 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6752 (gnatbind): Likewise.
6753
67542011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6755
6756 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6757
67582011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6759
6760 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6761 local variable throughout. Remove useless call to Base_Type.
6762 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6763 Take it also into account for the volatileness of the field. Set the
6764 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6765
67662011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6767
6768 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6769 on a dereference built for a by-ref object if it has an address clause.
6770
67712011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6772
6773 * einfo.ads (Address_Taken): Document use for the second argument of
6774 Asm_Input and Asm_Output attributes.
6775 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6776 argument is an entity name, then set Address_Taken on it.
6777 <Attribute_Asm_Output>: Likewise.
6778 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6779 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6780 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6781 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6782
67832011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6784
6785 PR middle-end/46500
6786 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6787
67882011-06-14 Joseph Myers <joseph@codesourcery.com>
6789
6790 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6791 (ada/utils.o): Update dependencies.
6792 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6793 ../../../libcpp/libcpp.a.
6794 * gcc-interface/utils.c: Include common/common-target.h.
6795 (process_attributes): Use targetm_common.have_named_sections.
6796
67972011-06-07 Richard Guenther <rguenther@suse.de>
6798
6799 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6800 set_sizetype.
6801
68022011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6803
6804 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6805 TREE_THIS_NOTRAP flag.
6806
68072011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6808
6809 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6810 Fix thinko.
6811
68122011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6813
6814 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6815 constants whose full view has discriminants specially.
6816
68172011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6818
6819 * gcc-interface/utils.c: Include diagnostic.h.
6820 (gnat_write_global_declarations): Output debug information for all
6821 global type declarations before finalizing the compilation unit.
6822 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6823
68242011-05-25 Jakub Jelinek <jakub@redhat.com>
6825
6826 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6827
68282011-05-25 Kai Tietz <ktietz@redhat.com>
6829
6830 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6831 initialization instead of const/none-const pointer assignment.
6832
68332011-05-24 Joseph Myers <joseph@codesourcery.com>
6834
6835 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6836 $(EXTRA_GNAT1_OBJS).
6837 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6838 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6839 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6840 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6841 libcommon-target.a instead of prefix.o.
6842
68432011-05-21 Joseph Myers <joseph@codesourcery.com>
6844
6845 PR ada/49097
6846 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6847
68482011-05-20 Joseph Myers <joseph@codesourcery.com>
6849
6850 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6851 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6852 instead of version.o.
6853
68542011-05-18 Kai Tietz <ktietz@redhat.com>
6855
6856 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6857 boolean_false_node instead of integer_zero_node.
6858 (convert_with_check): Likewise.
6859 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6860
68612011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6862
6863 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6864 type of the parameter is an unconstrained array, convert the actual to
6865 the type of the formal in the In Out and Out cases as well.
6866
68672011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6868
6869 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6870 call build_function_type_array or build_varargs_function_type_array
6871 instead.
6872 (create_subprog_type): Don't call build_function_type; call
6873 build_function_type_vec instead.
6874
68752011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6876
6877 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6878 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6879 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6880
68812011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6882
6883 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6884
6885 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6886 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6887
68882011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6889
6890 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6891
68922011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6893
6894 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6895 instead of accessing TYPE_ARG_TYPES directly.
6896 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6897
68982011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6899
6900 PR ada/48844
6901 * gcc-interface/gigi.h (get_variant_part): Declare.
6902 * gcc-interface/decl.c (get_variant_part): Make global.
6903 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6904 types have the same constant size, are record types and T1 has a
6905 variant part while T2 doesn't.
6906
69072011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6908
6909 * gcc-interface/utils.c (begin_subprog_body): Do not call
6910 get_pending_sizes.
6911 (end_subprog_body): Likewise.
6912
69132011-05-04 Richard Guenther <rguenther@suse.de>
6914
6915 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6916 int_const_binop.
6917 (pos_to_constructor): Likewise.
6918
69192011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 6920 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
6921
6922 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6923 of build_function_type. Adjust calls to...
6924 (build_raise_check): ...this. Do not take a void_tree parameter.
6925 Call build_function_type_list instead of build_function_type.
6926 Fix head comment and swap couple of conditional blocks.
6927
69282011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6929
6930 * gnatvsn.ads (Library_Version): Bump to 4.7.
6931 (Current_Year): Bump to 2011.
6932
69332011-04-29 Michael Matz <matz@suse.de>
6934
6935 * gcc-interface/misc.c (gnat_handle_option): Set
6936 warn_maybe_uninitialized.
6937
69382011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6939
6940 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6941 the Watson/McCabe paper.
6942
69432011-04-23 Jim Meyering <meyering@redhat.com>
6944
6945 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6946
69472011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6948
6949 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6950 onto the new type.
6951
69522011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6953
6954 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6955 parameter.
6956 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6957 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6958 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6959 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6960 <all>: Do not set flags on the reused DECL node coming from an alias.
6961 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6962 don't need debug info here...
6963 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6964 (gigi): Adjust calls to create_subprog_decl.
6965 (build_raise_check): Likewise.
6966 (establish_gnat_vms_condition_handler): Likewise.
6967 (Compilation_Unit_to_gnu): Likewise.
6968 (gnat_to_gnu): Likewise.
6969
69702011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6971
6972 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6973 (NO_REORDER_ADAFLAGS): New variable.
6974 (EXTRA_GNATTOOLS): Always define.
6975 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6976 Clean up and adjust list of files compiled with special options.
6977 * gcc-interface/Make-lang.in: Likewise.
6978 (ada/decl.o): Cosmetical change.
6979 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6980
69812011-04-20 Jim Meyering <meyering@redhat.com>
6982
6983 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6984
69852011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6986
6987 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6988 $(CFLAGS) on the link line.
6989
69902011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6991
6992 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6993 padded type built for the return type if it is unconstrained.
6994
69952011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6996
6997 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6998
69992011-04-12 Nathan Froyd <froydnj@codesourcery.com>
7000
7001 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
7002 before calling TREE_CHAIN.
7003 * gcc-interface/misc.c (gnat_init_ts): New function.
7004 (LANG_HOOKS_INIT_TS): Define.
7005
70062011-04-12 Martin Jambor <mjambor@suse.cz>
7007
7008 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
7009 instead of cgraph_node.
7010
70112011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7012
7013 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
7014 alignment on fields of the RETURN type built for the Copy-In Copy-Out
7015 mechanism.
7016
70172011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7018
7019 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
7020 of aggregate types that contain a placeholder.
7021
70222011-04-08 Nathan Froyd <froydnj@codesourcery.com>
7023
7024 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7025 TYPE_ARG_TYPES.
7026 (handle_type_generic_attribute): Likewise.
7027
70282011-04-04 Eric Botcazou <ebotcazou@adacore.com>
7029
7030 PR ada/47163
7031 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7032
70332011-04-04 Kai Tietz <ktietz@redhat.com>
7034
7035 PR ada/47163
7036 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7037 to flag value.
7038
70392011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7040
7041 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7042 type case, do not strip a padding type around the array type.
7043
70442011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7045
7046 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7047 types.
7048
70492011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7050
7051 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
7052 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
7053 code for -feliminate-unused-debug-types.
7054 (gnat_post_options): Likewise.
7055
70562011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7057
7058 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7059 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
7060 distinct copy.
7061
70622011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7063
7064 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
7065 DECL_ARTIFICIAL flag on enumeration types.
7066
70672011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7068
7069 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
7070 fat pointer types artificial unconditionally.
7071 <E_Array_Subtype>: Attach the base array type as a parallel type if it
7072 isn't artificial.
7073
70742011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7075
7076 * gcc-interface/gigi.h (get_dummy_type): Declare.
7077 (build_dummy_unc_pointer_types): Likewise.
7078 (finish_fat_pointer_type): Likewise.
7079 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
7080 fat pointer type has been built, complete it in place.
7081 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
7082 and thin pointers. Remove useless variable.
7083 (finish_fat_pointer_type): Make global and move to...
7084 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
7085 (get_dummy_type): New function.
7086 (build_dummy_unc_pointer_types): Likewise.
7087 (gnat_pushdecl): Propage the name to the anonymous variants only.
7088 (update_pointer_to): Only adjust the pointer types in the unconstrained
7089 array case.
7090
70912011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7092
7093 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
7094 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
7095 if this is a Taft amendment type and the full declaration is available.
7096 * gcc-interface/trans.c (process_type): Likewise.
7097 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
7098 (process_freeze_entity): Likewise.
7099 * gcc-interface/utils.c (dummy_global): New static variable.
7100 (gnat_write_global_declarations): If there are types declared as used
7101 at the global level, insert them in the global hash table.
7102
71032011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7104
7105 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
7106 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7107 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
7108 copy.
7109 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
7110 flag of the type accordingly.
7111 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
7112
71132011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7114
7115 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7116 finalizing types when updating the pointers to the designated type.
7117 <all>: Finalize the deferred types even if we didn't defer processing
7118 of incomplete types in this invocation.
7119
71202011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
7121 Nicolas Setton <setton@adacore.com>
7122 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
7123
7124 * gcc-interface/misc.c (gnat_descriptive_type): New function.
7125 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
7126
71272011-03-28 Kai Tietz <ktietz@redhat.com>
7128
7129 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
7130 Windows targets.
7131 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
7132 * system-mingw.ads (System): Change ZCX_By_Default default to True.
7133
7134 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
7135
71362011-03-28 Tristan Gingold <gingold@adacore.com>
7137
7138 PR ada/44431
7139 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
7140 Use ada output of gnatbind.
7141 (ada/b_gnatb.adb): Ditto.
7142 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
7143 (ada.mostlyclean, ada.stage1)
7144 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
7145 (ada.stagefeedback): Adjust.
7146 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
7147 Use ada output of gnatbind.
7148 (b_gnatm.adb): Ditto.
7149 (b_gnatl.o, b_gnatm.o): New rules.
7150
71512011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7152
7153 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7154 for the padded type built to support a specified size or alignment.
7155
71562011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7157
7158 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
7159 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7160 unconditionally to the end of the unit when the designated type is
7161 limited_with'ed.
7162 <all>: Rename local variable. Attempt to un-defer types only and do it
7163 for limited_with'ed types as well.
7164 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
7165 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
7166 consistently and remove redundant call to finalize_from_with_types.
7167
71682011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7169
7170 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
7171 subprograms without a previous spec declared in the same unit.
7172 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
7173 subprograms at the end of the unit instead of at the beginning.
7174 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
7175 isn't public for the special handling of non-inline functions nested
7176 inside inline external functions.
7177
71782011-03-25 Jeff Law <law@redhat.com>
7179
7180 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
7181
71822011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7183
7184 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
7185 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
7186 to compute Set_Size_Depends_On_Discriminant.
7187 (Layout_Type): Call it on array types in back-end layout mode.
7188 * sem_util.adb (Requires_Transient_Scope): Return true for array
7189 types only if the size depends on the value of discriminants.
7190 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
7191 type if the RHS is a call to a function that returns an unconstrained
7192 type with default discriminant.
7193
71942011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7195
7196 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
7197 non-conversion to the nominal result type at the end.
7198
71992011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7200
7201 * gcc-interface/trans.c (create_temporary): New function taken from...
7202 (create_init_temporary): ...here. Call it.
7203 (call_to_gnu): Create the temporary for the return value early, if any.
7204 Create it for a function with copy-in/copy-out parameters if there is
7205 no target; in other cases of copy-in/copy-out, use another temporary.
7206 Push the new binding level lazily. Add and rename local variables.
7207
72082011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7209
7210 * gcc-interface/decl.c (validate_size): Improve comments and tweak
7211 error message.
7212 (set_rm_size): Likewise.
7213
72142011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7215
7216 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7217 for the padded type built in order to support a specified alignment.
7218 Fix incorrect formatting.
7219
72202011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7221
7222 PR bootstrap/48216
7223 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
7224
72252011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7226
7227 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
7228 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
7229 to the end of the list. Adjust recursive call. Rename local variable.
7230 If REORDER is true, reorder components of the record type.
7231 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
7232 components_to_record and adjust the parameter list.
7233
72342011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7235
7236 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
7237 disabled, use the variable for bounds of loop iteration scheme.
7238
72392011-03-21 Kai Tietz <ktietz@redhat.com>
7240
7241 PR target/12171
7242 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
7243
72442011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7245
7246 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
7247 out whether the expression is read-only. Short-circuit placeholder
7248 case and rename a couple of local variables.
7249
72502011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7251
7252 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
7253 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
7254 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
7255 (convert): Deal with conversions from a smaller form type specially.
7256
72572011-02-14 Eric Botcazou <ebotcazou@adacore.com>
7258
7259 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
7260 its argument, except for the special -I- switch.
7261
72622011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
7263
7264 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
7265 "Ada Issues".
7266
72672011-02-08 Eric Botcazou <ebotcazou@adacore.com>
7268
7269 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7270
72712011-02-03 Eric Botcazou <ebotcazou@adacore.com>
7272
7273 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7274 GNAT_FORMAL.
7275 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7276 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
7277 instead of GNAT_FORMAL. Protect the expression against multiple uses.
7278 Do not generate the check directly, instead instantiate the template
7279 check present in the descriptor.
7280 (make_descriptor_field): Move around.
7281 (build_vms_descriptor32): Build a template check in the POINTER field.
7282 (build_vms_descriptor): Remove useless suffixes.
7283 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7284
72852011-01-26 Eric Botcazou <ebotcazou@adacore.com>
7286
7287 PR bootstrap/47467
7288 * targext.c: Include target files if IN_RTS is defined.
7289
72902011-01-26 Richard Guenther <rguenther@suse.de>
7291
7292 PR bootstrap/47467
7293 * targext.c: Include config.h.
7294 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7295 dependency.
7296
72972011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 7298 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
7299
7300 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7301
73022011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7303
7304 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7305 end-of-case on the end label and its associated gotos, if any.
7306
73072011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7308
7309 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7310 expressions of the parameter cache within the statement group of
7311 the CICO mechanism.
7312
73132011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 7314 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
7315
7316 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7317 (set_end_locus_from_node): New function.
7318 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7319 make and the function end_locus.
7320 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7321 for the elaboration subprogram.
7322 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7323 set the end_locus of the expression as well.
7324
73252011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7326
7327 PR ada/47131
7328 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7329 variables that are referenced in exception handlers volatile.
7330
7331
7332\f
7333Copyright (C) 2011 Free Software Foundation, Inc.
7334
7335Copying and distribution of this file, with or without modification,
7336are permitted in any medium without royalty provided the copyright
7337notice and this notice are preserved.
7338
7339 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7340 - fix bugs in the description of Source_Trace;
7341 - get rid of UNIT_NAME;
7342
4fbad0ba
AC
73432011-08-02 Javier Miranda <miranda@adacore.com>
7344
7345 * exp_ch9.adb
7346 (Build_Dispatching_Requeue): Adding support for VM targets
7347 since we cannot directly reference the Tag entity.
7348 * exp_sel.adb (Build_K): Adding support for VM targets.
7349 (Build_S_Assignment): Adding support for VM targets.
7350 * exp_disp.adb
7351 (Default_Prim_Op_Position): In VM targets do not restrict availability
7352 of predefined interface primitives to compiling in Ada 2005 mode.
7353 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7354 restricted to compiling in Ada 2005 mode.
7355 (Make_VM_TSD): Generate code that declares and initializes the OSD
7356 record. Needed to support dispatching calls through synchronized
7357 interfaces.
7358 * exp_ch3.adb
7359 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7360 primitives associated with synchronized interfaces.
7361 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7362 primitives associated with synchronized interfaces.
7363
73642011-08-02 Yannick Moy <moy@adacore.com>
7365
7366 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7367 statements hidden in SPARK if preceded by the HIDE directive
7368 (Parse_Exception_Handlers): mark each exception handler in a sequence of
7369 exception handlers as hidden in SPARK if preceded by the HIDE directive
7370 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7371 if starting with the HIDE directive
7372 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7373 starting with the HIDE directive; mark the declarations in a private
7374 part as hidden in SPARK if the private part starts with the HIDE
7375 directive
7376 * restrict.adb, restrict.ads
7377 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7378 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7379 argument node belongs to a part which is hidden in SPARK
7380 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7381 parts in SPARK; protect the possibly costly call to
7382 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7383 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7384 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7385 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7386 Tok_SPARK_Hide.
7387 (Scan): recognize special comment starting with '#' and followed by
7388 SPARK keyword "hide" as a HIDE directive.
7389
73902011-08-02 Yannick Moy <moy@adacore.com>
7391
7392 * types.ads, erroutc.ads: Minor reformatting.
7393
73942011-08-02 Vincent Celier <celier@adacore.com>
7395
7396 * link.c: Add response file support for cross platforms.
7397
6ff6152d
ES
73982011-08-02 Ed Schonberg <schonberg@adacore.com>
7399
7400 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7401 in an association, set parent field of copy before partial analysis.
7402 * sem_res.adb (Resolve_Slice): create reference to itype only when
7403 expansion is enabled.
7404
975c6896
YM
74052011-08-02 Yannick Moy <moy@adacore.com>
7406
7407 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7408 for new flag denoting which subprogram bodies are in ALFA
7409 * restrict.adb, sem_ch7.adb: Update comment
7410 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7411 sem_ch9.adb, sem_res.adb: Add calls to
7412 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7413 * sem_ch6.adb (Analyze_Function_Return): add calls to
7414 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7415 middle of the body, and extended return.
7416 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7417 False when missing return.
7418 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7419 to True for subprograms whose spec is in ALFA. Remove later on the flag
7420 on the entity used for a subprogram body when there exists a separate
7421 declaration.
7422 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7423 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7424 False, otherwise do nothing.
7425
afc8324d
AC
74262011-08-02 Robert Dewar <dewar@adacore.com>
7427
7428 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7429
74302011-08-02 Yannick Moy <moy@adacore.com>
7431
7432 * sem_ch4.ads: minor formatting.
7433
2ba431e5
YM
74342011-08-02 Yannick Moy <moy@adacore.com>
7435
7436 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7437 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7438 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7439 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7440 opt.ads: cleanup of SPARK mode
7441
0f853035
YM
74422011-08-02 Yannick Moy <moy@adacore.com>
7443
7444 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7445 types.
7446 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7447 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7448 * sem_ch3.adb
7449 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7450 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7451 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7452 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7453 types.
7454 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7455 non-static range.
7456 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7457 functions whose return type is not in ALFA.
7458 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7459 specifications.
7460 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7461 parameter's type is not in ALFA.
7462 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7463 types are in ALFA.
7464
d2b10647
ES
74652011-08-02 Ed Schonberg <schonberg@adacore.com>
7466
7467 * sem_ch6 (Analyze_Expression_Function): treat the function as
7468 Inline_Always, and introduce a subprogram declaration for it when it is
7469 not a completion.
7470 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7471 expression functions, so that the back-end can determine whether they
7472 can in fact be inlined.
7473 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7474 a function body comes from an expression function.
7475
c7b9d548
AC
74762011-08-02 Gary Dismukes <dismukes@adacore.com>
7477
7478 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7479 null exclusions to test Can_Never_Be_Null on the anonymous access types
7480 of the formals rather than testing the formals themselves. Exclude this
7481 check in cases where the Old_Formal is marked as a controlling formal,
7482 to avoid issuing spurious errors for bodies completing dispatching
7483 operations (due to the flag not getting set on controlling access
7484 formals in body specs).
7485 (Find_Corresponding_Spec): When checking full and subtype conformance of
7486 subprogram bodies in instances, pass Designated and E in that order, for
7487 consistency with the expected order of the formals (New_Id followed by
7488 Old_Id).
7489
74902011-08-02 Robert Dewar <dewar@adacore.com>
7491
7492 * sem_ch8.adb: Minor reformatting.
7493
1138cf59
AC
74942011-08-02 Ed Schonberg <schonberg@adacore.com>
7495
7496 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7497 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7498 primitive operations of class-wide actuals.
7499
75002011-08-02 Javier Miranda <miranda@adacore.com>
7501
7502 * exp_atag.ads, exp_atag.adb
7503 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7504 since its value is implicitly passed in argument Typ.
7505 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7506 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7507 Build_Common_Dispatching_Select_Statements.
7508
7b9db926
RD
75092011-08-02 Robert Dewar <dewar@adacore.com>
7510
7511 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7512 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7513 Minor reformatting.
7514
e8374e7a
AC
75152011-08-02 Robert Dewar <dewar@adacore.com>
7516
7517 * sem_res.adb: Minor reformatting.
7518 * sem_prag.adb: Minor reformatting.
7519
75202011-08-02 Javier Miranda <miranda@adacore.com>
7521
7522 * exp_atag.adb, exp_atags.ads
7523 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7524 by the tagged type Entity. Required to use this routine in the VM
7525 targets since we do not have available the Tag entity in the VM
7526 platforms.
7527 * exp_ch6.adb
7528 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7529 Ada.Tags has not been previously loaded.
7530 * exp_ch7.adb
7531 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7532 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7533 * sem_aux.adb
7534 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7535 view of enclosing scopes. Required to handle enclosing scopes that
7536 are synchronized types whose full view is a task type.
7537 * exp_disp.adb
7538 (Build_VM_TSDs): Minor code improvement to avoid generating and
7539 analyzing lists with empty nodes.
7540 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7541 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7542 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7543 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7544 (Make_Select_Specific_Data_Table): Add support for VM targets.
7545 (Make_VM_TSD): Generate code to initialize the SSD structure of
7546 the TSD.
7547
75482011-08-02 Yannick Moy <moy@adacore.com>
7549
7550 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7551 cross-references section in ALI.
7552 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7553 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7554 Sub).
7555 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7556 subprogram or package entity of a node
7557 (Is_Local_Reference_Type): new function returns True for references
7558 selected in local cross-references.
7559 (Lt): function extracted from Lt in Output_References
7560 (Write_Entity_Name): function extracted from Output_References
7561 (Generate_Definition): generate reference with type 'D' for definition
7562 of objects (object declaration and parameter specification), with
7563 appropriate locations and units, for use in local cross-references.
7564 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7565 references of type 'I' for initialization in object definition.
7566 (Output_References): move part of function Lt and procedure
7567 Write_Entity_Name outside of the body. Ignore references of types 'D'
7568 and 'I' introduced for local cross-references.
7569 (Output_Local_References): new procedure to output the local
7570 cross-references sections.
7571 (Lref_Entity_Status): new array defining whether an entity is a local
7572 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7573 with 'I' type when initialization expression is present.
7574 * get_scos.adb, get_scos.ads: Correct comments and typos
7575
1f6439e3
AC
75762011-08-02 Javier Miranda <miranda@adacore.com>
7577
7578 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7579 the JVM target.
7580 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7581 the JVM target.
7582 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7583 TSD support.
7584
75852011-08-02 Vincent Celier <celier@adacore.com>
7586
7587 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7588 (No_Space_Img): New function
7589 (Find_Excluded_Sources): When reading from a file, record the file name
7590 and the line number for each excluded source.
7591 (Mark_Excluded_Sources): When reporting an error, if the excluded
7592 sources were read from a file, include file name and line number in
7593 the error message.
7594
75952011-08-02 Ed Schonberg <schonberg@adacore.com>
7596
7597 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7598
ab027d28
RD
75992011-08-02 Robert Dewar <dewar@adacore.com>
7600
7601 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7602
b3b28b0c
JM
76032011-08-02 Javier Miranda <miranda@adacore.com>
7604
7605 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7606 generation of TSDs to the DOTNET compiler.
7607 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7608 generation of TSDs to the DOTNET compiler.
7609
9732e886
JM
76102011-08-02 Javier Miranda <miranda@adacore.com>
7611
7612 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7613 record of all the tagged types declared inside library level package
7614 declarations, library level package bodies or library level subprograms.
7615 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7616 associated with a given tagged type.
7617 (Build_VM_TSDs): New subprogram.
7618 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7619 compilation units that are subprograms.
7620 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7621 compilation units that are package bodies.
7622 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7623 units that are a package declaration or a package instantiation.
7624 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7625 reorganization to improve the error generated by the frontend when the
7626 function Ada.Tags.Secondary_Tag is not available.
7627 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7628 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7629
e526d0c7
AC
76302011-08-02 Javier Miranda <miranda@adacore.com>
7631
7632 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7633
76342011-08-02 Robert Dewar <dewar@adacore.com>
7635
7636 * s-imenne.ads: Minor reformatting.
7637
76382011-08-02 Robert Dewar <dewar@adacore.com>
7639
7640 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7641 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7642 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7643
76442011-08-02 Robert Dewar <dewar@adacore.com>
7645
7646 * einfo.ads (Materialize_Entity): Document this is only for renamings
7647 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7648 required debug information in the case where we transform the object
7649 declaration into a renaming declaration.
7650 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7651 object
7652 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7653 Materialize_Entity.
7654
5b1e6aca
RD
76552011-08-02 Robert Dewar <dewar@adacore.com>
7656
7657 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7658 Suppress_Init_Procs.
7659 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7660 Suppress_Initialization/Initialization_Suppressed.
7661 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7662 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7663 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7664 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7665
5ad4969d
RD
76662011-08-02 Robert Dewar <dewar@adacore.com>
7667
7668 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7669 Minor reformatting.
7670
8c4ee6f5
AC
76712011-08-02 Ed Schonberg <schonberg@adacore.com>
7672
7673 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7674 only have inheritable classwide pre/postconditions.
7675
76762011-08-02 Javier Miranda <miranda@adacore.com>
7677
7678 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7679 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7680 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7681 checks if the external tag of a type is the same as the external tag
7682 of some other declaration.
7683
0b3d16c0
AC
76842011-08-02 Thomas Quinot <quinot@adacore.com>
7685
7686 * s-taskin.ads: Minor reformatting.
7687
76882011-08-02 Emmanuel Briot <briot@adacore.com>
7689
7690 * g-comlin.adb (Display_Help): swap the order in which it prints the
7691 short help and the general usage.
7692
76932011-08-02 Ed Schonberg <schonberg@adacore.com>
7694
7695 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7696 the aspect declarations and attach them to the generic copy for
7697 subsequent analysis.
7698 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7699 declarations of the generic tree to the new subprogram declarations.
7700 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7701 conditions that apply to a subprogram instance.
7702
77032011-08-02 Robert Dewar <dewar@adacore.com>
7704
7705 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7706
77072011-08-02 Ed Schonberg <schonberg@adacore.com>
7708
7709 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7710 private type with a tagged full view is not derived in the immediate
7711 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7712
4637729f
AC
77132011-08-02 Robert Dewar <dewar@adacore.com>
7714
7715 * exp_ch4.adb: Minor reformatting.
7716
77172011-08-02 Ed Schonberg <schonberg@adacore.com>
7718
7719 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7720 Ada2012 iterator, the loop will be rewritten during expansion into a
7721 while loop with a cursor and an element declaration. Do not analyze the
7722 body in this case, because if the container is for indefinite types the
7723 actual subtype of the elements will only be determined when the cursor
7724 declaration is analyzed.
7725
77262011-08-02 Arnaud Charlet <charlet@adacore.com>
7727
7728 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7729 size/alignment related attributes in CodePeer_Mode.
7730
77312011-08-02 Gary Dismukes <dismukes@adacore.com>
7732
7733 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7734 Prepend_Element, since this can result in the operation getting the
7735 wrong slot in the full type's dispatch table if the full type has
7736 inherited operations. The incomplete type's operation will get added
7737 to the proper position in the full type's primitives
7738 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7739 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7740 dispatching operations, since there are cases where nonprimitive
7741 subprograms can get added to the list of incomplete dependents (such
7742 as subprograms in nested packages).
7743 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7744 private part when determining whether to add a primitive with a
7745 parameter of a tagged incomplete type to the Private_Dependents list.
7746 Such primitives can also occur in the visible part, and should not have
7747 been excluded from being private dependents.
7748 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7749 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7750 list of a Taft-amendment incomplete type is a primitive before issuing
7751 an error that the full type must appear in the same unit. There are
7752 cases where nonprimitives can be in the list (such as subprograms in
7753 nested packages).
7754 * sem_disp.adb (Derives_From): Use correct condition for checking that
7755 a formal's type is derived from the type of the corresponding formal in
7756 the parent subprogram (the condition was completely wrong). Add
7757 checking that was missing for controlling result types being derived
7758 from the result type of the parent operation.
7759
4c60de0c
YM
77602011-08-02 Yannick Moy <moy@adacore.com>
7761
7762 * errout.adb (First_Node): minor renaming
7763 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7764 first node.
7765
f5afb270
AC
77662011-08-02 Yannick Moy <moy@adacore.com>
7767
7768 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7769 before accessing operands.
7770 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7771 decide whether an initialization expression respects SPARK rules, as
7772 the plain node is the expanded one. This allows for more valid warnings
7773 to be issued.
7774 * gnat_rm.texi: Minor update.
7775
77762011-08-02 Arnaud Charlet <charlet@adacore.com>
7777
7778 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7779 previous change.
7780
77812011-08-02 Robert Dewar <dewar@adacore.com>
7782
7783 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7784
77852011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7786
7787 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7788 loop statements and the element renaming declaration with a block when
7789 the element type is controlled.
7790
77912011-08-02 Yannick Moy <moy@adacore.com>
7792
7793 * sinfo.ads: Minor formatting.
7794
77952011-08-02 Ed Schonberg <schonberg@adacore.com>
7796
7797 * sem_aggr.adb (Add_Association): if the association has a box and no
7798 expression, use the Sloc of the aggregate itself for the new
7799 association.
7800 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7801 the Original_Node.
7802
db72f10a
AC
78032011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7804
7805 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7806 When a container is provided via a function call, generate a renaming
7807 of the function result. This avoids the creation of a transient scope
7808 and the premature finalization of the container.
7809 * exp_ch7.adb (Is_Container_Cursor): Removed.
7810 (Wrap_Transient_Declaration): Remove the supression of the finalization
7811 of the list controller when the declaration denotes a container cursor,
7812 it is not needed.
7813
78142011-08-02 Yannick Moy <moy@adacore.com>
7815
7816 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7817 node is from source, instead of the original node being from source.
7818 * sem_aggr.adb
7819 (Resolve_Array_Aggregate): refine the check for a static expression, to
7820 recognize also static ranges
7821 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7822 Array_Type_Declaration): postpone the test for the type being a subtype
7823 mark after the type has been resolved, so that component-selection and
7824 expanded-name are discriminated.
7825 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7826 to distinguish the case of an iteration scheme, so that an error is
7827 issed on a non-static range in SPARK except in an iteration scheme.
7828 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7829 In_Iter_Schm = True.
7830 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7831 user-defined operators so that they are allowed in renaming
7832 * sem_ch8.adb
7833 (Find_Selected_Component): refine the check for prefixing of operators
7834 so that they are allowed in renaming. Move the checks for restrictions
7835 on selector name after analysis discriminated between
7836 component-selection and expanded-name.
7837 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7838 concatenation argument of string type if it is static.
7839 * sem_util.adb, sem_util.ads
7840 (Check_Later_Vs_Basic_Declarations): add a new function
7841 Is_Later_Declarative_Item to decice which declarations are allowed as
7842 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7843 mode, add that renamings are considered as later items.
7844 (Enclosing_Package): new function to return the enclosing package
7845 (Enter_Name): correct the rule for homonyms in SPARK
7846 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7847 from source (result of expansion) to avoid issuing wrong warnings.
7848
78492011-08-02 Ed Schonberg <schonberg@adacore.com>
7850
7851 * errout.adb: On anything but an expression First_Node returns its
7852 argument.
7853
23685ae6
AC
78542011-08-02 Pascal Obry <obry@adacore.com>
7855
7856 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7857
78582011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7859
7860 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7861 Set the associated loop as the related expression of internally
7862 generated cursors.
7863 * exp_ch7.adb (Is_Container_Cursor): New routine.
7864 (Wrap_Transient_Declaration): Supress the finalization of the list
7865 controller when the declaration denotes a container cursor.
7866
78672011-08-02 Yannick Moy <moy@adacore.com>
7868
7869 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7870 command line now.
7871 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7872 expression is a simple expression. This check cannot be performed in
7873 the semantics, so just drop it.
7874 (P_Index_Or_Discriminant_Constraint): move check that the index or
7875 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7876 semantics. Other cases were previously checked in the semantics.
7877 * par-ch4.adb (P_Name): move checks that a selector name is not
7878 character literal or an operator symbol to Find_Selected_Component in
7879 the semantics
7880 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7881 declarations are not placed after later declarations in a separate
7882 procedure in Sem_Util (possibly not the best choice?), to be used both
7883 during parsing, for Ada 83 mode, and during semantic analysis, for
7884 SPARK mode.
7885 * par-endh.adb (Check_End): move check that end label is not missing
7886 to Process_End_Label in the semantics
7887 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7888 the special case for SPARK restriction
7889 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7890 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7891 parameter Force to issue the error message even on internal node (used
7892 for generated end label). Call Check_Restriction to check when an error
7893 must be issued. In SPARK mode, issue an error message even if the
7894 restriction is not set.
7895 (Check_Restriction): new procedure with an additional out parameter to
7896 inform the caller that a message has been issued
7897 * sem_aggr.adb: Minor modification of message
7898 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7899 instead of issuing an error message directly
7900 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7901 declarations are not placed after later declarations, by calling
7902 Check_Later_Vs_Basic_Declarations
7903 (Analyze_Subtype_Declaration): move here the check that an index or
7904 discriminant constraint must be a subtype mark. Change the check that
7905 a subtype of String must start at one so that it works on subtype marks.
7906 * sem_ch4.adb (Analyze_Call): move here the check that a named
7907 association cannot follow a positional one in a call
7908 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7909 instead of issuing an error message directly
7910 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7911 selector name is not a character literal or an operator symbol. Move
7912 here the check that the prefix of an expanded name cannot be a
7913 subprogram or a loop statement.
7914 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7915 procedure called from parsing and semantics to check that basic
7916 declarations are not placed after later declarations
7917 (Process_End_Label): move here the check that end label is not missing
7918
79192011-08-02 Arnaud Charlet <charlet@adacore.com>
7920
7921 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7922 representation clause in codepeer mode, since it confuses CodePeer and
7923 does not bring useful info.
7924
79252011-08-02 Ed Falis <falis@adacore.com>
7926
7927 * init.c: initialize fp hw on MILS.
7928
79292011-08-02 Ed Schonberg <schonberg@adacore.com>
7930
7931 * errout.adb (First_Node): for bodies, return the node itself (small
7932 optimization). For other nodes, do not check source_unit if the node
7933 comes from Standard.
7934
d2d9cc22
AC
79352011-08-02 Robert Dewar <dewar@adacore.com>
7936
7937 * exp_ch3.adb: Minor comment additions.
7938 * sem_ch13.adb: Minor reformatting.
7939
79402011-08-02 Pascal Obry <obry@adacore.com>
7941
7942 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7943
a01b9df6
AC
79442011-08-02 Robert Dewar <dewar@adacore.com>
7945
7946 * sem_attr.adb: Minor reformatting.
7947
79482011-08-02 Robert Dewar <dewar@adacore.com>
7949
7950 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7951 (Has_Default_Component_Value): Removed
7952 * einfo.ads Comment updates
7953 (Has_Default_Aspect): Replaces Has_Default_Value
7954 (Has_Default_Component_Value): Removed
7955 * exp_ch13.adb
7956 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7957 * exp_ch3.adb
7958 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7959 (Get_Simple_Init_Val): Handle Default_Value aspect
7960 (Needs_Simple_Initialization): Handle Default_Value aspect
7961 * exp_ch3.ads: Needs_Simple_Initialization
7962 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7963 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7964 * sem_ch13.adb
7965 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7966 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7967 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7968
79692011-08-02 Ed Schonberg <schonberg@adacore.com>
7970
7971 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7972 package containing iteration primitives.
7973 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7974
75c90775
AC
79752011-08-02 Ed Schonberg <schonberg@adacore.com>
7976
7977 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7978 "of", pre-analyze expression in case it is a function call with
7979 finalization actions that must be placed ahead of the loop.
7980 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7981 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7982
79832011-08-02 Geert Bosch <bosch@adacore.com>
7984
7985 * cstand.adb (Create_Float_Types): Only consider C's long double for
7986 Long_Long_Float, in addition to double.
7987
ded8909b
AC
79882011-08-02 Robert Dewar <dewar@adacore.com>
7989
7990 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7991 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7992 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7993 Minor reformatting.
7994
79952011-08-02 Ed Schonberg <schonberg@adacore.com>
7996
7997 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7998 indexed component.
7999
80002011-08-02 Javier Miranda <miranda@adacore.com>
8001
8002 * einfo.ads, einfo.adb
8003 (Original_Access_Type): Move this attribute to Node26 since there was
8004 an undocumented use of Node21 in E_Access_Subprogram_Type entities
8005 which causes conflicts and breaks the generation of the .NET compiler.
8006 (Interface_Name): Add missing documentation on JGNAT only uses of
8007 this attribute.
8008
70c34e1c
AC
80092011-08-02 Geert Bosch <bosch@adacore.com>
8010
8011 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
8012 (Find_Back_End_Float_Type): Likewise
8013 (Create_Back_End_Float_Types): Likewise
8014 (Create_Float_Types): Likewise
8015 (Register_Float_Type): Likewise
8016 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
8017 Nlist and split out type selection in new local Find_Base_Type function.
8018 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
8019 Nlist
8020 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
8021
80222011-08-02 Robert Dewar <dewar@adacore.com>
8023
8024 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
8025 alpha order).
8026 * opt.ads: Minor comment change.
8027 * sem_ch12.adb: Minor code reorganization.
8028
b715bc59
AC
80292011-08-02 Gary Dismukes <dismukes@adacore.com>
8030
8031 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
8032 subtype's list of rep items to the list on the full subtype in the case
8033 where the lists are the same.
8034
80352011-08-02 Geert Bosch <bosch@adacore.com>
8036
8037 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
8038 using the one from System.Strings, which also deallocates all strings.
8039
002bdd68
AC
80402011-08-02 Geert Bosch <bosch@adacore.com>
8041
8042 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
8043 function.
8044 * gcc-interface/Make-lang.in: Update dependencies.
8045
80462011-08-02 Olivier Hainque <hainque@adacore.com>
8047
8048 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
8049 end_locus.
8050
499769ec
AC
80512011-08-02 Javier Miranda <miranda@adacore.com>
8052
8053 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
8054 associated with anonymous access to subprograms.
8055
80562011-08-02 Geert Bosch <bosch@adacore.com>
8057
8058 * opt.ads
8059 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
8060 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
8061 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
8062 (Add_Symbol_Definition): Move to switch-c.adb
8063 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
8064 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
8065 (Add_Symbol_Definition): Move to switch-c.adb.
8066 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
8067 * sem_warn.adb
8068 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8069 Move to warnsw.adb.
8070 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
8071 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8072 Move to warnsw.adb.
8073 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
8074 (Add_Symbol_Definition): Moved from Prepcomp.
8075 * switch-c.ads: Update copyright notice. Use String_List instead of
8076 Argument_List, removing dependency on System.OS_Lib.
8077
aa1e353a
AC
80782011-08-02 Yannick Moy <moy@adacore.com>
8079
8080 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
8081 mode on initialization expression which does not respect SPARK
8082 restrictions.
8083 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
8084 if the tree referenced by its argument represents an initialization
8085 expression in SPARK, suitable for initializing an object in an object
8086 declaration.
8087
80882011-08-02 Javier Miranda <miranda@adacore.com>
8089
8090 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
8091 internally generated access to subprogram with its associated protected
8092 subprogram type.
8093 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
8094
15b682ca
GB
80952011-08-02 Geert Bosch <bosch@adacore.com>
8096
8097 * cstand.adb (Register_Float_Type): Print information about type to
8098 register, if the Debug_Flag_Dot_B is set.
8099 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
8100 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
8101 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
8102 with a requested precision of more than Max_Digits digits and no more
8103 than Max_Base_Digits digits, if a range specification is present and the
8104 Predefined_Float_Types list has a suitable type to derive from.
8105 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
8106 case of type completion with pragma Import
8107 * sem_prag.adb
8108 (Process_Import_Predefined_Type): Processing to complete a type
8109 with pragma Import. Currently supports floating point types only.
8110 (Set_Convention_From_Pragma): Do nothing without underlying type.
8111 (Process_Convention): Guard against absence of underlying type,
8112 which may happen when importing incomplete types.
8113 (Process_Import_Or_Interface): Handle case of importing predefined
8114 types. Tweak error message.
8115
f8726f2b
AC
81162011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8117
8118 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
8119 functions to previous change. Reorganize code slightly.
8120
81212011-08-02 Geert Bosch <bosch@adacore.com>
8122
8123 * back_end.ads (Register_Type_Proc): New call back procedure type for
8124 allowing the back end to provide information about available types.
8125 (Register_Back_End_Types): New procedure to register back end types.
8126 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
8127 available types.
8128 * cstand.adb (Back_End_Float_Types): New list for floating point types
8129 supported by the back end.
8130 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
8131 (Copy_Float_Type): New procedure to make new copies of predefined types.
8132 (Register_Float_Type): New call back procedure to populate the BEFT list
8133 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
8134 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
8135 (Create_Float_Types): New procedure to create entities for floating
8136 point types predefined in Standard, and put these and any remaining
8137 BEFTs on the Predefined_Float_Types list.
8138 * stand.ads (Predefined_Float_Types): New list for predefined floating
8139 point types that do not have declarations in package Standard.
8140
feecad68
AC
81412011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8142
8143 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
8144 entity node for the unit containing the parameter.
8145 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
8146 (Add_Inlined_Subprogram): Likewise.
8147 * gcc-interface/Make-lang.in: Update dependencies.
8148
81492011-08-02 Thomas Quinot <quinot@adacore.com>
8150
8151 * s-stusta.adb (Print): Make sure Pos is always initialized to a
8152 suitable value.
8153
12f0c50c
AC
81542011-08-02 Geert Bosch <bosch@adacore.com>
8155
8156 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
8157
81582011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8159
8160 * sem_type.adb (Covers): Move trivial case to the top and reuse the
8161 computed value of Base_Type.
8162
81632011-08-02 Yannick Moy <moy@adacore.com>
8164
8165 * restrict.adb (Check_Restriction): issue an error for any use of
8166 class-wide, even if the No_Dispatch restriction is not set.
8167 * sem_aggr.adb: Correct typos in comments and messages in formal mode
8168 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
8169 when completing a private extension, the type named in the private part
8170 is not the same as that named in the visible part.
8171 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
8172 of an inherited primitive operations of a tagged type or type extension
8173 that returns the tagged type.
8174 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
8175 function which returns True for an implicit operation inherited by the
8176 derived type declaration for the argument type.
8177 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
8178 order.
8179
fb86fe11
ES
81802011-08-02 Ed Schonberg <schonberg@adacore.com>
8181
8182 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
8183 Process_Bounds, to perform analysis with expansion of a range or an
8184 expression that is the iteration scheme for a loop.
8185 (Analyze_Iterator_Specification): If domain of iteration is given by a
8186 function call with a controlled result, as is the case if call returns
8187 a predefined container, ensure that finalization actions are properly
8188 generated.
8189 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
8190
62be5d0a
JM
81912011-08-02 Javier Miranda <miranda@adacore.com>
8192
8193 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
8194 * gcc-interface/Make-lang.in: Update dependencies.
8195
81962011-08-02 Javier Miranda <miranda@adacore.com>
8197
8198 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
8199 determine if the analysis is performed using N or Original_Node (N).
8200 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
8201 functionality of routine Is_Variable avoids code duplication.
8202 * checks.adb (Determine_Range): Handle temporaries generated by
8203 Remove_Side_Effects.
8204
82052011-08-02 Javier Miranda <miranda@adacore.com>
8206
8207 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
8208 expansion of the condition. Required since the previous analysis was
8209 done with expansion disabled (see Resolve_Quantified_Expression) and
8210 hence checks were not inserted and record comparisons have not been
8211 expanded.
8212
a20f4389
AC
82132011-08-02 Ed Falis <falis@adacore.com>
8214
8215 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8216 Update header.
8217
82182011-08-02 Bob Duff <duff@adacore.com>
8219
8220 * opt.ads: Minor comment fix.
8221
82222011-08-02 Bob Duff <duff@adacore.com>
8223
8224 * sem_ch12.adb (Analyze_Package_Instantiation,
8225 Analyze_Subprogram_Instantiation): Turn off style checking while
8226 analyzing an instance. Whatever style checks that apply to the generic
8227 unit should apply, so it makes no sense to apply them in an instance.
8228 This was causing trouble when compiling an instance of a runtime
8229 unit that violates the -gnatyO switch.
8230 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8231 one of the two case statements, causing spurious errors.
8232
82332011-08-02 Robert Dewar <dewar@adacore.com>
8234
8235 * uname.adb: Minor reformatting.
8236 * gnatcmd.adb: Minor reformatting.
8237 * exp_attr.adb: Minor reformatting.
8238
90878b12
AC
82392011-08-02 Ed Schonberg <schonberg@adacore.com>
8240
8241 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8242 No_Dispatching_Calls, do not look for the Assign primitive, because
8243 predefined primitives are not created in this case.
8244
82452011-08-02 Bob Duff <duff@adacore.com>
8246
8247 * stylesw.ads: Minor comment fixes.
8248
82492011-08-02 Robert Dewar <dewar@adacore.com>
8250
8251 * freeze.adb (Add_To_Result): New procedure.
8252
82532011-08-02 Jose Ruiz <ruiz@adacore.com>
8254
8255 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8256 time, if the specific run-time routines for handling streams of strings
8257 are not available, use the default mechanism.
8258
82592011-08-02 Arnaud Charlet <charlet@adacore.com>
8260
8261 * s-regpat.ads: Fix typo.
8262
82632011-08-02 Vincent Celier <celier@adacore.com>
8264
8265 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8266 not null, call it to create the in memory config project file without
8267 parsing an existing default config project file.
8268
82692011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8270
8271 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8272
82732011-08-02 Ed Schonberg <schonberg@adacore.com>
8274
8275 * sem_elim.adb: an abstract subprogram does not need an eliminate
8276 pragma for its descendant to be eliminable.
8277
82782011-08-02 Ed Falis <falis@adacore.com>
8279
8280 * init.c: revert to handling before previous checkin for VxWorks
8281 * s-intman-vxworks.adb: delete unnecessary declarations related to
8282 using Ada interrupt facilities for handling signals.
8283 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8284 * s-intman-vxworks.ads: Import __gnat_install_handler as
8285 Initialize_Interrupts.
8286 * s-taprop-vxworks.adb: Delete Signal_Mask.
8287 (Abort_Handler): change construction of mask to unblock exception
8288 signals.
8289
273adcdf
AC
82902011-08-02 Jerome Guitton <guitton@adacore.com>
8291
8292 * a-except-2005.adb (Raise_From_Signal_Handler): Call
8293 Debug_Raise_Exception before propagation starts.
8294
82952011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8296
8297 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8298 to Restriction_Check_Required.
8299 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8300 * sem_res.adb (Resolve_Call): Likewise.
8301 * sem_attr.adb (Check_Stream_Attribute): Likewise.
8302
83032011-08-02 Bob Duff <duff@adacore.com>
8304
8305 * stylesw.ads: Update comment.
8306 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8307 * errout.ads: Remove obsolete comment.
8308
83092011-08-02 Javier Miranda <miranda@adacore.com>
8310
8311 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8312 (Set_Is_Safe_To_Reevaluate): new procedure.
8313 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8314 assignment is allowed on safe-to-reevaluate variables.
8315 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8316 temporary created to remove side effects in expressions that use
8317 the secondary stack as safe-to-reevaluate.
8318 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8319 variables that are not true constants.
8320
6320f5e1
AC
83212011-08-02 Robert Dewar <dewar@adacore.com>
8322
8323 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8324 sem_res.adb, sem_ch6.adb: Minor reformatting.
8325
83262011-08-02 Jerome Guitton <guitton@adacore.com>
8327
8328 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8329
2fe829ae
ES
83302011-08-02 Ed Schonberg <schonberg@adacore.com>
8331
8332 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8333 not set Overridden_Operation if subprogram is an initialization
8334 procedure.
8335
e24329cd
YM
83362011-08-02 Yannick Moy <moy@adacore.com>
8337
8338 * par-ch6.adb: Correct obsolete name in comments
8339 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8340 which takes two message arguments (existing function takes one), with
8341 second message used for continuation.
8342 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8343 block statements that originate from a source block statement, not
8344 generated block statements
8345 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8346 symmetry with procedure case
8347 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8348 function to issue an error in formal mode if a package specification
8349 contains more than one tagged type or type extension.
8350 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8351 parameters matching formals of tagged types are objects (or ancestor
8352 type conversions of objects), not general expressions. Issue an error
8353 on view conversions that are not involving ancestor conversion of an
8354 extended type.
8355 (Resolve_Type_Conversion): in formal mode, issue an error on the
8356 operand of an ancestor type conversion which is not an object
8357 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8358 procedure so that it works also for actuals of function calls
8359 (Is_Actual_Tagged_Parameter): new function which determines if its
8360 argument is an actual parameter of a formal of tagged type in a
8361 subprogram call
8362 (Is_SPARK_Object_Reference): new function which determines if the tree
8363 referenced by its argument represents an object in SPARK
8364
176dadf6
AC
83652011-08-02 Robert Dewar <dewar@adacore.com>
8366
8367 * sem_ch3.adb: Minor reformatting
8368 Minor comment addition
8369 Minor error msg text change
8370
83712011-08-02 Javier Miranda <miranda@adacore.com>
8372
8373 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8374 function. Used to be more precise when we generate a variable plus one
8375 assignment to remove side effects in the evaluation of the Bound
8376 expressions.
8377 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8378 of the bound expression to force its re-analysis and thus expand the
8379 associated transient scope (if required). Code cleanup replacing the
8380 previous code that declared the constant entity by an invocation to
8381 routine Force_Evaluation which centralizes this work in the frontend.
8382
d8b962d8
AC
83832011-08-02 Robert Dewar <dewar@adacore.com>
8384
8385 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8386 (Base_Type): Now uses improved Is_Base_Type function
8387 * einfo.ads (Base_Type): Inline this function
8388
83892011-08-02 Robert Dewar <dewar@adacore.com>
8390
8391 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8392 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8393
83942011-08-02 Arnaud Charlet <charlet@adacore.com>
8395
8396 * gcc-interface/Make-lang.in: Update dependencies.
8397 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8398 targets.
8399
84002011-08-02 Yannick Moy <moy@adacore.com>
8401
8402 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8403 non-simple expression used in delta constraint
8404 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8405 index constraint which is not a subtype mark
8406 * par.adb: With and use Restrict
8407 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8408 mode on component type which is not a subtype mark and default
8409 expression on component
8410 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8411 of string which does not have a lower index bound equal to 1
8412 (Array_Type_Declaration): issue an error in formal mode on index or
8413 component type which is not a subtype mark, and on aliased keyword on
8414 component
8415 (Derived_Type_Declaration): issue an error in formal mode on interface,
8416 limited or abstract type
8417 (Record_Type_Declaration): issue an error in formal mode on interface
8418 (Record_Type_Definition): issue an error in formal mode on tagged types
8419 and type extensions not declared in the specification of a library unit
8420 package; on null non-tagged record; on variant part
8421
84222011-08-02 Vincent Celier <celier@adacore.com>
8423
8424 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8425 not declared for qualified library project when Library_Name is not
8426 declared, but Library_Dir is.
8427
84282011-08-02 Robert Dewar <dewar@adacore.com>
8429
8430 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8431 pragmas (affects aspects [Component_]Default_Value
8432 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8433 component type for the resolution
8434
f96b2d85
AC
84352011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8436
8437 * einfo.adb (Base_Type): Tune implementation for speed.
8438
84392011-08-02 Robert Dewar <dewar@adacore.com>
8440
8441 * freeze.adb: Minor reformatting.
8442
8b3c6430
AC
84432011-08-02 Thomas Quinot <quinot@adacore.com>
8444
8445 * scos.ads: Update comments.
8446
84472011-08-02 Ed Schonberg <schonberg@adacore.com>
8448
8449 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8450 base type, because the parent may be a subtype of a private type whose
8451 convention is established in a private part.
8452
84532011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8454
8455 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8456 statement in a block when the expansion of the return expression has
8457 created a finalization chain.
8458 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8459 with the parent node.
8460 Add N_Extended_Return_Statement to handle the case where a transient
8461 object declaration appears in the Return_Object_Declarations list of
8462 an extended return statement.
8463
84642011-08-02 Matthew Gingell <gingell@adacore.com>
8465
8466 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8467 unused parameter 'name'.
8468
84692011-08-02 Ed Schonberg <schonberg@adacore.com>
8470
8471 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8472 inherited operation, check whether its alias, which is the source
8473 operastion that it renames, has been marked eliminated.
8474
cae81f17
JM
84752011-08-02 Javier Miranda <miranda@adacore.com>
8476
8477 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8478 in-mode parameter whose type is an access type since it can be used to
8479 modify its designated object. Enforce code that handles as safe an
8480 access type that is not access-to-constant but it is the result of a
8481 previous removal of side-effects.
8482 (Remove_Side_Effects): Minor code reorganization of cases which require
8483 no action. Done to incorporate documentation on new cases uncovered
8484 working in this ticket: no action needed if this routine was invoked
8485 too early and the nodes are not yet decorated.
8486 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8487 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8488 were issued with actuals that are implicitly provided by
8489 Force_Evaluation.
8490
218e6dee
RD
84912011-08-02 Robert Dewar <dewar@adacore.com>
8492
8493 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8494
7a489a2b
AC
84952011-08-02 Yannick Moy <moy@adacore.com>
8496
8497 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8498 to issue an error in formal mode on attribute not supported in this mode
8499 (Analyze_Attribute): issue errors on standard attributes not supported
8500 in formal mode.
8501 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8502 comment, and issue error in formal mode on modulus which is not a power
8503 of 2.
8504 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8505 range.
8506 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8507 subtype mark.
8508 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8509 operator on modular type (except 'not').
8510
85112011-08-02 Robert Dewar <dewar@adacore.com>
8512
8513 * gnat_rm.texi: Minor reformatting.
8514
cb7fa356
AC
85152011-08-02 Arnaud Charlet <charlet@adacore.com>
8516
8517 * s-osinte-linux.ads: Minor comment update and reformatting.
8518 * i-cexten.ads: Make this unit pure, as for its parent.
8519 Will allow its usage in more contexts if needed.
8520
85212011-08-02 Robert Dewar <dewar@adacore.com>
8522
8523 * s-utf_32.ads: Minor comment fix.
8524
85252011-08-02 Ed Schonberg <schonberg@adacore.com>
8526
8527 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8528 operation of a tagged synchronized type, handle the case where the
8529 controlling argument is overloaded.
8530
85312011-08-02 Yannick Moy <moy@adacore.com>
8532
8533 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8534 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8535 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8536 SPARK mode and formal verification mode on processing SPARK restriction
8537 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8538 requiring consistency checking.
8539
5cc9353d
RD
85402011-08-02 Robert Dewar <dewar@adacore.com>
8541
8542 * sem_res.adb: Minor reformatting.
8543
e51537ff
RD
85442011-08-02 Robert Dewar <dewar@adacore.com>
8545
8546 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8547 a-cforse.ads: Remove unneeded with of Ada.Containers
8548 Remove commented out pragma Inline's
8549 Move specifications of new subprograms to the actual specs
8550
83fa09c5
AC
85512011-08-02 Yannick Moy <moy@adacore.com>
8552
8553 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8554 a-cforse.ads: Update comments.
8555
85562011-08-02 Ed Schonberg <schonberg@adacore.com>
8557
8558 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8559
d11cfaf8
RD
85602011-08-02 Robert Dewar <dewar@adacore.com>
8561
8562 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8563 a-cforse.ads, a-cofove.ads: Minor reformatting.
8564
300b98bb
AC
85652011-08-02 Claire Dross <dross@adacore.com>
8566
8567 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8568 a-cofove.ads: Add comments.
8569
85702011-08-02 Yannick Moy <moy@adacore.com>
8571
8572 * gnat_rm.texi: Document formal containers.
8573
85742011-08-02 Emmanuel Briot <briot@adacore.com>
8575
8576 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8577 are empty sections.
8578
19fb051c
AC
85792011-08-02 Robert Dewar <dewar@adacore.com>
8580
8581 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8582 reformatting.
8583
85842011-08-02 Robert Dewar <dewar@adacore.com>
8585
8586 * aspects.adb: New aspects Default_Value and Default_Component_Value
8587 New format of Aspect_Names table checks for omitted entries
8588 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8589 handling of boolean aspects for derived types.
8590 New aspects Default_Value and Default_Component_Value
8591 New format of Aspect_Names table checks for omitted entries
8592 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8593 (Has_Default_Value): New flag
8594 (Has_Default_Component_Value): New flag
8595 (Has_Default_Value): New flag
8596 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8597 table.
8598 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8599 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8600 Default_Value and Default_Component_Value
8601 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8602 New aspects Default_Value and Default_Component_Value
8603 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8604 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8605
86062011-08-02 Vincent Celier <celier@adacore.com>
8607
8608 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8609 inherit library kind.
8610
86112011-08-02 Ed Schonberg <schonberg@adacore.com>
8612
8613 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8614 Minor reformatting.
8615
86162011-08-02 Robert Dewar <dewar@adacore.com>
8617
8618 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8619
5f7747af
AC
86202011-08-02 Yannick Moy <moy@adacore.com>
8621
8622 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8623
86242011-08-02 Robert Dewar <dewar@adacore.com>
8625
8626 * impunit.adb: Add comment.
8627
a5fe697b
AC
86282011-08-02 Yannick Moy <moy@adacore.com>
8629
8630 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8631 qualification of aggregates in formal mode
8632 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8633 another aggregate
8634 (Resolve_Aggregate): complete the test that an aggregate is adequately
8635 qualified in formal mode
8636
86372011-08-02 Pascal Obry <obry@adacore.com>
8638
8639 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8640 * mlib-prj.adb: Supress warning when compiling binder generated file.
8641 (Build_Library): Supress all warnings when compiling the binder
8642 generated file.
8643
bd65a2d7 86442011-08-02 Yannick Moy <moy@adacore.com>
d4487611 8645
bd65a2d7
AC
8646 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8647 from here...
8648 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8649 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8650 Add with/use clauses to make Check_Formal_Restriction visible
8651
86522011-08-02 Ed Schonberg <schonberg@adacore.com>
8653
8654 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8655 in-parameters when type of the generic formal is private in the generic
8656 spec and non-private in the body.
8657
86582011-08-02 Claire Dross <dross@adacore.com>
8659
8660 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8661 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8662 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8663 * impunit.adb, Makefile.rtl: Take new files into account.
d4487611
AC
8664
86652011-08-02 Robert Dewar <dewar@adacore.com>
8666
8667 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8668 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8669
bd434b3f
YM
86702011-08-02 Yannick Moy <moy@adacore.com>
8671
8672 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8673 formal mode
8674 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8675 matching static array bounds, taking into account the special case of
8676 string literals
8677 * sem_ch3.adb: Typo in comment.
8678
fe5d3068
YM
86792011-08-02 Yannick Moy <moy@adacore.com>
8680
8681 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8682 which issues an error in formal mode if its argument node is originally
8683 from source
8684 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8685 has a discriminant specification so that it does not include the case
8686 of derived types
8687 (Derived_Type_Declaration): move here the test that a derived type has a
8688 discriminant specification
8689 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8690 first element of a component association before accessing its choices
8691 (presence of component association is not enough)
8692 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8693 declaration is a library item before accessing the next element in a
8694 list, as library items are not member of lists
8695 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8696 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8697 Check_Formal_Restriction whenever possible.
8698
b60a3f26
AC
86992011-08-02 Ed Schonberg <schonberg@adacore.com>
8700
8701 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8702 reference when needed.
8703
87042011-08-02 Bob Duff <duff@adacore.com>
8705
8706 * gnat_ugn.texi: Fix typo.
8707
87082011-08-02 Vincent Celier <celier@adacore.com>
8709
8710 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8711 archive file name. Do not use the full path name of archives for Open
8712 VMS.
8713
eaba57fb
RD
87142011-08-02 Robert Dewar <dewar@adacore.com>
8715
8716 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8717 Analyze_Aspect_Specifications
8718 * sem_ch13.adb
8719 (Analyze_Aspect_Specifications): New handling for boolean aspects
8720 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8721 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8722 sequence for Analyze_Aspect_Specifications
8723 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8724 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8725
87262011-08-02 Robert Dewar <dewar@adacore.com>
8727
8728 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8729 aspects, since these no longer exist.
8730
87312011-08-02 Robert Dewar <dewar@adacore.com>
8732
8733 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8734 semicolon, do not try to see if there are aspects following it.
8735 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8736 aspect spec.
8737
8830d1d2
AC
87382011-08-02 Robert Dewar <dewar@adacore.com>
8739
8740 * sem_ch8.adb, aspects.ads: Minor reformatting.
8741
87422011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8743
8744 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8745 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8746 extracted from...
8747 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8748
7ff2d234
AC
87492011-08-02 Yannick Moy <moy@adacore.com>
8750
8751 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8752 mode on subprogram declaration outside of package specification, unless
8753 it is followed by a pragma Import
8754 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8755 Access_Type_Declaration): issue error in formal mode on access type
8756 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8757 incomplete type
8758 (Analyze_Object_Declaration): issue error in formal mode on object
8759 declaration which does not respect SPARK restrictions
8760 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8761 declaration which does not respect SPARK restrictions
8762 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8763 error in formal mode on digits or delta constraint
8764 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8765 decimal fixed point type
8766 (Derived_Type_Declaration): issue error in formal mode on derived type
8767 other than type extensions of tagged record types
8768 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8769 with check on access definition
8770 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8771 mode on protected definition.
8772 (Analyze_Task_Definition): issue error in formal mode on task definition
8773
87742011-08-02 Robert Dewar <dewar@adacore.com>
8775
8776 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8777
806f6d37
AC
87782011-08-02 Javier Miranda <miranda@adacore.com>
8779
8780 * sem_ch6.adb (Can_Override_Operator): New function.
8781 (Verify_Overriding_Indicator): Add missing code to check overriding
8782 indicator in operators. Fixes regression.
8783 (Check_Overriding_Indicator): Minor reformating after replacing the
8784 code that evaluates if the subprogram can override an operator by
8785 invocations to the above new function.
8786 * einfo.adb
8787 (Write_Field26_Name): Add missing code to ensure that, following
8788 the documentation in einfo.ads, this field is not shown as attribute
8789 "Static_Initialization" on non-dispatching functions.
8790
87912011-08-02 Jose Ruiz <ruiz@adacore.com>
8792
8793 * sem_res.adb (Resolve_Call): A call to
8794 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8795 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8796 i.e., when the second parameter is of type Time_Span.
8797
87982011-08-02 Vincent Celier <celier@adacore.com>
8799
8800 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8801 with an archive instead of -L<library dir> -l<library name>.
8802
88032011-08-02 Ed Schonberg <schonberg@adacore.com>
8804
8805 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8806 mark the base types In_Use in addition to making the operations
8807 use_visible.
8808
88092011-08-02 Ed Falis <falis@adacore.com>
8810
8811 * init.c: add and setup __gnat_signal_mask for the exception signals
8812 * s-inmaop-vxworks.adb: new file.
8813 * s-intman-vxworks.adb: remove unnecessary initializations and
8814 simplify remaining
8815 * s-intman-vxworks.ads: remove unnecessary variable
8816 * s-taprop-vxworks.adb: simplify signal initialization
8817
780d052e
RD
88182011-08-02 Robert Dewar <dewar@adacore.com>
8819
8820 * sem_ch8.adb: Minor code reorganization, comment updates.
8821
88222011-08-02 Robert Dewar <dewar@adacore.com>
8823
8824 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8825 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8826 here from Sem_Res.
8827 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8828 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8829
29efbb8c
ES
88302011-08-02 Ed Schonberg <schonberg@adacore.com>
8831
8832 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8833 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8834 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8835 use_type_clauses, to handle more efficiently use_type and use_all_type
8836 constructs.
8837 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8838 Ada2012 Use_All_Type clause.
8839 (Use_Class_Wide_Operations): new procedure.
8840
b0186f71
AC
88412011-08-02 Robert Dewar <dewar@adacore.com>
8842
8843 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8844 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8845 expression to expression function.
8846
88472011-08-02 Ed Schonberg <schonberg@adacore.com>
8848
8849 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8850 if types are compatible.
8851
88522011-08-02 Yannick Moy <moy@adacore.com>
8853
8854 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8855 returns True if its argument array types have same dimension and same
8856 static bounds at each index.
8857 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8858 OUT or IN OUT paramaters which are not view conversions in SPARK.
8859 (Resolve_Arithmetic_Op): issue an error in formal mode on
8860 multiplication or division with operands of fixed point types which are
8861 not qualified or explicitly converted.
8862 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8863 Boolean or array type (except String) operands.
8864 (Resolve_Equality_Op): issue an error in formal mode on equality
8865 operators for array types other than String with non-matching static
8866 bounds.
8867 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8868 for array types with non-matching static bounds. Factorize the code in
8869 Matching_Static_Array_Bounds.
8870 (Resolve_Qualified_Expression): issue an error in formal mode on
8871 qualified expressions for array types with non-matching static bounds.
8872 (Resolve_Type_Conversion): issue an error in formal mode on type
8873 conversion for array types with non-matching static bounds
8874
767bb4e8
AC
88752011-08-02 Robert Dewar <dewar@adacore.com>
8876
8877 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8878
88792011-08-02 Ed Schonberg <schonberg@adacore.com>
8880
8881 * par-ch9.adb: save location of entry for proper error message.
8882
4ac2477e
JM
88832011-08-02 Javier Miranda <miranda@adacore.com>
8884
8885 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8886 (Use_Full_View) which permits this routine to climb through the
8887 ancestors using the full-view of private parents.
8888 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8889 Use_Full_View to true in calls to Is_Ancestor.
8890 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8891 true in call to Is_Ancestor.
8892 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8893 Use_Full_View to true in call to Is_Ancestor.
8894 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8895 call to Is_Ancestor.
8896 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8897 Use_Full_View to true in calls to Is_Ancestor.
8898 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8899 Make_Select_Specific_Data_Table, Register_Primitive,
8900 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8901 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8902 to true in call to Is_Ancestor.
8903 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8904 Use_Full_View to true in calls to Is_Ancestor.
8905 * exp_cg.adb
8906 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8907 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8908
9f90d123
AC
89092011-08-02 Robert Dewar <dewar@adacore.com>
8910
8911 * gnat_rm.texi: Minor reformatting.
8912 * sem_prag.adb: Minor reformatting.
8913
89142011-08-02 Tristan Gingold <gingold@adacore.com>
8915
8916 * vms_data.ads: Add VMS qualifier for -gnateP.
8917
89182011-08-02 Robert Dewar <dewar@adacore.com>
8919
8920 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8921 * par-ch7.adb (P_Package): Proper placement of aspects for package
8922 decl/instantiation.
8923 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8924 (End_Statements): Add Is_Sloc parameterr
8925 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8926 (Check_End): Ad Is_Sloc parameter
8927 (End_Statements): Add Is_Sloc parameterr
8928
89292011-08-02 Vincent Celier <celier@adacore.com>
8930
8931 * ug_words: Add VMS qualifier equivalent to -gnateP:
8932 /SYMBOL_PREPROCESSING.
8933
89342011-08-02 Jose Ruiz <ruiz@adacore.com>
8935
8936 * gnat-style.texi: For hexadecimal numeric literals the typical
8937 grouping of digits is 4 to represent 2 bytes.
8938 A procedure spec which is split into several lines is indented two
8939 characters.
8940
89412011-08-02 Yannick Moy <moy@adacore.com>
8942
8943 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8944 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8945 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8946 properly qualified
8947 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8948 choice in array aggregate
8949 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8950 mark as ancestor
8951 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8952 positional and named aggregate for record, or others in record
8953 aggregate, or multiple choice in record aggregate
8954 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8955 array operands to logical operations AND, OR and XOR do not have the
8956 same static lower and higher bounds
8957 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8958
2933b16c
RD
89592011-08-01 Robert Dewar <dewar@adacore.com>
8960
8961 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8962 Replaces Last_Source_Node_In_Sequence.
8963 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8964 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8965 parens and blank in string (this was inconsistently implemented).
8966 * errout.ads
8967 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8968 blank in string (this was inconsistently implemented).
8969 * gnat1drv.adb
8970 (Set_Global_Switches): Set formal mode switches appropriately
8971 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8972 * par-prag.adb
8973 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8974 call Set_Error_Msg_Lang to set "spark" as language name.
8975 * par.adb: Remove unnecessary call to set formal language for errout
8976 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8977 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8978 name.
8979 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8980 calls to it, moved after resolution so that types are known
8981 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8982 result of concatenation is not of type String
8983 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8984 concatenation is not properly restricted
8985 * gnat_rm.texi: Add doc on pragma Spark_95.
8986 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8987 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8988 * gcc-interface/Make-lang.in: Update dependencies.
8989
05dbd302
AC
89902011-08-01 Javier Miranda <miranda@adacore.com>
8991
8992 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8993 condition that detects if the overridden operation must replace an
8994 existing entity.
8995
89962011-08-01 Javier Miranda <miranda@adacore.com>
8997
8998 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8999 code declarations inserted by Insert_Actions in each alternative of the
9000 N_Case_Expression node.
9001
90022011-08-01 Robert Dewar <dewar@adacore.com>
9003
9004 * sem_ch6.adb: Minor code reorganization.
9005 * sem_util.adb: Minor reformatting.
9006
af9e051f
PO
90072011-08-01 Pascal Obry <obry@adacore.com>
9008
9009 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
9010 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
9011
1d801f21
AC
90122011-08-01 Yannick Moy <moy@adacore.com>
9013
9014 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
9015 literal or operator symbol which is prefixed
9016 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
9017 mode on access attributes.
9018 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
9019 that concatenation operands are properly restricted in formal mode
9020 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
9021 Analyze_Concatenation_Operand. Issue an error in formal mode if the
9022 result of the concatenation has a type different from String.
9023 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
9024 Analyze_Quantified_Expression, Analyze_Slice,
9025 Analyze_Null): issue an error in formal mode on unsupported constructs
9026 * sem_ch5.adb
9027 (Analyze_Block_Statement): only issue error on source block statement
9028 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
9029 function which returns the last node in a list of nodes for which
9030 Comes_From_Source returns True, if any
9031 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
9032 Last_Source_Node_In_Sequence
9033 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9034 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
9035 mode on unsupported constructs
9036 * sem_ch9.adb Do not return after issuing error in formal mode, as the
9037 rest of the actions may be needed later on since the error is marked as
9038 not serious.
9039 * sinfo.ads: Typos in comments.
9040
90412011-08-01 Pascal Obry <obry@adacore.com>
9042
9043 * projects.texi: Minor editing.
9044
53beff22
YM
90452011-08-01 Yannick Moy <moy@adacore.com>
9046
9047 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
9048 insertion character ~~
9049 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
9050 (Set_Error_Msg_Lang): new procedure which fixes the language for use
9051 with insertion character ~~
9052 (Set_Msg_Text): treat insertion character ~~
9053 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
9054 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
9055 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
9056 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
9057 errors related to the formal language restriction not serious
9058 (insertion character |).
9059 * par.adb (Par): set formal language for error messages if needed
9060 * sem_ch6.adb (Check_Missing_Return): take into account possible
9061 generated statements at the end of the function
9062 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
9063 enumeration value to define a new pragma SPARK_95
9064 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
9065 SPARK_Version): new type and variables to store the SPARK version
9066 (none by default).
9067 (SPARK_Mode): return True when SPARK_Version is set
9068 * par-prag.adb: Correct indentation
9069 (Prag): take Pragma_SPARK_95 into account
9070 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
9071 into account.
9072
8d606a78
RD
90732011-08-01 Robert Dewar <dewar@adacore.com>
9074
9075 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
9076 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
9077 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
9078
1982d5a8
PO
90792011-08-01 Pascal Obry <obry@adacore.com>
9080
9081 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
9082 Target_Name to Get_Path call.
9083 (Parse_Single_Project): Likewise.
9084 (Post_Parse_Context_Clause): Likewise.
9085 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
9086 Call Initialise_Project_Path with the proper Target_Name.
9087 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
9088 search path.
9089 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
9090 with the proper Target_Name.
9091 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
9092 Part.Parse routine.
9093 (Parse_Project_And_Apply_Config): Likewise.
9094 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
9095 This is fine as this part of the code is supporting only native
9096 compilation.
9097 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
9098 is fine as this part of the code is supporting only native compilation.
9099
0d53d36b
AC
91002011-08-01 Yannick Moy <moy@adacore.com>
9101
9102 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
9103 of homonym, unless the homonym is one of the cases allowed in SPARK
9104 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
9105 package declaration occurring after a body.
9106
91072011-08-01 Robert Dewar <dewar@adacore.com>
9108
9109 * checks.adb, exp_ch4.adb: Minor reformatting.
9110
91112011-08-01 Javier Miranda <miranda@adacore.com>
9112
9113 * einfo.ads (Access_Disp_Table): Fix documentation.
9114 (Dispatch_Table_Wrappers): Fix documentation.
9115
91162011-08-01 Pascal Obry <obry@adacore.com>
9117
9118 * prj-env.adb, prj-env.ads: Minor reformatting.
9119
8ed68165
AC
91202011-08-01 Yannick Moy <moy@adacore.com>
9121
9122 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
9123 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9124 procedures out of these packages.
2c7f9cc0 9125 * errout.ads, errout.adb
8ed68165
AC
9126 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9127 procedures in of this package
9128 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
9129 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
9130 on misplaced later vs initial declarations, like in Ada 83
9131 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
9132 formal mode on attribute of private type whose full type declaration
9133 is not visible
9134 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
9135 package declaration inside a package specification
9136 (Analyze_Full_Type_Declaration): issue error in formal mode on
9137 controlled type or discriminant type
9138 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
9139 user-defined operator means that it should come from the source
9140 (New_Overloaded_Entity): issue error in formal mode on overloaded
9141 entity.
9142 * sem_ch6.ads, sem_ch13.ads: typos in comments.
9143
91442011-08-01 Thomas Quinot <quinot@adacore.com>
9145
9146 * atree.adb: Minor reformatting.
9147 * checks.adb: Minor reformatting.
9148
4230bdb7
AC
91492011-08-01 Vincent Celier <celier@adacore.com>
9150
9151 * s-parame-vms-ia64.ads: Fix typo in comment
9152 Minor reformatting
9153 * s-parame-vms-restrict.ads: Removed, unused.
9154
91552011-08-01 Javier Miranda <miranda@adacore.com>
9156
9157 * exp_ch3.adb
9158 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
9159 * sem_ch3.adb
9160 (Constrain_Index): Remove side effects in the evaluation of the bounds.
9161 * sem_ch3.ads, sem_ch3.adb
9162 (Is_Constant_Bound): New extended version of the subprogram that was
9163 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
9164 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
9165 * sem_aux.ads (Constant_Value): Fix typo in comment.
9166 * checks.adb (Generate_Index_Checks): New implementation which, for
9167 array objects with constant bounds, generates the runtime check
9168 referencing the bounds of the array type. For other cases this routine
9169 provides its previous behavior obtaining such values from the array
9170 object.
9171 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
9172 parent type.
9173 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
9174 we cannot have semantic interpretations of the new node.
9175
2010d078
AC
91762011-08-01 Ed Schonberg <schonberg@adacore.com>
9177
9178 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
9179 expressions.
9180
91812011-08-01 Arnaud Charlet <charlet@adacore.com>
9182
9183 * sem_ch8.adb: Minor code editing.
9184 * s-vxwext.adb: Remove trailing space.
9185 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
9186 consistency with other files.
9187
91882011-08-01 Thomas Quinot <quinot@adacore.com>
9189
9190 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
9191
91922011-08-01 Ed Schonberg <schonberg@adacore.com>
9193
9194 * par-ch10.adb: reject parameterized expressions as compilation unit.
9195 * sem_ch4.adb: handle properly conditional expression with overloaded
9196 then_clause and no else_clause.
9197
91982011-08-01 Tristan Gingold <gingold@adacore.com>
9199
9200 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
9201 like done by System.Aux_DEC.
9202 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
9203
daec8eeb
YM
92042011-08-01 Yannick Moy <moy@adacore.com>
9205
9206 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
9207 missing label at end of declaration (subprogram or package)
9208 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
9209 of positional and named parameter association
9210 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9211 Error_Msg_SP which adds a prefix to the error message giving the name
9212 of the formal language analyzed
9213 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9214 access result type in subprogram, unconstrained array as result type,.
9215 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9216 procedure
9217 * sem_ch8.adb: Code clean up.
9218
38171f43
AC
92192011-08-01 Javier Miranda <miranda@adacore.com>
9220
9221 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9222 * einfo.ads (Access_Disp_Table): Fix documentation.
9223 (Dispatch_Table_Wrappers): Fix documentation.
9224 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9225 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9226 to enforce the documentation of this attribute.
9227 (Set_Is_Interface): Cleanup the assertion.
9228 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9229 the Underlying_Type entity before reading attribute Access_Disp_Table.
9230 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9231 Locate the Underlying_Type before reading attribute Access_Disp_Table.
9232 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9233 the Underlying_Type entity before reading attribute Access_Disp_Table.
9234 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9235 Locate the Underlying_Type entity before reading attribute
9236 Access_Disp_Table.
9237
92382011-08-01 Ed Schonberg <schonberg@adacore.com>
9239
9240 * s-poosiz.ads: Additional overriding indicators.
9241
92422011-08-01 Yannick Moy <moy@adacore.com>
9243
9244 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9245 formal mode.
9246 (Analyze_Iteration_Scheme): issue error in formal mode when loop
9247 parameter specification does not include a subtype mark.
9248 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9249 formal mode on abstract subprogram.
9250 (Analyze_Subprogram_Specification): issue error in formal mode on
9251 user-defined operator.
9252 (Process_Formals): issue error in formal mode on access parameter and
9253 default expression.
9254 * sem_ch9.adb (Analyze_Abort_Statement,
9255 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9256 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9257 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9258 Analyze_Requeue, Analyze_Selective_Accept,
9259 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9260 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9261 issue error in formal mode on user-defined raise statement.
9262
1f250383
AC
92632011-08-01 Thomas Quinot <quinot@adacore.com>
9264
9265 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9266 declaration being hidden when overriding an implicit inherited
9267 subprogram.
9268 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9269 (-gnats), do not complain about a source file that contains only a
9270 pragma No_Body.
9271
92722011-08-01 Ed Schonberg <schonberg@adacore.com>
9273
9274 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9275 variable if already set.
9276
607d0635
AC
92772011-08-01 Arnaud Charlet <charlet@adacore.com>
9278
9279 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9280 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9281 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9282 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9283 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9284 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9285 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9286 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9287 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9288 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9289 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9290 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9291 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9292 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9293 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9294 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9295 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9296 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9297 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9298 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9299 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9300 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9301 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9302 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9303 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9304 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9305 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9306 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9307 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9308 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9309 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9310 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9311 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9312 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9313 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9314 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9315 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9316 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9317 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9318 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9319 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9320 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9321 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9322 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9323 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9324 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9325 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9326 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9327 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9328 Use GNAT instead of GNARL.
9329
93302011-08-01 Bob Duff <duff@adacore.com>
9331
9332 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9333 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9334 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9335 reformatting.
9336
93372011-08-01 Yannick Moy <moy@adacore.com>
9338
9339 * debug.adb (d.D) reverve flag for the SPARK mode
9340 (d.E) reverve flag for SPARK generation mode
9341 (d.F) reverve flag for Why generation mode
2c7f9cc0 9342 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
607d0635
AC
9343 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9344 functions which return True when the corresponding modes are set
9345 (Formal_Language): return "spark" or "alfa" when in formal verification
9346 mode.
9347 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9348 Error_Msg to prefix the error message with a tag giving the formal
9349 language
9350 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9351 message with a tag giving the formal language
9352 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9353 block statement
9354 (Analyze_Case_Statement): issue error in formal mode on case statement
9355 with a single "others" case alternative
9356 (Analyze_Exit_Statement): issue errors in formal mode on exit
9357 statements which do not respect SPARK restrictions
9358 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9359 (Check_Unreachable_Code): always issue an error (not a warning) in
9360 formal mode on unreachable code (concerns both code after an infinite
9361 loop and after an unconditional jump, both not allowed in SPARK)
9362 * sem_ch6.adb (Analyze_Return_Statement): add call to
9363 Set_Return_Present for a procedure containing a return statement
9364 (already done for functions in Analyze_Function_Return)
9365 (Analyze_Function_Return): issue error in formal mode on extended
9366 return or if return is not last statement in function
9367 (Check_Missing_Return): issue error in formal mode if function does
9368 not end with return or if procedure contains a return
9369 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9370 function to detect if there is an inner scope of its parameter S which
9371 is a loop.
9372
93732011-08-01 Thomas Quinot <quinot@adacore.com>
9374
9375 * sem_ch6.ads: Minor reformatting.
9376
d8b3ccb9
AC
93772011-08-01 Javier Miranda <miranda@adacore.com>
9378
9379 * sem_util.adb (Abstract_Interface_List): Complete condition when
9380 processing private type declarations to avoid reading unavailable
9381 attribute.
9382 (Is_Synchronized_Tagged_Type): Complete condition when processing
9383 private extension declaration nodes to avoid reading unavailable
9384 attribute.
9385
93862011-08-01 Thomas Quinot <quinot@adacore.com>
9387
9388 * sem_ch3.adb: Minor reformatting.
9389
93902011-08-01 Thomas Quinot <quinot@adacore.com>
9391
9392 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9393 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9394 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9395 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9396 for VMS, instead parametrize the common implementation with
9397 System.Parameters declarations.
9398
0bb9276c
AC
93992011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9400
9401 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9402
94032011-08-01 Tristan Gingold <gingold@adacore.com>
9404
9405 * seh_init.c: Fix SEH handler installation on win64.
9406
94072011-08-01 Ed Schonberg <schonberg@adacore.com>
9408
9409 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9410 double analysis of an anonymous access to subprogram, because it can
9411 lead to improper sharing of profiles and a back-end crash.
9412
6a2e4f0b
AC
94132011-08-01 Robert Dewar <dewar@adacore.com>
9414
9415 * make.adb, sem_ch4.adb: Minor reformatting.
9416 * gcc-interface/Make-lang.in: Update dependencies.
9417 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9418
94192011-08-01 Arnaud Charlet <charlet@adacore.com>
9420
9421 * gnat_rm.texi: Fix definition of Long_Integer.
9422
94232011-08-01 Ed Schonberg <schonberg@adacore.com>
9424
9425 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9426 to prevent storage exhaustion.
9427 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9428 finalized is a function body, insert the cleanup code before the final
9429 return statement, to prevent spurious warnings.
9430 * s-pooglo.ads: add overriding indicator.
9431
4561baf7
ES
94322011-08-01 Ed Schonberg <schonberg@adacore.com>
9433
9434 * sem_ch4.adb (Operator_Check): improve error message when both a
9435 with_clause and a use_clause are needed to make operator usage legal.
9436 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9437 determine whether a compilation unit is visible within an other,
9438 either through a with_clause in the current unit, or a with_clause in
9439 its library unit or one one of its parents.
9440
383e179e
AC
94412011-08-01 Ed Schonberg <schonberg@adacore.com>
9442
9443 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9444 over an arbitrary expression of an array or container type.
9445 * lib-xref.adb: clarify comment.
9446
94472011-08-01 Bob Duff <duff@adacore.com>
9448
9449 * einfo.ads: Minor reformatting.
9450 * debug.adb: Minor comment improvement.
9451
94522011-08-01 Javier Miranda <miranda@adacore.com>
9453
9454 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9455 consider hidden subprograms as valid candidates.
9456
94572011-08-01 Arnaud Charlet <charlet@adacore.com>
9458
9459 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9460
94612011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9462
9463 * gnat_ugn.texi: Fix typo.
9464
61c161b2
AC
94652011-08-01 Robert Dewar <dewar@adacore.com>
9466
9467 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9468 lib-xref.adb: Minor reformatting
9469
94702011-08-01 Gary Dismukes <dismukes@adacore.com>
9471
9472 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9473 when to generate a call to Move_Final_List.
9474 (Has_Controlled_Parts): Remove this function.
9475
84df40f7
AC
94762011-08-01 Geert Bosch <bosch@adacore.com>
9477
9478 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9479 "," in choice list.
9480
94812011-08-01 Thomas Quinot <quinot@adacore.com>
9482
9483 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9484 explicit raise of a predefined exception as Comes_From_Source if the
9485 original N_Raise_Statement comes from source.
9486
94872011-08-01 Robert Dewar <dewar@adacore.com>
9488
9489 * sinfo.ads: Add comment.
9490 * sem_ch6.adb: Minor reformatting.
9491
94922011-08-01 Robert Dewar <dewar@adacore.com>
9493
9494 * freeze.adb (Freeze_Entity): Refine check for bad component size
9495 clause to avoid rejecting confirming clause when atomic/aliased present.
9496
94972011-08-01 Ed Schonberg <schonberg@adacore.com>
9498
9499 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9500 better determine whether an entity reference is a write.
9501 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9502 subcomponent.
9503 * lib-xref.adb (Output_References): Do no suppress a read reference at
9504 the same location as an immediately preceeding modify-reference, to
9505 handle properly in-out actuals.
9506
95072011-08-01 Tristan Gingold <gingold@adacore.com>
9508
9509 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9510
95112011-08-01 Quentin Ochem <ochem@adacore.com>
9512
9513 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9514 heap to compute the result.
9515
c7f0d2c0
AC
95162011-08-01 Robert Dewar <dewar@adacore.com>
9517
9518 * atree.ads: Minor reformatting.
9519
95202011-08-01 Emmanuel Briot <briot@adacore.com>
9521
9522 * g-expect.adb (Get_Command_Output): Fix memory leak.
9523
95242011-08-01 Geert Bosch <bosch@adacore.com>
9525
9526 * cstand.adb (P_Float_Type): New procedure to print the definition of
9527 predefined fpt types.
9528 (P_Mixed_Name): New procedure to print a name using mixed case
9529 (Print_Standard): Use P_Float_Type for printing floating point types
9530 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9531 precision IEEE float.
9532
95332011-08-01 Thomas Quinot <quinot@adacore.com>
9534
9535 * sem_ch3.adb: Minor reformatting.
9536
95372011-08-01 Ed Schonberg <schonberg@adacore.com>
9538
9539 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9540 the completion of a generic function, insert the new body rather than
9541 rewriting the original.
9542
95432011-08-01 Yannick Moy <moy@adacore.com>
9544
9545 * sinfo.ads, errout.ads: Typos in comments.
9546
1c54829e
AC
95472011-08-01 Robert Dewar <dewar@adacore.com>
9548
9549 * par-endh.adb: Minor reformatting.
9550
95512011-08-01 Robert Dewar <dewar@adacore.com>
9552
9553 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9554 (Pre_Post_Aspects): New subtype.
9555 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9556 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9557 * par-ch7.adb (P_Package): Remove Decl parameter
9558 (P_Package): Handle new syntax for aspects (before IS)
9559 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9560 new aspect syntax
9561 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9562 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9563 (P_Package): Remove Decl parameter
9564 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9565 aspects
9566 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9567 specs
9568 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9569 * sinfo.ads: Document new syntax for aspects in packages etc.
9570 * sprint.adb: Handle new syntax of aspects before IS in package
9571
95722011-08-01 Thomas Quinot <quinot@adacore.com>
9573
9574 * atree.ads: Minor reformatting.
9575 * sem_prag.adb: Minor reformatting.
9576
95772011-08-01 Robert Dewar <dewar@adacore.com>
9578
9579 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9580 case expr alternative.
9581
95822011-08-01 Ed Schonberg <schonberg@adacore.com>
9583
9584 * sem_ch12.adb: Fix typo.
9585
9eea4346
GB
95862011-08-01 Geert Bosch <bosch@adacore.com>
9587
9588 * sem_prag.adb (Check_No_Link_Name): New procedure.
9589 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9590 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9591 instead of Standard_Long_Long_Float_Size global. Preparation for
9592 eventual removal of per type constants.
9593 * exp_util.ads (Get_Stream_Size): New function returning the stream
9594 size value of subtype E.
9595 * exp_util.adb (Get_Stream_Size): Implement new function.
9596 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9597 function.
9598 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9599 * einfo.adb:
9600 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9601
3d6c3bd7
GB
96022011-08-01 Geert Bosch <bosch@adacore.com>
9603
9604 * cstand.adb: Fix comments.
9605 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9606 count of arguments.
9607
e7d897b8
AC
96082011-08-01 Robert Dewar <dewar@adacore.com>
9609
9610 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9611
96122011-08-01 Geert Bosch <bosch@adacore.com>
9613
9614 * atree.ads: Fix comment.
9615
c228a069
AC
96162011-08-01 Robert Dewar <dewar@adacore.com>
9617
9618 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9619 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9620 * par.adb: Add with for Namet.Sp.
9621 * par-tchk.adb: Minor reformatting.
9622
96232011-08-01 Vincent Celier <celier@adacore.com>
9624
9625 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9626 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9627 of the init procedure of a SAL.
9628 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9629 New procedure.
9630
96312011-08-01 Thomas Quinot <quinot@adacore.com>
9632
9633 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9634 reformatting.
9635
96362011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9637
9638 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9639
96402011-08-01 Thomas Quinot <quinot@adacore.com>
9641
9642 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9643 conformant with its spec (return True only for types that have
9644 an overriding Initialize primitive operation that prevents them from
9645 having preelaborable initialization).
9646 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9647 initialization for controlled types in Ada 2005 or later mode.
9648
857ade1b
RD
96492011-08-01 Robert Dewar <dewar@adacore.com>
9650
9651 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9652 Postcondition.
9653 (Same_Aspect): New function.
9654 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9655 Type_Invariant, Precondition, Postcondition.
9656 * snames.ads-tmpl: Add Name_Type_Invariant.
9657
bd949ee2
RD
96582011-08-01 Robert Dewar <dewar@adacore.com>
9659
9660 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9661 here.
9662 (Freeze_All_Ent): Fix error in handling inherited aspects.
9663 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9664 already analyzed, but don't skip entire processing of a declaration,
9665 that's wrong in some cases of declarations being rewritten.
9666 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9667 Don't delay for integer, string literals
9668 Treat predicates in usual manner for delay, remove special case code,
9669 not needed.
9670 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9671 (Build_Predicate_Function): Update saved expression in aspect
9672 (Build_Invariant_Procedure): Update saved expression in aspect
9673 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9674 of replacement of discriminant references if the reference is simple.
9675
f1c952af
RD
96762011-08-01 Robert Dewar <dewar@adacore.com>
9677
9678 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9679 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9680 Static_Predicate and Dynamic_Predicate.
9681 (Build_Predicate_Function): Add processing for Static_Predicate
9682 and Dynamic_Predicate.
9683 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9684 (From_Static_Predicate): New flag
9685 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9686
96872011-08-01 Robert Dewar <dewar@adacore.com>
9688
9689 * usage.adb: Documentation cleanup for Ada version modes in usage.
9690 * expander.adb: Minor reformatting.
9691
47e11d08
AC
96922011-08-01 Robert Dewar <dewar@adacore.com>
9693
9694 * atree.ads: Minor comment fix.
9695 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9696 a-witeio.ads, sem_prag.adb: Minor reformatting.
9697
96982011-08-01 Doug Rupp <rupp@adacore.com>
9699
9700 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9701 pointers. Use descrip.h header file for convenience. Add some
9702 comments.
9703
97042011-08-01 Robert Dewar <dewar@adacore.com>
9705
9706 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9707 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9708 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9709 New procedure.
9710 (Check_Aspect_At_End_Of_Declarations): New procedure
9711 (Analye_Aspect_Specification): Minor changes for above procedures
9712 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9713 specification node as well.
9714
97152011-08-01 Pascal Obry <obry@adacore.com>
9716
9717 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9718 Windows files. Use GetFilesAttributes() in this case to check for file
9719 existence instead of returning with an error code.
9720
a3a16b21
VC
97212011-08-01 Vincent Celier <celier@adacore.com>
9722
9723 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9724 High is above Source length.
9725
ff58cc69
RD
97262011-08-01 Robert Dewar <dewar@adacore.com>
9727
9728 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9729
6bb88533
AC
97302011-08-01 Robert Dewar <dewar@adacore.com>
9731
9732 * aspects.ads (Boolean_Aspects): New subtype.
9733 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9734 for derived types in cases where the parent type and derived type have
9735 aspects.
9736 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9737 with aspects when parent type also has aspects.
9738 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9739 boolean expression at this point).
9740 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9741 accordance with final decision on the Ada 2012 feature.
9742 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9743
97442011-08-01 Matthew Heaney <heaney@adacore.com>
9745
9746 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9747
060a3f28
AC
97482011-08-01 Pascal Obry <obry@adacore.com>
9749
9750 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9751 Fix Replace_Slice when High is above current string size.
9752 (Replace_Slice): Fix DL computation when High is above current
9753 string length.
9754
97552011-08-01 Gary Dismukes <dismukes@adacore.com>
9756
9757 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9758
e7f567a3
AC
97592011-08-01 Matthew Heaney <heaney@adacore.com>
9760
9761 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9762 of node.
9763
97642011-08-01 Pascal Obry <obry@adacore.com>
9765
9766 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9767 reformatting.
9768
1a265e78
AC
97692011-08-01 Ed Schonberg <schonberg@adacore.com>
9770
9771 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9772 access to protected subprograms in generic bodies.
9773 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9774 protected type, indicate that the convention of the subprogram is
9775 Convention_Protected, because it may be used in subsequent declarations
9776 within the protected declaration.
9777
97782011-08-01 Vincent Celier <celier@adacore.com>
9779
9780 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9781 and "final" procedures when the name of the library is "ada", to avoid
9782 duplicate symbols "adainit" and "adafinal" in executables.
9783
67e28ef8
ES
97842011-08-01 Ed Schonberg <schonberg@adacore.com>
9785
9786 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9787 quantified expression that appears within a postcondition and uses the
9788 Ada2012 'Result attribute.
9789
6da2ca7d
RO
97902011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9791
9792 * init.c (__gnat_error_handler): Cast reason to int.
9793 (__gnat_install_handler): Explain sa_sigaction use.
9794
7d5997c6
EB
97952011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9796
9797 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9798 subprogram has copy-in copy-out parameters, try to promote the mode of
9799 the return type if it is passed in registers.
9800
4b4cfdd5
EB
98012011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9802
9803 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9804 left operand as addressable.
9805
f3d34576
EB
98062011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9807
9808 * gcc-interface/gigi.h (build_function_stub): Remove.
9809 (build_return_expr): Likewise.
9810 (convert_vms_descriptor): Declare.
9811 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9812 (build_function_stub): Move to...
9813 * gcc-interface/utils2.c (build_return_expr): Move to...
9814 * gcc-interface/trans.c (build_function_stub): ...here.
9815 (build_return_expr): ...here.
9816 (Subprogram_Body_to_gnu): Add local variable for language_function.
9817 Disconnect the parameter attributes cache, if any, once done with it.
9818 Call end_subprog_body only after setting the end_locus.
9819 Build the stub associated with the function, if any, at the very end.
9820 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9821 variables and streamline control flow.
9822
0a6ecc08
AC
98232011-07-23 Arnaud Charlet <charlet@adacore.com>
9824
9825 PR ada/49819
9826 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9827 g-trasym-dwarf.adb.
9828
5b6d595b
RO
98292011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9830
9831 PR bootstrap/49794
9832 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9833 Assign to act.sa_sigaction.
9834 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9835 current->return_address to char * before arithmetic.
9836
94017021
RO
98372011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9838
9839 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9840 Correct argument types.
9841 Extract code from reason.
9842 (__gnat_install_handler): Assign to act.sa_sigaction.
9843
52fd02bb
EB
98442011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9845
9846 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9847 (GNAT1_OBJS): ...here.
9848
f39a9ca2
EB
98492011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9850
9851 PR ada/48711
9852 * g-socthi-mingw.adb (Fill): Fix formatting.
9853
9e36aa23
EB
9854 * gcc-interface/gigi.h: Move around comment.
9855
e3aca522
JDA
98562011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9857
9858 PR ada/46350
9859 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9860
696b1960
FW
98612011-07-14 Florian Weimer <fw@deneb.enyo.de>
9862
9863 PR ada/48711
9864 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9865
f542c405
EB
98662011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9867
9868 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9869 range comparison if Pmode is SImode.
9870
9e9bd455
LG
98712011-07-12 Laurent GUERBY <laurent@guerby.net>
9872 Eric Botcazou <ebotcazou@adacore.com>
9873
9874 * adadecode.c: Wrap up in extern "C" block.
9875 * adadecode.h: Likewise.
9876 * adaint.c: Likewise. Remove 'const' keyword.
9877 * adaint.h: Likewise.
9878 * argv.c: Likewise.
9879 * atree.h: Likewise.
9880 * cio.c: Likewise.
9881 * cstreams.c: Likewise.
9882 * env.c: Likewise.
9883 * exit.c: Likewise.
9884 * fe.h: Likewise.
9885 * final.c: Likewise.
9886 * init.c: Likewise.
9887 * initialize.c: Likewise.
9888 * link.c: Likewise.
9889 * namet.h: Likewise.
9890 * nlists.h: Likewise.
9891 * raise.c: Likewise.
9892 * raise.h: Likewise.
9893 * repinfo.h: Likewise.
9894 * seh_init.c: Likewise.
9895 * targext.c: Likewise.
9896 * tracebak.c: Likewise.
9897 * uintp.h: Likewise.
9898 * urealp.h: Likewise.
9899 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9900 * xsinfo.adb: Likewise.
9901 * xsnamest.adb: Likewise.
9902 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9903 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9904 * gcc-interface/misc.c: Likewise.
9905 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9906 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9907 ada/targext.o here...
9908 (GNAT_ADA_OBJS): ...and not here.
9909 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9910 (GNATBIND_OBJS): Reorder.
9911
7644b3c7
RH
99122011-07-07 Richard Henderson <rth@redhat.com>
9913
9914 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9915 dwarf2out_frame_init.
9916
8384ac41
EB
99172011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9918
9919 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9920
fbdd5d87
RO
99212011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9922
9923 PR target/39150
9924 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9925
1a072294
RG
99262011-07-06 Richard Guenther <rguenther@suse.de>
9927
8384ac41
EB
9928 * gcc-interface/misc.c (gnat_init): Merge calls to
9929 build_common_tree_nodes and build_common_tree_nodes_2.
1a072294
RG
9930 Re-initialize boolean_false_node.
9931
bc712852
EB
99322011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9933 Olivier Hainque <hainque@adacore.com>
9934 Nicolas Setton <setton@adacore.com>
9935
9936 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9937 the type according to the ARTIFICIAL_P parameter.
9938 (create_type_decl): Likewise.
9939 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9940
2eb22389
EB
99412011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9942
9943 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9944 (gnatbind): Likewise.
9945
4bdaaf2f
RO
99462011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9947
9948 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9949
c020c92b
EB
99502011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9951
9952 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9953 local variable throughout. Remove useless call to Base_Type.
9954 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9955 Take it also into account for the volatileness of the field. Set the
9956 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9957
96769d32
EB
99582011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9959
9960 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9961 on a dereference built for a by-ref object if it has an address clause.
9962
7e4680c1
EB
99632011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9964
9965 * einfo.ads (Address_Taken): Document use for the second argument of
9966 Asm_Input and Asm_Output attributes.
9967 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9968 argument is an entity name, then set Address_Taken on it.
9969 <Attribute_Asm_Output>: Likewise.
9970 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9971 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9972 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9973 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9974
99752011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
d5cc9181
JR
9976
9977 PR middle-end/46500
9978 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9979
677f3fa8
JM
99802011-06-14 Joseph Myers <joseph@codesourcery.com>
9981
9982 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9983 (ada/utils.o): Update dependencies.
9984 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9985 ../../../libcpp/libcpp.a.
9986 * gcc-interface/utils.c: Include common/common-target.h.
9987 (process_attributes): Use targetm_common.have_named_sections.
9988
009db074
RG
99892011-06-07 Richard Guenther <rguenther@suse.de>
9990
0bad0e23
EB
9991 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9992 set_sizetype.
009db074 9993
3bfc61cf
EB
99942011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9995
0bad0e23 9996 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
3bfc61cf
EB
9997 TREE_THIS_NOTRAP flag.
9998
5c4a1c7b
EB
99992011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10000
10001 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
10002 Fix thinko.
10003
e9f57686
EB
100042011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10005
10006 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
10007 constants whose full view has discriminants specially.
10008
10e4d056
EB
100092011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10010
10011 * gcc-interface/utils.c: Include diagnostic.h.
10012 (gnat_write_global_declarations): Output debug information for all
10013 global type declarations before finalizing the compilation unit.
10014 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
10015
0957c029
JJ
100162011-05-25 Jakub Jelinek <jakub@redhat.com>
10017
10018 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
10019
52d0a7ac
KT
100202011-05-25 Kai Tietz <ktietz@redhat.com>
10021
10022 * adaint.c (__gnat_to_canonical_file_list_next): Use array
10023 initialization instead of const/none-const pointer assignment.
10024
1ed1641d
JM
100252011-05-24 Joseph Myers <joseph@codesourcery.com>
10026
10027 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
10028 $(EXTRA_GNAT1_OBJS).
10029 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
10030 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
10031 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
10032 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
10033 libcommon-target.a instead of prefix.o.
10034
9fe72ebd
JM
100352011-05-21 Joseph Myers <joseph@codesourcery.com>
10036
10037 PR ada/49097
0bad0e23 10038 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9fe72ebd 10039
2691e6d7
JM
100402011-05-20 Joseph Myers <joseph@codesourcery.com>
10041
0bad0e23
EB
10042 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
10043 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
10044 instead of version.o.
2691e6d7 10045
bf6490b5
KT
100462011-05-18 Kai Tietz <ktietz@redhat.com>
10047
10048 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
10049 boolean_false_node instead of integer_zero_node.
10050 (convert_with_check): Likewise.
10051 * gcc-interface/decl.c (choices_to_gnu): Likewise.
10052
7bf9a5ac
EB
100532011-05-12 Eric Botcazou <ebotcazou@adacore.com>
10054
10055 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
10056 type of the parameter is an unconstrained array, convert the actual to
10057 the type of the formal in the In Out and Out cases as well.
10058
e5b00edf
NF
100592011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10060
10061 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
10062 call build_function_type_array or build_varargs_function_type_array
10063 instead.
10064 (create_subprog_type): Don't call build_function_type; call
10065 build_function_type_vec instead.
10066
51545682
NF
100672011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10068
10069 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
10070 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
10071 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
10072
c99c0026
EB
100732011-05-07 Eric Botcazou <ebotcazou@adacore.com>
10074
f620bd21
EB
10075 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
10076
c99c0026
EB
10077 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
10078 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
10079
3d528853
NF
100802011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10081
c99c0026 10082 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
3d528853 10083
d7d058c5
NF
100842011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10085
10086 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
10087 instead of accessing TYPE_ARG_TYPES directly.
10088 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
10089
805e60a0
EB
100902011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10091
10092 PR ada/48844
10093 * gcc-interface/gigi.h (get_variant_part): Declare.
10094 * gcc-interface/decl.c (get_variant_part): Make global.
10095 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
10096 types have the same constant size, are record types and T1 has a
10097 variant part while T2 doesn't.
10098
907a08d9
EB
100992011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10100
10101 * gcc-interface/utils.c (begin_subprog_body): Do not call
10102 get_pending_sizes.
10103 (end_subprog_body): Likewise.
10104
d35936ab
RG
101052011-05-04 Richard Guenther <rguenther@suse.de>
10106
10107 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
10108 int_const_binop.
10109 (pos_to_constructor): Likewise.
10110
c1fd8753 101112011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 10112 Eric Botcazou <ebotcazou@adacore.com>
c1fd8753
NF
10113
10114 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
10115 of build_function_type. Adjust calls to...
10116 (build_raise_check): ...this. Do not take a void_tree parameter.
10117 Call build_function_type_list instead of build_function_type.
10118 Fix head comment and swap couple of conditional blocks.
10119
4fb87d2b
EB
101202011-04-30 Eric Botcazou <ebotcazou@adacore.com>
10121
10122 * gnatvsn.ads (Library_Version): Bump to 4.7.
10123 (Current_Year): Bump to 2011.
10124
fa5e5a76
MM
101252011-04-29 Michael Matz <matz@suse.de>
10126
10127 * gcc-interface/misc.c (gnat_handle_option): Set
10128 warn_maybe_uninitialized.
10129
8d6a2f69
GP
101302011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
10131
10132 * gnat_ugn.texi (Complexity Metrics Control): Update link to
10133 the Watson/McCabe paper.
10134
770937fd
JM
101352011-04-23 Jim Meyering <meyering@redhat.com>
10136
10137 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
10138
eb601ae1
EB
101392011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10140
10141 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
10142 onto the new type.
10143
7d7fcb08
EB
101442011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10145
10146 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
10147 parameter.
10148 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
10149 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
10150 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
10151 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
10152 <all>: Do not set flags on the reused DECL node coming from an alias.
10153 Set DECL_IGNORED_P on the DECL node built for subprograms if they
10154 don't need debug info here...
10155 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
10156 (gigi): Adjust calls to create_subprog_decl.
10157 (build_raise_check): Likewise.
10158 (establish_gnat_vms_condition_handler): Likewise.
10159 (Compilation_Unit_to_gnu): Likewise.
10160 (gnat_to_gnu): Likewise.
10161
e1876cac
EB
101622011-04-21 Eric Botcazou <ebotcazou@adacore.com>
10163
10164 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
10165 (NO_REORDER_ADAFLAGS): New variable.
10166 (EXTRA_GNATTOOLS): Always define.
10167 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
10168 Clean up and adjust list of files compiled with special options.
10169 * gcc-interface/Make-lang.in: Likewise.
10170 (ada/decl.o): Cosmetical change.
10171 (ada/misc.o): Remove dependency on $(PLUGIN_H).
10172
04695783
JM
101732011-04-20 Jim Meyering <meyering@redhat.com>
10174
10175 * initialize.c (__gnat_initialize): Remove useless if-before-free.
10176
23399579
EB
101772011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10178
10179 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
10180 $(CFLAGS) on the link line.
10181
51c5169c
EB
101822011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10183
10184 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
10185 padded type built for the return type if it is unconstrained.
10186
61e46a7d
NF
101872011-04-14 Nathan Froyd <froydnj@codesourcery.com>
10188
10189 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
10190
81f653d6
NF
101912011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10192
b4867846
EB
10193 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
10194 before calling TREE_CHAIN.
81f653d6
NF
10195 * gcc-interface/misc.c (gnat_init_ts): New function.
10196 (LANG_HOOKS_INIT_TS): Define.
10197
a358e188
MJ
101982011-04-12 Martin Jambor <mjambor@suse.cz>
10199
b4867846
EB
10200 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
10201 instead of cgraph_node.
a358e188 10202
29b1c5a4
EB
102032011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10204
10205 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
10206 alignment on fields of the RETURN type built for the Copy-In Copy-Out
10207 mechanism.
10208
88872b00
EB
102092011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10210
10211 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10212 of aggregate types that contain a placeholder.
10213
dcf0c47e
NF
102142011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10215
10216 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
b4867846 10217 TYPE_ARG_TYPES.
dcf0c47e
NF
10218 (handle_type_generic_attribute): Likewise.
10219
53e3000c
EB
102202011-04-04 Eric Botcazou <ebotcazou@adacore.com>
10221
10222 PR ada/47163
10223 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10224
ab380bb4
KT
102252011-04-04 Kai Tietz <ktietz@redhat.com>
10226
10227 PR ada/47163
0bad0e23
EB
10228 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10229 to flag value.
ab380bb4 10230
8ffac116
EB
102312011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10232
10233 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10234 type case, do not strip a padding type around the array type.
10235
de9528f0
EB
102362011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10237
10238 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10239 types.
10240
d9d7a26c
EB
102412011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10242
10243 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10244 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
de9528f0 10245 code for -feliminate-unused-debug-types.
d9d7a26c
EB
10246 (gnat_post_options): Likewise.
10247
4cb12a90
EB
102482011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10249
10250 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10251 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10252 distinct copy.
10253
acccc61c
EB
102542011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10255
10256 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10257 DECL_ARTIFICIAL flag on enumeration types.
10258
583eb0c9
EB
102592011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10260
10261 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10262 fat pointer types artificial unconditionally.
10263 <E_Array_Subtype>: Attach the base array type as a parallel type if it
10264 isn't artificial.
10265
e3edbd56
EB
102662011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10267
10268 * gcc-interface/gigi.h (get_dummy_type): Declare.
10269 (build_dummy_unc_pointer_types): Likewise.
10270 (finish_fat_pointer_type): Likewise.
10271 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10272 fat pointer type has been built, complete it in place.
10273 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10274 and thin pointers. Remove useless variable.
10275 (finish_fat_pointer_type): Make global and move to...
10276 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10277 (get_dummy_type): New function.
10278 (build_dummy_unc_pointer_types): Likewise.
10279 (gnat_pushdecl): Propage the name to the anonymous variants only.
10280 (update_pointer_to): Only adjust the pointer types in the unconstrained
10281 array case.
10282
65444786
EB
102832011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10284
10285 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10286 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10287 if this is a Taft amendment type and the full declaration is available.
10288 * gcc-interface/trans.c (process_type): Likewise.
10289 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10290 (process_freeze_entity): Likewise.
10291 * gcc-interface/utils.c (dummy_global): New static variable.
10292 (gnat_write_global_declarations): If there are types declared as used
10293 at the global level, insert them in the global hash table.
10294
1aeb40dd
EB
102952011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10296
10297 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10298 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10299 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10300 copy.
10301 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
10302 flag of the type accordingly.
10303 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10304
80ec8b4c
EB
103052011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10306
10307 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10308 finalizing types when updating the pointers to the designated type.
10309 <all>: Finalize the deferred types even if we didn't defer processing
10310 of incomplete types in this invocation.
10311
2a9d769a 103122011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
10313 Nicolas Setton <setton@adacore.com>
10314 Eric Botcazou <ebotcazou@adacore.com>
2a9d769a
OH
10315
10316 * gcc-interface/misc.c (gnat_descriptive_type): New function.
10317 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10318
2438d7a6
KT
103192011-03-28 Kai Tietz <ktietz@redhat.com>
10320
333d8aff 10321 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
80ec8b4c
EB
10322 Windows targets.
10323 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10324 * system-mingw.ads (System): Change ZCX_By_Default default to True.
333d8aff 10325
80ec8b4c 10326 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
2438d7a6 10327
8ad150f6
TG
103282011-03-28 Tristan Gingold <gingold@adacore.com>
10329
10330 PR ada/44431
80ec8b4c
EB
10331 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10332 Use ada output of gnatbind.
8ad150f6
TG
10333 (ada/b_gnatb.adb): Ditto.
10334 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10335 (ada.mostlyclean, ada.stage1)
10336 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10337 (ada.stagefeedback): Adjust.
80ec8b4c 10338 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8ad150f6
TG
10339 Use ada output of gnatbind.
10340 (b_gnatm.adb): Ditto.
10341 (b_gnatl.o, b_gnatm.o): New rules.
10342
51c7954d
EB
103432011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10344
10345 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10346 for the padded type built to support a specified size or alignment.
10347
6ddf9843
EB
103482011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10349
10350 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10351 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10352 unconditionally to the end of the unit when the designated type is
10353 limited_with'ed.
10354 <all>: Rename local variable. Attempt to un-defer types only and do it
10355 for limited_with'ed types as well.
10356 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10357 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10358 consistently and remove redundant call to finalize_from_with_types.
10359
5daed84a
EB
103602011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10361
10362 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10363 subprograms without a previous spec declared in the same unit.
10364 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10365 subprograms at the end of the unit instead of at the beginning.
10366 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10367 isn't public for the special handling of non-inline functions nested
10368 inside inline external functions.
10369
0edf1bb2
JL
103702011-03-25 Jeff Law <law@redhat.com>
10371
5daed84a 10372 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
0edf1bb2 10373
e3c4580e
EB
103742011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10375
10376 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10377 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10378 to compute Set_Size_Depends_On_Discriminant.
10379 (Layout_Type): Call it on array types in back-end layout mode.
10380 * sem_util.adb (Requires_Transient_Scope): Return true for array
10381 types only if the size depends on the value of discriminants.
10382 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10383 type if the RHS is a call to a function that returns an unconstrained
10384 type with default discriminant.
10385
abbc8c7b
EB
103862011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10387
10388 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10389 non-conversion to the nominal result type at the end.
10390
ddb5a105
EB
103912011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10392
10393 * gcc-interface/trans.c (create_temporary): New function taken from...
10394 (create_init_temporary): ...here. Call it.
10395 (call_to_gnu): Create the temporary for the return value early, if any.
10396 Create it for a function with copy-in/copy-out parameters if there is
10397 no target; in other cases of copy-in/copy-out, use another temporary.
10398 Push the new binding level lazily. Add and rename local variables.
10399
0d853156
EB
104002011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10401
10402 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10403 error message.
10404 (set_rm_size): Likewise.
10405
4184ef1b
EB
104062011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10407
10408 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10409 for the padded type built in order to support a specified alignment.
10410 Fix incorrect formatting.
10411
bf7eefab
EB
104122011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10413
10414 PR bootstrap/48216
10415 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10416
ef0feeb2
EB
104172011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10418
10419 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10420 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10421 to the end of the list. Adjust recursive call. Rename local variable.
10422 If REORDER is true, reorder components of the record type.
10423 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10424 components_to_record and adjust the parameter list.
10425
646f9414
EB
104262011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10427
10428 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10429 disabled, use the variable for bounds of loop iteration scheme.
10430
62d784f7
KT
104312011-03-21 Kai Tietz <ktietz@redhat.com>
10432
10433 PR target/12171
0bad0e23 10434 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
62d784f7 10435
f230d759
EB
104362011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10437
10438 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10439 out whether the expression is read-only. Short-circuit placeholder
10440 case and rename a couple of local variables.
10441
bb1f7929
EB
104422011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10443
10444 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10445 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10446 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10447 (convert): Deal with conversions from a smaller form type specially.
10448
400a2d24
EB
104492011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10450
10451 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10452 its argument, except for the special -I- switch.
10453
c26bc3ad
GP
104542011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10455
0bad0e23
EB
10456 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10457 "Ada Issues".
c26bc3ad 10458
07b8e910
EB
104592011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10460
10461 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10462
31a5a547
EB
104632011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10464
10465 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10466 GNAT_FORMAL.
10467 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10468 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10469 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10470 Do not generate the check directly, instead instantiate the template
10471 check present in the descriptor.
10472 (make_descriptor_field): Move around.
10473 (build_vms_descriptor32): Build a template check in the POINTER field.
10474 (build_vms_descriptor): Remove useless suffixes.
10475 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10476
dcf25f59
EB
104772011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10478
10479 PR bootstrap/47467
10480 * targext.c: Include target files if IN_RTS is defined.
10481
0418e131
RG
104822011-01-26 Richard Guenther <rguenther@suse.de>
10483
10484 PR bootstrap/47467
10485 * targext.c: Include config.h.
10486 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10487 dependency.
10488
c6eecbd8 104892011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 10490 Eric Botcazou <ebotcazou@adacore.com>
c6eecbd8
PO
10491
10492 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10493
2d3c7e4f
EB
104942011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10495
10496 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10497 end-of-case on the end label and its associated gotos, if any.
10498
0394741f
EB
104992011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10500
10501 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10502 expressions of the parameter cache within the statement group of
10503 the CICO mechanism.
10504
2a02d090 105052011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 10506 Eric Botcazou <ebotcazou@adacore.com>
2a02d090
OH
10507
10508 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10509 (set_end_locus_from_node): New function.
10510 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10511 make and the function end_locus.
10512 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10513 for the elaboration subprogram.
10514 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10515 set the end_locus of the expression as well.
10516
89f5e978
EB
105172011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10518
10519 PR ada/47131
10520 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10521 variables that are referenced in exception handlers volatile.
10522
10523
ad41bd84 10524\f
797103eb 10525Copyright (C) 2011 Free Software Foundation, Inc.
ad41bd84
JM
10526
10527Copying and distribution of this file, with or without modification,
10528are permitted in any medium without royalty provided the copyright
10529notice and this notice are preserved.