24e400a154a9abd1ad5260725b6f563935458318
[gcc.git] / gcc / ada / ChangeLog
1 2011-08-29 Thomas Quinot <quinot@adacore.com>
2
3 * s-pooglo.adb: Minor reformatting.
4
5 2011-08-29 Ed Schonberg <schonberg@adacore.com>
6
7 * exp_ch5.adb (Expand_N_Assignment_Statement): if the left-hand side is
8 an indexed component of a packed array whose element type is a record
9 with a representation clause different from that of the right-hand
10 side, generate a temporary to minimuze the number of bit-field
11 operations generated.
12
13 2011-08-29 Ed Schonberg <schonberg@adacore.com>
14
15 * exp_util.adb (Insert_Actions): Use clauses can be part of lists of
16 declarations, and thus are likely insertion points for actions.
17
18 2011-08-29 Bob Duff <duff@adacore.com>
19
20 * einfo.ads: Minor comment fix.
21
22 2011-08-29 Robert Dewar <dewar@adacore.com>
23
24 * frontend.adb, gnat1drv.adb: Minor reformatting.
25
26 2011-08-29 Tristan Gingold <gingold@adacore.com>
27
28 * s-pooglo.adb (Allocate, Deallocate): Take into account the alignment.
29 * a-fihema.adb (Allocate, Deallocate): Ditto. Possibly add padding
30 space in front of the header.
31
32 2011-08-29 Johannes Kanig <kanig@adacore.com>
33
34 * frontend.adb (Frontend): Exit after creating Standard package when
35 -gnatd.H is present.
36 * gnat1drv.adb (Gnat1drv): Call Backend right away when -gnatd.H is
37 present.
38
39 2011-08-29 Robert Dewar <dewar@adacore.com>
40
41 * exp_ch9.adb, mlib-prj.adb, prj.adb, prj.ads, ttypes.ads, sem_ch4.adb,
42 makeutl.adb, makeutl.ads, atree.ads, snames.adb-tmpl,
43 snames.ads-tmpl: Minor reformatting.
44
45 2011-08-29 Philippe Gil <gil@adacore.com>
46
47 * prj.adb (Reset_Units_In_Table): New procedure.
48 Reset units to avoid access to freed memory.
49
50 2011-08-29 Thomas Quinot <quinot@adacore.com>
51
52 * get_scos.adb: When reading a P statement SCO without a pragma name
53 (from an older ALI file), ensure that the Pragma_Name component is set
54 to Unknown_Pragma (not left uninitialized).
55
56 2011-08-29 Vincent Celier <celier@adacore.com>
57
58 * makeutl.adb (Get_Directories): New procedure moved from Buildgpr and
59 modified to compute correctly the object path of a SAL project that is
60 extending another library project.
61 (Write_Path_File): New procedure.
62 * makeutl.ads (Directories): New table moved from Buildgpr
63 (Get_Directories): New procedure moved from Buildgpr
64 (Write_Path_File): New procedure
65 * mlib-prj.adb (Build_Library): Use Makeutl.Get_Directories to set the
66 paths before binding SALs, instead of Set_Ada_Paths.
67 * prj-env.adb (Set_Path_File_Var): Procedure has been moved to package
68 Prj.
69 * prj.adb (Set_Path_File_Var): New procedure moved from Prj.Env
70 (Current_Source_Path_File_Of): New function
71 (Set_Current_Object_Path_File_Of): New procedure
72 (Current_Source_Object_File_Of): New function
73 (Set_Current_Object_Path_File_Of): New procedure
74 * prj.ads (Set_Path_File_Var): New procedure moved from Prj.Env
75 (Current_Source_Path_File_Of): New function
76 (Set_Current_Object_Path_File_Of): New procedure
77 (Current_Source_Object_File_Of): New function
78 (Set_Current_Object_Path_File_Of): New procedure
79
80 2011-08-29 Ed Schonberg <schonberg@adacore.com>
81
82 * exp_ch5.adb (Expand_N_Assignment_Statement): For an assignment to a
83 packed entity, use a bit-field assignment only if there is no change of
84 representation.
85
86 2011-08-29 Thomas Quinot <quinot@adacore.com>
87
88 * rtsfind.ads, exp_ch3.adb (In_Runtime): Minor code improvement, use
89 Is_RTU instead of using Chars comparisons.
90
91 2011-08-29 Thomas Quinot <quinot@adacore.com>
92
93 * exp_strm.adb (Build_Mutable_Record_Read_Procedure): Do not create a
94 temporary object if the actual is constrained, and the discriminants
95 read from the stream don't match.
96
97 2011-08-29 Tristan Gingold <gingold@adacore.com>
98
99 * sem_attr.adb, exp_attr.adb: Add handling of
100 Attribute_System_Allocator_Alignment
101 * snames.ads-tmpl: Add Name_System_Allocator_Alignment and
102 Attribute_System_Allocator_Alignment.
103 * ttypes.ads, get_targ.ads: Add Get_System_Allocator_Alignment.
104 * gcc-interface/targtyps.c, gcc-interface/utils2.c,
105 gcc-interface/gigi.h: Renames get_target_default_allocator_alignment to
106 get_target_system_allocator_alignment.
107
108 2011-08-29 Arnaud Charlet <charlet@adacore.com>
109
110 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
111 dependencies.
112
113 2011-08-29 Arnaud Charlet <charlet@adacore.com>
114
115 * exp_ch3.adb (In_Runtime): Fix typo.
116
117 2011-08-29 Bob Duff <duff@adacore.com>
118
119 * sem_ch4.adb (Analyze_Allocator): Analyze the subpool specification.
120
121 2011-08-29 Ed Schonberg <schonberg@adacore.com>
122
123 * exp_ch3.adb (Expand_N_Object_Declaration): If the entity is tagged
124 and a separate tag assignment is generated, ensure that the tag
125 assignment is analyzed.
126
127 2011-08-29 Ed Schonberg <schonberg@adacore.com>
128
129 * atree.ads, atree.adb (Copy_Separate_List): New function that applies
130 Copy_Separate_Tree to a list of nodes. Used to create disjoint copies
131 of statement lists that may contain local declarations.
132 * exp_ch9.adb (Expand_N_Timed_Entry_Call): Use Copy_Separate_List to
133 duplicate the triggering statements needed for the expansion of this
134 construct, when the trigger is a dispatching call to a synchronized
135 primitive.
136
137 2011-08-29 Arnaud Charlet <charlet@adacore.com>
138
139 * gnat_rm.texi: Add doc for 'Elab_Subp_Body.
140 * bindgen.adb: Add comments.
141 * snames.adb-tmpl (Is_Attribute_Name): Only recognize 'Elab_Subp_Body
142 in CodePeer mode.
143
144 2011-08-29 Robert Dewar <dewar@adacore.com>
145
146 * exp_attr.adb: Minor reformatting.
147 Minor code reorganization and commenting.
148 * par_sco.adb, checks.adb, sem_attr.adb, get_scos.adb: Minor
149 reformatting.
150
151 2011-08-29 Thomas Quinot <quinot@adacore.com>
152
153 * get_scos.adb: Ignore chaining indicators not currently supported
154 by Ada.
155
156 2011-08-29 Arnaud Charlet <charlet@adacore.com>
157
158 * system.ads: Minor editing.
159
160 2011-08-29 Arnaud Charlet <charlet@adacore.com>
161
162 * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in
163 CodePeer mode.
164 * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of
165 Attribute_Elab_Subp_Body.
166 * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New.
167 * sem_util.adb: Update comments.
168
169 2011-08-29 Thomas Quinot <quinot@adacore.com>
170
171 * par_sco.adb, scos.adb, scos.ads, put_scos.adb, get_scos.adb: Record
172 pragma name for each SCO statement corresponding to a pragma.
173
174 2011-08-29 Arnaud Charlet <charlet@adacore.com>
175
176 * opt.ads: Minor editing.
177
178 2011-08-29 Yannick Moy <moy@adacore.com>
179
180 * gnat1drv.adb (Adjust_Global_Switches): Remove options for ALFA mode
181 that only made sense for CodePeer mode.
182
183 2011-08-29 Jose Ruiz <ruiz@adacore.com>
184
185 * targparm.ads (Support_64_Bit_Divides_On_Target): Remove this flag
186 which is no longer used.
187 * targparm.adb (S64, S64_Str, Get_Target_Parameters): Remove the
188 handling of the 64-bit division check.
189 * exp_ch4.adb (Expand_N_Op_Divide): Remove the check for 64-bit
190 division available.
191 * system*.ads (Support_64_Bit_Divides): Remove this flag which is no
192 longer used.
193
194 2011-08-29 Thomas Quinot <quinot@adacore.com>
195
196 * get_scos.adb: Minor reformatting.
197
198 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
199
200 * exp_util.adb (Process_Statements_For_Controlled_Objects): Whenever a
201 statement list is wrapped in a block, the block is explicitly analyzed
202 in order to properly redecorate the entities and create a servicing
203 finalizer.
204
205 2011-08-29 Tristan Gingold <gingold@adacore.com>
206
207 * sinfo.ads, sinfo.adb (Zero_Cost_Handling): Remove.
208 (Set_Zero_Cost_Handling): Remove.
209
210 2011-08-29 Thomas Quinot <quinot@adacore.com>
211
212 * par_sco.adb, scos.ads, put_scos.adb, get_scos.adb: Minor reformatting
213
214 2011-08-29 Geert Bosch <bosch@adacore.com>
215
216 * s-vaflop-vms-alpha.adb (Neg_F): Use subtraction instead of negation
217 instruction, as the latter may produce -0.0, which is not a valid VAX
218 F float number.
219 (Neg_G): Likewise for VAX F float.
220
221 2011-08-29 Robert Dewar <dewar@adacore.com>
222
223 * exp_util.adb: Minor reformatting.
224
225 2011-08-29 Yannick Moy <moy@adacore.com>
226
227 * sem_ch3.adb: Minor comment update.
228
229 2011-08-29 Thomas Quinot <quinot@adacore.com>
230
231 * checks.adb (Apply_Type_Conversion_Checks): Use the Underlying_Type of
232 the operand type.
233
234 2011-08-29 Thomas Quinot <quinot@adacore.com>
235
236 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not flush
237 current statement sequence on a generic instantiation or a subprogram
238 declaration.
239
240 2011-08-29 Robert Dewar <dewar@adacore.com>
241
242 * sem_type.adb, einfo.ads, freeze.adb, exp_ch4.adb, sem_ch13.adb:
243 Minor reformatting.
244
245 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
246
247 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
248 Correct the check which involves the freeze node of a controlled or
249 access-to-controlled type.
250
251 2011-08-29 Geert Bosch <bosch@adacore.com>
252
253 * sem_warn.adb (Check_Code_Statement): Remove check for consecutive Asm
254 statements.
255 * s-vaflop-vms-alpha.adb: Remove bogus Volatile => True arguments from
256 Asm statements.
257
258 2011-08-29 Yannick Moy <moy@adacore.com>
259
260 * sem_ch3.adb (Array_Type_Declaration): Insert a subtype declaration
261 for every index type and component type that is not a subtype_mark.
262 (Process_Subtype): Set Etype of subtype.
263
264 2011-08-29 Robert Dewar <dewar@adacore.com>
265
266 * a-cbmutr.adb, a-cimutr.adb, a-comutr.adb, prj-nmsc.adb: Minor code
267 reorganization. Minor reformatting.
268
269 2011-08-29 Steve Baird <baird@adacore.com>
270
271 * exp_ch4.adb (Expand_N_Op_Expon): Suppress N_Op_Expon node expansion
272 for CodePeer and ALFA modes.
273
274 2011-08-29 Ed Schonberg <schonberg@adacore.com>
275
276 * sem_type.adb (Collect_Interps): Within an instance, collect a homonym
277 that comes from an enclosing scope if it is not the renaming of an
278 actual, to handle properly a spurious ambiguity in an instance.
279
280 2011-08-29 Eric Botcazou <ebotcazou@adacore.com>
281
282 * sem_ch13.adb (Alignment_Check_For_Esize_Change): Rename to...
283 (Alignment_Check_For_Size_Change): ...this. Add SIZE parameter and
284 use it instead of the Esize of the first parameter.
285 (Analyze_Attribute_Definition_Clause) <Object_Size>: Adjust call to
286 above change.
287 <Size>: Likewise. Call it for composite types on the RM size.
288
289 2011-08-29 Yannick Moy <moy@adacore.com>
290
291 * exp_ch4.adb (Expand_N_Op_Not): Do not expand not on array.
292 * sem_util.adb (Unique_Name): Correct behaviour for names of
293 compilation units.
294
295 2011-08-29 Yannick Moy <moy@adacore.com>
296
297 * sem_prag.adb (Check_Precondition_Postcondition): In formal
298 verification mode, analyze pragma expression for correctness, for
299 pre/post on library-level subprogram, as it is not expanded later.
300
301 2011-08-29 Yannick Moy <moy@adacore.com>
302
303 * exp_aggr.adb (Expand_Array_Aggregate): Do not expand array aggregates
304 in formal verification.
305
306 2011-08-29 Thomas Quinot <quinot@adacore.com>
307
308 * sem_util.adb: Minor reformatting.
309 * freeze.adb, sem_ch13.adb: Fix comment: Bit_Order is an attribute,
310 there's no pragma.
311 * par_sco.ads, par_sco.adb: Update comments.
312
313 2011-08-29 Yannick Moy <moy@adacore.com>
314
315 * einfo.adb, einfo.ads: Remove flag Is_Postcondition_Proc and
316 associated getter/setter.
317 * sem_ch6.adb: Remove reference to Is_Postcondition_Proc.
318
319 2011-08-29 Vincent Celier <celier@adacore.com>
320
321 * prj-attr.adb: New Compiler attribute Dependency_Kind and Language_Kind
322 * prj-conf.adb: Add_Default_GNAT_Naming_Scheme: Add a package Compiler
323 with declarations for Language_Kind and Dependency_Kind for Ada.
324 * prj-nmsc.adb (Check_Unit_Name): New name of procedure Check_Ada_Name
325 (Process_Compiler): Take into account the new attributes Dependency_Kind
326 and Language_Kind.
327 (Check_Configuration): Check if language kind is unit based, not if the
328 language name is Ada.
329 (Process_Exceptions_Unit_Based): Ditto
330 (Add_Language): Remove default additions of language and dependency kind
331 * prj.ads: Minor comment change
332 * snames.ads-tmpl: New standard names Dependency_Kind and Language_Kind
333
334 2011-08-29 Johannes Kanig <kanig@adacore.com>
335
336 * debug.adb: Update comments.
337
338 2011-08-24 Joseph Myers <joseph@codesourcery.com>
339
340 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
341 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
342 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
343 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
344 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
345
346 2011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
347
348 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
349 (GNATLIBCFLAGS_FOR_C): Replace
350 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
351 (gnatlib-shared-default, gnatlib-shared-dual-win32)
352 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
353 (gnatlib-sjlj, gnatlib-zcx): Likewise.
354
355 2011-08-07 Eric Botcazou <ebotcazou@adacore.com>
356
357 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
358
359 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
360
361 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
362
363 2011-08-05 Nicolas Roche <roche@adacore.com>
364
365 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
366 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
367 canadian cross.
368 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
369
370 2011-08-05 Matthew Heaney <heaney@adacore.com>
371
372 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
373 subprogram bodies declared out-of-order.
374
375 2011-08-05 Yannick Moy <moy@adacore.com>
376
377 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
378 entities directly in package Standard, otherwise skip the standard
379 prefix.
380
381 2011-08-05 Robert Dewar <dewar@adacore.com>
382
383 * a-cbmutr.adb: Minor reformatting
384 (Allocate_Node): refactor node allocation algorithm
385
386 2011-08-05 Robert Dewar <dewar@adacore.com>
387
388 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
389 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
390 mode.
391 (Analyze_Pragma, case Check_Policy): Ditto.
392 * sem_prag.ads (Check_Disabled): New function
393 * snames.ads-tmpl: Add Name_Disable.
394
395 2011-08-05 Robert Dewar <dewar@adacore.com>
396
397 * gnat_rm.texi: Document implementation-defined policy DISABLE for
398 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
399
400 2011-08-05 Ed Schonberg <schonberg@adacore.com>
401
402 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
403 that appears in a generic formal part and applies to a formal
404 subprogram.
405
406 2011-08-05 Robert Dewar <dewar@adacore.com>
407
408 * a-cbmutr.ads: Minor reformatting.
409
410 2011-08-05 Matthew Heaney <heaney@adacore.com>
411
412 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
413 to check count, check sign of value instead.
414 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
415 (Copy_Subtree): allocate copy of source element
416 (Equal_Subtree): compare elements, not access objects
417
418 2011-08-05 Vincent Celier <celier@adacore.com>
419
420 * gnat_ugn.texi: Fix VMS alternative.
421
422 2011-08-05 Thomas Quinot <quinot@adacore.com>
423
424 * sem_ch11.adb: Add comment.
425
426 2011-08-05 Robert Dewar <dewar@adacore.com>
427
428 * exp_util.adb: Minor comment fix.
429
430 2011-08-05 Robert Dewar <dewar@adacore.com>
431
432 * scng.adb (Error_Unterminated_String): Improve flag position when
433 comma present.
434
435 2011-08-05 Matthew Heaney <heaney@adacore.com>
436
437 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
438 tree containers).
439 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
440 multiway tree containers.
441
442 2011-08-05 Robert Dewar <dewar@adacore.com>
443
444 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
445 * stylesw.adb: Implement -gnatyC to control comment spacing
446 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
447 -gnatyc/C).
448 * usage.adb: Add line for -gnatyC.
449
450 2011-08-05 Robert Dewar <dewar@adacore.com>
451
452 * gnat_ugn.texi: Document -gnatyC.
453 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
454 synonym for COMMENTS2).
455
456 2011-08-05 Robert Dewar <dewar@adacore.com>
457
458 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
459 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
460 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
461 a-comutr.ads, lib-xref.adb: Minor reformatting.
462
463 2011-08-05 Robert Dewar <dewar@adacore.com>
464
465 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
466 warning if there is an exception handler present.
467
468 2011-08-05 Pascal Obry <obry@adacore.com>
469
470 * a-iteint.ads: Fix copyright year.
471
472 2011-08-05 Thomas Quinot <quinot@adacore.com>
473
474 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
475 statement SCO for a USE clause or a representation clause.
476
477 2011-08-05 Yannick Moy <moy@adacore.com>
478
479 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
480 between body and spec for stub.
481 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
482 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
483 pragma precondition or postcondition, for which the enclosing
484 subprogram or package in the AST is not the desired one, return empty.
485
486 2011-08-05 Thomas Quinot <quinot@adacore.com>
487
488 * g-expect.adb: Minor reformatting.
489
490 2011-08-05 Bob Duff <duff@adacore.com>
491
492 * a-fihema.adb: Comment out OS_Lib.
493
494 2011-08-05 Matthew Heaney <heaney@adacore.com>
495
496 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
497 (unbounded multiway tree containers) and a-iteint.ads.
498 * a-comutr.ads, a-comutr.adb:
499 This is the new Ada 2012 unit for unbounded multiway tree containers
500 * a-cimutr.ads, a-cimutr.adb
501 This is the new Ada 2012 unit for indefinite multiway tree containers
502 * a-iteint.ads: New file.
503
504 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
505
506 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
507
508 2011-08-05 Bob Duff <duff@adacore.com>
509
510 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
511 subpools.
512 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
513
514 2011-08-05 Ed Schonberg <schonberg@adacore.com>
515
516 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
517 general indexing aspects of Ada2012. Called when analyzing indexed
518 components when other interpretations fail.
519 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
520 in an expression context where overloading is meaningful. This excludes
521 the occurrence in an aspect specification (efficiency only).
522 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
523 related to iterators can be set by an attribute specification, but
524 cannot be queried.
525 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
526 Constant_Indexing and Variable_Indexing.
527 (Check_Indexing_Functions): New procedure to perform legality checks.
528 Additional semantic checks at end of declarations.
529
530 2011-08-05 Sergey Rybin <rybin@adacore.com>
531
532 * tree_io.ads: Update ASIS_Version_Number because of the change of the
533 order of calling Tree_Write/Tree_Read routines made for aspects.
534
535 2011-08-05 Bob Duff <duff@adacore.com>
536
537 * a-fihema.adb (Finalize): Fix race condition.
538
539 2011-08-05 Yannick Moy <moy@adacore.com>
540
541 * sem_ch12.adb (Analyze_Package_Instantiation,
542 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
543 mode.
544
545 2011-08-05 Ed Schonberg <schonberg@adacore.com>
546
547 * sem_type.adb (Specific_Type): in an instance, the type-specific
548 operand of an equality check that involves null may have a private
549 type. Use full view to determine legality of construct.
550
551 2011-08-05 Vincent Celier <celier@adacore.com>
552
553 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
554 delete or close the file when the call to gnatmake was successful.
555
556 2011-08-05 Yannick Moy <moy@adacore.com>
557
558 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
559 Global_Discard_Names.
560
561 2011-08-05 Ed Schonberg <schonberg@adacore.com>
562
563 * sinfo.ads: comments on use of entity field for aspect specifications.
564
565 2011-08-05 Ed Schonberg <schonberg@adacore.com>
566
567 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
568 node is not itself an entity but a selected component, it is a
569 rewritten parameterless call to an en enclosing synchronized operation,
570 and this expansion will be performed again in the instance, so there is
571 no global information to preserve.
572
573 2011-08-05 Javier Miranda <miranda@adacore.com>
574
575 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
576 for renamings of predefined primitives.
577 (In_Predef_Prims_DT): New subprogram.
578
579 2011-08-05 Ed Schonberg <schonberg@adacore.com>
580
581 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
582 possible interpretation of name is a reference type, add an
583 interpretation that is the designated type of the reference
584 discriminant of that type.
585 * sem_res.adb (resolve): If the interpretation imposed by context is an
586 implicit dereference, rewrite the node as the deference of the
587 reference discriminant.
588 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
589 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
590 parent type or base type.
591 * sem_ch4.adb (Process_Indexed_Component,
592 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
593 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
594 Check for implicit dereference.
595 (List_Operand_Interps): Indicate when an implicit dereference is
596 ambiguous.
597 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
598
599 2011-08-05 Thomas Quinot <quinot@adacore.com>
600
601 * scos.ads: Update documentation of SCO table. Pragma statements can now
602 be marked as disabled (using 'p' instead of 'P' as the statement kind).
603 * par_sco.ads, par_sco.adb: Implement the above change.
604 (Process_Decisions_Defer): Generate a P decision for the first parameter
605 of a dyadic pragma Debug.
606 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
607 necessary.
608 * put_scos.adb: Code simplification based on above change.
609
610 2011-08-05 Robert Dewar <dewar@adacore.com>
611
612 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
613 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
614 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
615 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
616
617 2011-08-05 Bob Duff <duff@adacore.com>
618
619 * a-stunau.ads, g-spipat.adb: Update comments.
620
621 2011-08-05 Bob Duff <duff@adacore.com>
622
623 * a-fihema.ads: Minor comment fix.
624 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
625 correct.
626 (Attach, Detach): Remove some unnecessary code.
627 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
628
629 2011-08-05 Bob Duff <duff@adacore.com>
630
631 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
632 allocation for Objects component. This simplifies the code somewhat. It
633 is also a little more efficient in the not-so-unusual case where there
634 are no controlled objects allocated.
635 Make Finalization_Started flag atomic.
636 (Finalize): Avoid unnecessary detachment of items from the list.
637 (pcol): Minor cleanup.
638
639 2011-08-05 Ed Schonberg <schonberg@adacore.com>
640
641 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
642 package whose name is the same as that of the generic unit, or its
643 ultimate prefix.
644
645 2011-08-05 Bob Duff <duff@adacore.com>
646
647 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
648 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
649 Minor comment fixes.
650
651 2011-08-05 Arnaud Charlet <charlet@adacore.com>
652
653 * make.adb (Linking_Phase): No longer need to set source search path
654 before calling gnatlink in CodePeer mode.
655 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
656 gcc in CodePeer mode, since the binder generated file no longer has a
657 'with Main'.
658 * switch.ads, switch.adb (Is_Language_Switch): Removed.
659 * switch-c.adb: Update comment.
660
661 2011-08-05 Thomas Quinot <quinot@adacore.com>
662
663 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
664
665 2011-08-05 Nicolas Roche <roche@adacore.com>
666
667 * gnat_ugn.texi: Fix minor syntax error issue.
668
669 2011-08-05 Vincent Celier <celier@adacore.com>
670
671 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
672 delete or close the file when the call to gnatmake returns a non
673 successful return code.
674
675 2011-08-05 Ed Schonberg <schonberg@adacore.com>
676
677 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
678 check, indicate that the copy of the original node does not come from
679 source, to prevent an infinite recursion of the expansion.
680
681 2011-08-05 Johannes Kanig <kanig@adacore.com>
682
683 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
684 VC generation for subprogram bodies.
685
686 2011-08-05 Yannick Moy <moy@adacore.com>
687
688 * einfo.ads: Typo.
689 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
690 the base type with the smallest allowed base type.
691
692 2011-08-05 Sergey Rybin <rybin@adacore.com>
693
694 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
695 aspects.
696
697 2011-08-05 Ed Schonberg <schonberg@adacore.com>
698
699 * sem_ch12.ads: minor comment updates.
700
701 2011-08-05 Ed Schonberg <schonberg@adacore.com>
702
703 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
704 instantiation and a formal package the compiler generates a package
705 renaming declaration so that the generic name within the declaration
706 is interpreted as a renaming of the instance. At the end of a formal
707 package declaration, this renaming must become invisible.
708
709 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
710
711 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
712 comparison and rely on concrete entities instead.
713
714 2011-08-05 Ed Schonberg <schonberg@adacore.com>
715
716 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
717 and discriminants, to indicate that the type has an access discriminant
718 that supports implicit dereference.
719 * snames.ads-tmpl: Add names of aspects and attributes related to
720 Ada2012 iterators: constant_indexing, default_iterator,
721 iterator_element, implicit_dereference, variable_indexing.
722 * aspects.ads, aspects.adb: entries for iterator-related aspects.
723 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
724 iterator-related aspects.
725 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
726
727 2011-08-05 Sergey Rybin <rybin@adacore.com>
728
729 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
730 metrics in gnatmetric to cover new kinds of coupling mentrics.
731
732 2011-08-05 Steve Baird <baird@adacore.com>
733
734 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
735 of calling the user-defined main subprogram.
736 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
737 is set) Call_Main_Subprogram ahead of, as opposed to
738 inside of, Main.
739 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
740 generation of a "with" of the user-defined main subprogram.
741 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
742 (which is now called from Gen_Main instead).
743
744 2011-08-05 Emmanuel Briot <briot@adacore.com>
745
746 * projects.texi: Added reference to the Makefile package.
747
748 2011-08-05 Thomas Quinot <quinot@adacore.com>
749
750 * exp_ch7.adb: Minor comment rewording.
751
752 2011-08-05 Ed Falis <falis@adacore.com>
753
754 * env.c: Fix comment.
755
756 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
757
758 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
759 character comparison and rely on concrete entities instead.
760
761 2011-08-05 Ed Schonberg <schonberg@adacore.com>
762
763 * sem_ch3.adb: (Check_Private_Overriding): better error message,
764 suggested by AI95-0068.
765
766 2011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
767
768 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
769 the two potential initialization calls. This accounts for any
770 access-before-elaboration checks which may precede the initialization
771 calls.
772 (Next_Suitable_Statement): New routine. Returns the next real statement
773 after the input node while skipping generated checks.
774 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
775 with comment on usage.
776 Do not generate Elaborate_All when the trigger is a finalization call
777 coming from a type init proc.
778 (Check_Elab_Call): Propagate the initialization procedure context to
779 subsequent calls to Check_A_Call.
780 (Check_Internal_Call_Continue): Propagate the initialization procedure
781 context to subsequent calls to Check_Elab_Call.
782 (Is_Finalization_Procedure): New routine. Returns True if the input
783 entity denotes a [Deep_]Finalize routine.
784 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
785 along with comment on usage.
786
787 2011-08-05 Vadim Godunko <godunko@adacore.com>
788
789 * s-atocou.ads: Add list of supported platforms.
790
791 2011-08-05 Yannick Moy <moy@adacore.com>
792
793 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
794
795 * opt.ads (Disable_ALI_File): new Boolean flag
796 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
797
798 2011-08-05 Ed Falis <falis@adacore.com>
799
800 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
801 environ is properly defined.
802
803 2011-08-05 Vincent Celier <celier@adacore.com>
804
805 * make.adb (Compilation_Phase): Exit immediately when all objects have
806 been found up to date, to avoid multiple exit messages.
807 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
808 same project for languages with no compiler.
809 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
810 -eI.
811 2011-08-05 Robert Dewar <dewar@adacore.com>
812
813 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
814 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
815 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
816 s-atocou-builtin.adb: Minor reformatting.
817
818 2011-08-05 Yannick Moy <moy@adacore.com>
819
820 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
821 if the node to wrap is a pragma check, this node and enclosed
822 expression are not expanded, so do not apply any transformations here.
823 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
824 introducing transient scopes.
825
826 2011-08-05 Jose Ruiz <ruiz@adacore.com>
827
828 * adaint.c (__gnat_set_writable, __gnat_set_readable,
829 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
830 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
831 routine is available, so we use the default implementation of these
832 functions.
833 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
834 support for copying attributes on VxWorks 6.
835
836 2011-08-05 Yannick Moy <moy@adacore.com>
837
838 * debug.adb: Remove use of -gnatd.D.
839 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
840 * opt.ads: Simplify variables for ALFA mode, to keep one only
841 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
842 to ALFA mode.
843
844 2011-08-05 Vincent Celier <celier@adacore.com>
845
846 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
847 Builder'Default_Switches.
848
849 2011-08-05 Vincent Celier <celier@adacore.com>
850
851 * makeusg.adb: Add lines for --create-map-file switches.
852
853 2011-08-05 Ed Schonberg <schonberg@adacore.com>
854
855 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
856 profile is incomplete and the full view is available, replace it with
857 the full view.
858 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
859 incomplete, freezing the subprogram is delayed until the full view is
860 frozen.
861 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
862 fixed-point multiplication operator and the predefined operator is
863 resolved in favor of the user-defined one.
864
865 2011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
866
867 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
868 CONST_CAST.
869
870 2011-08-04 Ed Schonberg <schonberg@adacore.com>
871
872 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
873 whether a type lacks user-defined Read or Write operations, or has a
874 component that lacks them.
875 * sem_attr.adb (Check_Stream_Attribute): if restriction
876 No_Default_Stream_Attributes is active, verify that all subcomponent
877 types of the target have user-defined stream operations, and report
878 error otherwise.
879 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
880 * exp_strm.adb: Build_Elementary_Input_Call,
881 Build_Elementary_Write_Call): remove checks for restriction
882 No_Default_Stream_Attributes, now checked in semantics.
883
884 2011-08-04 Vincent Celier <celier@adacore.com>
885
886 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
887 switches on the command line, look for all valid --RTS switches in the
888 Builder switches and for each language use the first runtime name found
889 to invoke gprconfig.
890 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
891 command line and there is no auto-configuration.
892 (Runtime_Name_Set_For): New function.
893
894 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
895
896 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
897 elaborate initialization expression for variable Abort when processing
898 a package body or a declaration.
899 (Create_Finalizer): Propagate the package context when creating the
900 exception-related variables.
901 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
902 For_Package along with usage comment.
903
904 2011-08-04 Arnaud Charlet <charlet@adacore.com>
905
906 * gcc-interface/Makefile.in: Clean up targets.
907 Enable new package for atomic counters and copy-on-write implementation
908 of unbounded strings on x86 platforms.
909 * gcc-interface/Make-lang.in: Update dependencies.
910
911 2011-08-04 Robert Dewar <dewar@adacore.com>
912
913 * exp_ch7.adb: Minor reformatting.
914
915 2011-08-04 Robert Dewar <dewar@adacore.com>
916
917 * exp_strm.adb: Minor reformatting.
918
919 2011-08-04 Vadim Godunko <godunko@adacore.com>
920
921 * s-atocou.adb: Replace by dummy version and use on targets where atomic
922 operations are not supported.
923 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
924 * s-atocou-x86.adb: New file.
925 * Makefile.rtl: Add s-atocou.o file
926
927 2011-08-04 Arnaud Charlet <charlet@adacore.com>
928
929 * make.adb (Compile): Move setting of CodePeer_Mode to ...
930 (Compilation_Phase): ... here.
931 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
932
933 2011-08-04 Thomas Quinot <quinot@adacore.com>
934
935 * Make-generated.in: Fix minor typo in comment.
936
937 2011-08-04 Thomas Quinot <quinot@adacore.com>
938
939 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
940 the project path.
941
942 2011-08-04 Robert Dewar <dewar@adacore.com>
943
944 * a-coinho.adb: Minor reformatting.
945
946 2011-08-04 Robert Dewar <dewar@adacore.com>
947
948 * a-coinho.ads: Minor reformatting.
949
950 2011-08-04 Vadim Godunko <godunko@adacore.com>
951
952 * s-atocou.ads, s-atocou.adb: New files.
953 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
954 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
955 direct use of GCC's atomic builtins and replace them by use of new
956 atomic counter package.
957
958 2011-08-04 Ed Schonberg <schonberg@adacore.com>
959
960 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
961
962 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
963
964 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
965 with a call to Get_External_Tag.
966 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
967 subprogram usage. Remove the guard against package declarations and
968 bodies since Build_Cleanup_Statements is no longer invoked in that
969 context.
970 (Build_Components): Initialize Tagged_Type_Stmts when the context
971 contains at least one library-level tagged type.
972 (Build_Finalizer): New local variables Has_Tagged_Types and
973 Tagged_Type_Stmts along with associated comments on usage. Update the
974 logic to include tagged type processing.
975 (Create_Finalizer): Insert all library-level tagged type unregistration
976 code before the jump block circuitry.
977 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
978 (Expand_N_Package_Declaration): Remove the call to
979 Build_Cleanup_Statements.
980 (Process_Tagged_Type_Declaration): New routine. Generate a call to
981 unregister the external tag of a tagged type.
982 (Processing_Actions): Reimplemented to handle tagged types.
983 (Process_Declarations): Detect the declaration of a library-level
984 tagged type and carry out the appropriate actions.
985 (Unregister_Tagged_Types): Removed. The machinery has been directly
986 merged with Build_Finalizer.
987
988 2011-08-04 Robert Dewar <dewar@adacore.com>
989
990 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
991 gnatls.adb, exp_ch3.adb: Minor reformatting.
992
993 2011-08-04 Marc Sango <sango@adacore.com>
994
995 * sem_attr.adb (Analyze_Attribute): Replace the message
996 "invisible attribute of}" of the spark restriction violation in
997 attribute reference by the simple message "invisible attribute of type".
998 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
999 two insertion characters: '&' and '}'.
1000
1001 2011-08-04 Vadim Godunko <godunko@adacore.com>
1002
1003 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
1004 * a-coinho.ads, a-coinho.adb: New file.
1005 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
1006
1007 2011-08-04 Nicolas Roche <roche@adacore.com>
1008
1009 * alfa_test.adb: Not all ali files are containing alfa information even
1010 if compiled with -gnatd.F. So suppress warning about missing ALFA
1011 information.
1012
1013 2011-08-04 Yannick Moy <moy@adacore.com>
1014
1015 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
1016 scope.
1017 * put_alfa.adb: Check that scope name is not empty.
1018
1019 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1020
1021 * exp_ch3.adb (Stream_Operation_Ok): new predicate
1022 Needs_Elementary_Stream_Operation, to determine whether user-defined
1023 Read and Write attributes are available for the elementary components
1024 of the given type. If only the predefined attributes are available,
1025 then when restriction No_Default_Stream_Attributes is active the
1026 predefined stream attributes for the composite type cannot be created.
1027
1028 2011-08-04 Robert Dewar <dewar@adacore.com>
1029
1030 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
1031 Put routines in alpha order
1032
1033 2011-08-04 Jose Ruiz <ruiz@adacore.com>
1034
1035 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
1036 * gcc-interface/Make-lang.in: Update dependencies.
1037
1038 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1039
1040 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
1041 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
1042 gnat1why).
1043
1044 2011-08-04 Robert Dewar <dewar@adacore.com>
1045
1046 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
1047 lib-xref-alfa.adb: Minor reformatting.
1048
1049 2011-08-04 Marc Sango <sango@adacore.com>
1050
1051 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
1052 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
1053 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
1054 mode.
1055
1056 2011-08-04 Tristan Gingold <gingold@adacore.com>
1057
1058 * bindgen.adb (Gen_Adainit_C): Remove.
1059 (Gen_Adafinal_C): Ditto.
1060 (Gen_Elab_Externals_C): Ditto.
1061 (Gen_Elab_Calls_C): Ditto.
1062 (Gen_Elab_Order_C): Ditto.
1063 (Gen_Elab_Defs_C): Ditto.
1064 (Gen_Finalize_Library_C): Ditto.
1065 (Gen_Finalize_Library_Defs_C): Ditto.
1066 (Gen_Main_C): Ditto.
1067 (Gen_Output_File_C): Ditto.
1068 (Gen_Restrictions_C): Ditto.
1069 (Gen_Versions_C): Ditto.
1070 (Write_Info_Ada_C): Ditto.
1071 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
1072 (Gen_Output_File): Do not force Ada_Bind_File anymore.
1073 Always call Gen_Output_File_Ada.
1074 * gnatlink.adb (Begin_Info): Now a constant.
1075 (End_Info): Ditto.
1076 (Ada_Bind_File): Remove
1077 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
1078 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
1079 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
1080 * opt.ads (Ada_Bind_File): Remove.
1081
1082 2011-08-04 Thomas Quinot <quinot@adacore.com>
1083
1084 * projects.texi: Document target-specific directory in default project
1085 path for gnatmake.
1086
1087 2011-08-04 Thomas Quinot <quinot@adacore.com>
1088
1089 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
1090 path in all cases .
1091
1092 2011-08-04 Yannick Moy <moy@adacore.com>
1093
1094 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
1095 opt.ads, lib-xref.ads: Code clean up.
1096
1097 2011-08-04 Yannick Moy <moy@adacore.com>
1098
1099 * gnat_rm.texi: Update description of Test_Case
1100 * gnat_ugn.texi: Typo.
1101
1102 2011-08-04 Ed Falis <falis@adacore.com>
1103
1104 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
1105
1106 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1107
1108 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
1109 it is of type Root_Controlled. This action eliminates fields Prev and
1110 Next from type equality.
1111
1112 2011-08-04 Yannick Moy <moy@adacore.com>
1113
1114 * lib-xref-alfa.adb: Correct typo.
1115
1116 2011-08-04 Matthew Heaney <heaney@adacore.com>
1117
1118 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
1119 component.
1120
1121 2011-08-04 Yannick Moy <moy@adacore.com>
1122
1123 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
1124 (Analyze_Pragma): allow static string expression for name of Test_Case,
1125 instead of simply string literals.
1126 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
1127 expressions.
1128
1129 2011-08-04 Vincent Celier <celier@adacore.com>
1130
1131 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
1132 case suffixes to find truncated main sources.
1133
1134 2011-08-04 Tristan Gingold <gingold@adacore.com>
1135
1136 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
1137 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
1138 (Compute_Current_Task): Ditto.
1139
1140 2011-08-04 Tristan Gingold <gingold@adacore.com>
1141
1142 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
1143
1144 2011-08-04 Yannick Moy <moy@adacore.com>
1145
1146 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
1147 library-level constant.
1148 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
1149 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
1150 used as selector of parameter association, in ALFA mode.
1151
1152 2011-08-04 Robert Dewar <dewar@adacore.com>
1153
1154 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
1155 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
1156 reformatting.
1157
1158 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1159
1160 * make.adb (Linking_Phase): Set source search path before calling
1161 gnatlink in CodePeer mode.
1162
1163 2011-08-04 Javier Miranda <miranda@adacore.com>
1164
1165 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
1166 Remove code which takes care of building TSDs.
1167 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
1168 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
1169 the accessibility check in VM targets.
1170 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
1171 (Building_Static_DT): Now returns false for VM targets.
1172 (Build_VM_TSDs): Removed.
1173 (Expand_Interface_Conversion): Generate missing runtime check for
1174 conversions to interface types whose target type is unknown at compile
1175 time.
1176 (Make_VM_TSD): Add missing code to disable the generation of calls to
1177 Check_TSD if the tagged type is not defined at library level, or not
1178 has a representation clause specifying its external tag, or -gnatdQ is
1179 active.
1180 * exp_disp.ads (Build_VM_TSDs): Removed.
1181 (Make_VM_TSDs): Spec relocated from exp_disp.adb
1182 * sem_disp.adb (Check_Dispatching_Operation): No code required to
1183 register primitives in the dispatch tables in VM targets.
1184 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
1185 initialization of class-wide interface objects in VM targets.
1186 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
1187 of Make_DT).
1188
1189 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
1190
1191 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
1192 when dotnet-ld cannot be found.
1193
1194 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1195
1196 * bindgen.adb: Simplify significantly generation of binder body file in
1197 CodePeer mode.
1198 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
1199 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
1200 not expanded).
1201
1202 2011-08-04 Yannick Moy <moy@adacore.com>
1203
1204 * sem_prag.adb, sem.ads: Code cleanup.
1205
1206 2011-08-04 Tristan Gingold <gingold@adacore.com>
1207
1208 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
1209 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
1210 results if possible.
1211 * s-stusta.adb (Print): Adjust after changes in s-stausa.
1212 * gnat_ugn.texi: Update dynamic stack usage section.
1213
1214 2011-08-04 Steve Baird <baird@adacore.com>
1215
1216 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
1217 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
1218 contains only a call to the user-defined main subprogram.
1219 (Gen_Main_Ada) - If CodePeer_Mode is set, then
1220 call the "wrapper" subprogram instead of directly
1221 calling the user-defined main subprogram.
1222
1223 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1224
1225 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
1226 alternatives of a case statement for controlled objects. Rename local
1227 variable A to Dead_Alt.
1228 (Expand_N_If_Statement): Check the then and else statements of an if
1229 statement for controlled objects. Check the then statements of all
1230 elsif parts of an if statement for controlled objects.
1231 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
1232 objects.
1233 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
1234 detects a loop associated with the expansion of an array object.
1235 Augment the processing of the loop statements to account for a possible
1236 wrap done by Process_Statements_For_Controlled_Objects.
1237 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
1238 statements and abortable part of an asynchronous select for controlled
1239 objects.
1240 (Expand_N_Conditional_Entry_Call): Check the else statements of a
1241 conditional entry call for controlled objects.
1242 (Expand_N_Selective_Accept): Check the alternatives of a selective
1243 accept for controlled objects.
1244 (Expand_N_Timed_Entry_Call): Check the entry call and delay
1245 alternatives of a timed entry call for controlled objects.
1246 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
1247 exception handler for controlled objects.
1248 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
1249 Add formal parameter Nested_Constructs along with its associated
1250 comment.
1251 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
1252 Requires_Cleanup_Actions.
1253 (Process_Statements_For_Controlled_Objects): New routine.
1254 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
1255 routine. Inspect a node which contains a non-handled sequence of
1256 statements for controlled objects. If such an object is found, the
1257 statements are wrapped in a block.
1258
1259 2011-08-04 Bob Duff <duff@adacore.com>
1260
1261 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
1262 need to compare with Class_Wide_Type (T2), in order to get at the
1263 original class-wide type node.
1264 * sem_type.ads (Covers): Improve the comment.
1265 * einfo.ads (Class_Wide_Type): Improve the comment.
1266 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
1267 the type of the Deref.
1268
1269 2011-08-04 Yannick Moy <moy@adacore.com>
1270
1271 * gnat_rm.texi: Document that Test_Case pragma can only appear on
1272 separate declarations.
1273 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
1274 check identifier of pragma argument.
1275 (Chain_TC): check that no other test case associated to the same entity
1276 share the same name.
1277 (Check_Test_Case): disallow test case inside subprogram body
1278 (Analyze_Pragma): correct call to check identifier and not argument
1279 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
1280 function gets name from test case pragma.
1281
1282 2011-08-04 Yannick Moy <moy@adacore.com>
1283
1284 * gnat_rm.texi: Document new pragma and aspect.
1285 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
1286 (No_Duplicates_Allowed): new constant array defining whether duplicates
1287 aspects of each kind can appear on the same declaration.
1288 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
1289 field, which points to a node holding the previous Spec_PPC_List.
1290 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
1291 through the indirection with Contract.
1292 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
1293 * par-prag.adb (Prag): do nothing on Test_Case pragma
1294 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
1295 be called directly.
1296 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
1297 component Ensures of Test_Case.
1298 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
1299 (Analyze_Generic_Subprogram_Declaration,
1300 Analyze_Subprogram_Instantiation,
1301 Analyze_Abstract_Subprogram_Declaration,
1302 Analyze_Subprogram_Body_Helper,
1303 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
1304 insert contract in subprogram node at point of definition
1305 * sem_ch13.adb
1306 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
1307 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
1308 corresponding pragma
1309 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
1310 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
1311 similar to the analysis of pre/post
1312 (Derive_Subprogram): insert contract in subprogram node at point of
1313 derivation.
1314 * sem_prag.adb, sem_prag.ads
1315 (Check_Arg_Is_String_Literal, Check_Identifier):
1316 new checking procedures to be called in treatment of pragmas
1317 (Check_Test_Case): new procedure to check that a Test_Case aspect or
1318 pragma is well-formed. This does not check currently that 'Result is
1319 used only in the Ensures component of a Test_Case.
1320 (Analyze_Pragma): add case for Test_Case
1321 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
1322 components of a Test_Case.
1323 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
1324 expressions in the 3rd (and 4th if present) arguments of a Test_Case
1325 pragma, treated as spec expressions.
1326 (Sig_Flags): add value -1 for Test_Case.
1327 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
1328 Get_Requires_From_Test_Case_Pragma): getters for both expression
1329 components of a Test_Case.
1330 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
1331 indirection between an entry or [generic] subprogram entity and its
1332 pre/post + test-cases.
1333 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
1334 get/set for fields of an N_Contract node.
1335 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
1336 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
1337 names and pragma for Test_Case.
1338 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
1339
1340 2011-08-04 Vincent Celier <celier@adacore.com>
1341
1342 * gnat_ugn.texi: Improve documentation of gnatmake switch
1343 --source-info-file=.
1344
1345 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1346
1347 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
1348 type). Initialize Atyp to the appropriate type which is later checked
1349 for completion. Rewrite the assertion associated with private type
1350 completion.
1351
1352 2011-08-04 Ed Falis <falis@adacore.com>
1353
1354 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
1355 initialize the number of CPUs.
1356
1357 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1358
1359 * sem_type.adb (Disambiguate): New subsidiary routine
1360 In_Same_Declaration_List, to implement AI05-0020: a user-defined
1361 equality on an anonymous access type whose designated type is private
1362 does not lead to an ambiguity with the universal access equality
1363 operator in the body or child units of the defining package. The same
1364 is true for a multiplication operator on a private type completed with
1365 a fixed-point-type.
1366
1367 2011-08-04 Javier Miranda <miranda@adacore.com>
1368
1369 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
1370 (Normalize_Scalars_Config): Removed.
1371 * opt.adb
1372 (Register_Opt_Config_Switches): Remove registering config values of
1373 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
1374 (Restore_Opt_Config_Switches): Remove code which restores the values of
1375 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1376 Init_Or_Norm_Scalars.
1377 (Save_Opt_Config_Switches): Remove code which saves values of
1378 Init_Or_Norm_Scalars and Normalize_Scalars.
1379 (Set_Opt_Config_Switches): Remove code which restores config values of
1380 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1381 Init_Or_Norm_Scalars.
1382
1383 2011-08-04 Yannick Moy <moy@adacore.com>
1384
1385 * frontend.adb (Frontend): remove previous patch to avoid full
1386 qualification in ALFA mode.
1387 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
1388 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
1389 unique name for an entity, which could be used to identify the entity
1390 across compilation units.
1391
1392 2011-08-04 Thomas Quinot <quinot@adacore.com>
1393
1394 * prj-env.adb
1395 (Initialize_Default_Project_Path): Add target specific directory
1396 ($prefix/$target/lib/gnat) in front of project path in all cases
1397 (making gnatmake's behaviour consistent with gprbuild).
1398 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
1399 Pass target name from Sdefault to project subsystem.
1400 * gnatls.adb: Show new target specific default project directory.
1401
1402 2011-08-04 Johannes Kanig <kanig@adacore.com>
1403
1404 * cstand.adb: Add Information to Identifier in Standard
1405 (Identifer_For): Set Entity to the corresponding entity
1406
1407 2011-08-04 Sergey Rybin <rybin@adacore.com>
1408
1409 * gnat_ugn.texi: Update doc on gnatcheck.
1410
1411 2011-08-04 Yannick Moy <moy@adacore.com>
1412
1413 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
1414 xrefs in a scope.
1415
1416 2011-08-04 Yannick Moy <moy@adacore.com>
1417
1418 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
1419 performing expansion.
1420 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
1421 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
1422 it is not called in ALFA mode.
1423
1424 2011-08-04 Emmanuel Briot <briot@adacore.com>
1425
1426 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
1427 after all, so removed.
1428
1429 2011-08-04 Sergey Rybin <rybin@adacore.com>
1430
1431 * vms_data.ads: Add missing VMS qualifiers.
1432
1433 2011-08-04 Emmanuel Briot <briot@adacore.com>
1434
1435 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
1436 the list of files on the command line after processing it through
1437 Complete_Mains.
1438
1439 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1440
1441 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
1442 processing for .NET/JVM. These targets can now benefit from
1443 Raise_From_Controlled_Operation and they share the same processing with
1444 standard targets.
1445 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
1446 These targets need transient scopes in order to properly finalize short
1447 lived controlled objects.
1448 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
1449 NET/JVM. These targets can now benefit from
1450 Raise_From_Controlled_Operation and they share the same processing with
1451 standard targets.
1452
1453 2011-08-04 Geert Bosch <bosch@adacore.com>
1454
1455 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1456
1457 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1458
1459 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1460 Expand_Record_Aggregate, to determine whether aggregate must be
1461 expanded into assignments. This is the case if the ancestor part is
1462 private, regarless of the setting of the flag Has_Private_Ancestor.
1463
1464 2011-08-04 Ed Falis <falis@adacore.com>
1465
1466 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
1467
1468 2011-08-04 Bob Duff <duff@adacore.com>
1469
1470 * sinfo.ads: Fix comment.
1471
1472 2011-08-04 Steve Baird <baird@adacore.com>
1473
1474 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
1475 choose a package name in much the same way as is
1476 done for JGNAT when VM_Target /= No_VM, except that
1477 a slightly more distinctive prefix string is used.
1478
1479 2011-08-04 Emmanuel Briot <briot@adacore.com>
1480
1481 * makeutl.adb (Complete_Mains): no longer accept unit names on the
1482 gnatmake command line.
1483 This behavior was never documented (and was supported only because of
1484 an early bug in the code). This case might lead to ambiguous cases
1485 (between unit names and truncated base names without suffixes).
1486
1487 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1488
1489 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
1490 Remove the external tag of a tagged type from the internal hash table.
1491 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
1492 expanded usage of the routine. Strenghten the check for Is_Master. Add
1493 processing for tagged types.
1494 (Build_Finalizer): Create all the necessary lists used in finalizer
1495 creation when the processed context is a package that may contain
1496 tagged types.
1497 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
1498 Requires_Cleanup_Actions.
1499 (Expand_N_Package_Body): Package bodies may need clean up code
1500 depending on whether they contain tagged types.
1501 (Expand_N_Package_Declaration): Package declarations may need clean up
1502 code depending on whether they contain tagged types.
1503 (Unregister_Tagged_Types): New routine. Search through a list of
1504 declarations or statements, looking for non-abstract Ada tagged types.
1505 For each such type, generate code to unregister the external tag.
1506 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
1507 Requires_Cleanup_Actions.
1508 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
1509 through a list of declarations or statements looking for non-abstract
1510 Ada tagged types or controlled objects.
1511 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
1512 Requires_Cleanup_Actions.
1513 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
1514 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
1515 RE_Unit_Table.
1516
1517 2011-08-04 Vincent Celier <celier@adacore.com>
1518
1519 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
1520 has Ada sources, not project Project, because if the root project
1521 Project has no sources of its own, all projects will be deemed without
1522 sources.
1523
1524 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1525
1526 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
1527 of the No_Param_Proc acc-to-subp type used for initialization of
1528 __gnat_finalize_library_objects so that it's declared at library level
1529 rather than nested inside of the adainit routine.
1530
1531 2011-08-04 Javier Miranda <miranda@adacore.com>
1532
1533 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
1534 if the tagged type has a representation clause which specifies its
1535 external tag.
1536
1537 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1538
1539 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
1540 Remove previous procedure with that name.
1541 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
1542 when appropriate.
1543 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
1544 subtype mark, the ancestor cannot have unknown discriminants.
1545 (Resolve_Record_Aggregate): if the type has invisible components
1546 because of a private ancestor, the aggregate is illegal.
1547
1548 2011-08-04 Vincent Celier <celier@adacore.com>
1549
1550 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
1551 account switches -gnat2005, -gnat12 and -gnat2012.
1552
1553 2011-08-04 Bob Duff <duff@adacore.com>
1554
1555 * s-tasdeb.ads: Minor comment fix.
1556
1557 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1558
1559 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
1560 CodePeer mode.
1561 * switch.ads, switch.adb (Is_Language_Switch): New function.
1562
1563 2011-08-04 Vincent Celier <celier@adacore.com>
1564
1565 * switch-c.adb: Minor comment addition.
1566
1567 2011-08-04 Vincent Celier <celier@adacore.com>
1568
1569 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
1570 ending with '=' is followed by a space (missing file name).
1571
1572 2011-08-04 Pascal Obry <obry@adacore.com>
1573
1574 * g-regist.ads: Fix size of HKEY on x86_64-windows.
1575
1576 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1577
1578 * sem_ch12.adb (Analyze_Associations): New routine
1579 Check_Overloaded_Formal_Subprogram to reject a formal package when
1580 there is a named association or a box initialisation for an overloaded
1581 formal subprogram of the corresponding generic.
1582
1583 2011-08-04 Yannick Moy <moy@adacore.com>
1584
1585 * alfa.ads (ALFA_Xref_Record): add component for type of entity
1586 * get_alfa.adb, put_alfa.adb: Read and write new component of
1587 cross-reference.
1588 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
1589
1590 2011-08-04 Pascal Obry <obry@adacore.com>
1591
1592 * urealp.adb: Minor reformatting.
1593
1594 2011-08-04 Tristan Gingold <gingold@adacore.com>
1595
1596 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
1597 Handle the case when Cleanup_Protected_Object returns Empty.
1598
1599 2011-08-04 Yannick Moy <moy@adacore.com>
1600
1601 * frontend.adb (Frontend): only qualify names in non-ALFA mode
1602
1603 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1604
1605 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
1606 call, ignore functions.
1607
1608 2011-08-04 Geert Bosch <bosch@adacore.com>
1609
1610 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
1611 point.
1612
1613 2011-08-04 Emmanuel Briot <briot@adacore.com>
1614
1615 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
1616 as an index for Builder'Switches. This conforms to the documentation.
1617 * make.adb (Insert_Project_Sources): avoid duplicate code
1618
1619 2011-08-04 Emmanuel Briot <briot@adacore.com>
1620
1621 * makeutl.adb (Complete_Mains): if the user has passed a relative file
1622 name on the command line (for instance "../dummy"), never assume it can
1623 be a unit name.
1624
1625 2011-08-04 Tristan Gingold <gingold@adacore.com>
1626
1627 * bindgen.adb: Remove code the reference or create the
1628 Break_Start/__gnat_break_start procedure.
1629 * s-stalib.adb (Break_Start): Removed.
1630
1631 2011-08-04 Emmanuel Briot <briot@adacore.com>
1632
1633 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
1634 shared with gprbuild.
1635
1636 2011-08-04 Yannick Moy <moy@adacore.com>
1637
1638 * par-ch4.adb (P_Primary): preferentially issue an error message about
1639 a missing parenthesis arount a conditional or case expression in Ada
1640 2012 mode, if we detect that the alignment is not correct for a
1641 statement.
1642
1643 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1644
1645 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1646 tag-to-class-wide conversion as needing finalization actions.
1647 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1648 a tag-to-class-wide conversion as needing finalization actions.
1649 (Is_Finalizable_Transient): The result of a tag-to-class-wide
1650 conversion does not need finalization actions.
1651 (Is_Tag_To_CW_Conversion): New routine.
1652 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1653 whether an object is the result of a tag-to-class-wide conversion.
1654
1655 2011-08-04 Yannick Moy <moy@adacore.com>
1656
1657 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1658 the left-hand-side and right-hand-side of a conjunct are inserted when
1659 translating a pre- or postcondition
1660 * sem_ch6.adb: Correct typo in comment
1661
1662 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1663
1664 * gnat_rm.texi: Ravenscar does not prohibit dependence on
1665 Unchecked_Conversion and Unchecked_Deallocation.
1666
1667 2011-08-04 Thomas Quinot <quinot@adacore.com>
1668
1669 * make.adb: Minor reformatting.
1670
1671 2011-08-04 Emmanuel Briot <briot@adacore.com>
1672
1673 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1674 sources in the project and its imported projects, but not in the whole
1675 tree.
1676
1677 2011-08-04 Emmanuel Briot <briot@adacore.com>
1678
1679 * make.adb: Remove debug trace.
1680
1681 2011-08-04 Vincent Celier <celier@adacore.com>
1682
1683 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
1684 path in canonical form, to be able to compare path names on platforms
1685 such as Windows or Darwin.
1686
1687 2011-08-04 Thomas Quinot <quinot@adacore.com>
1688
1689 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
1690 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
1691 * scos.ads: Update documentation accordingly.
1692 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
1693 pragmas.
1694
1695 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1696
1697 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
1698 attribute only if prefix type is scalar.
1699
1700 2011-08-04 Emmanuel Briot <briot@adacore.com>
1701
1702 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
1703 in gnatmake for specifying mains on the command line that do not belong
1704 to the main project. These mains must currently all belong to the same
1705 project, though.
1706 (Ultimate_Extension_Of): removed, since duplicated
1707 Ultimate_Extending_Project.
1708
1709 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1710
1711 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
1712 instead.
1713 (CodePeer_Mode_String): New.
1714 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
1715 CodePeer mode.
1716 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
1717 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
1718 mode, since no useful elaboration subprogram is needed by CodePeer.
1719 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
1720 In this mode, compile binder file with -gnatC and do stop after this
1721 step.
1722
1723 2011-08-04 Vincent Celier <celier@adacore.com>
1724
1725 * exp_ch7.adb: Minor comment fix.
1726
1727 2011-08-04 Robert Dewar <dewar@adacore.com>
1728
1729 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
1730 exp_ch4.adb, makeutl.adb: Minor reformatting.
1731
1732 2011-08-04 Emmanuel Briot <briot@adacore.com>
1733
1734 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
1735 Create several new subprograms to move code out of Make. This makes the
1736 code more readable, removes code duplication, and is a preparation work
1737 for adding support for aggregate projects.
1738
1739 2011-08-04 Tristan Gingold <gingold@adacore.com>
1740
1741 * s-po32gl.ads, s-po32gl.adb: New files.
1742 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
1743 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
1744 (Build_Finalization_Collection): Use it.
1745 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
1746 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
1747 literals.
1748 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
1749 * gcc-interface/Make-lang.in: Update dependencies.
1750
1751 2011-08-04 Emmanuel Briot <briot@adacore.com>
1752
1753 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
1754 the command line.
1755
1756 2011-08-04 Emmanuel Briot <briot@adacore.com>
1757
1758 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
1759 command line is not a file name, also check whether it could be a unit
1760 name.
1761
1762 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1763
1764 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
1765 the header of the finalization routine.
1766 If the unit has no finalizer but is a body whose spec has one, then
1767 generate the decrement of the elaboration entity only.
1768 If the unit has a finalizer and is a spec, then do not generate the
1769 decrement of the elaboration entity.
1770 (Gen_Finalize_Library_C): Likewise.
1771
1772 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1773
1774 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
1775 (Bounds_Size_Expression): Removed.
1776 (Double_Alignment_Of): New subsidiary routine.
1777 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
1778 for a hole in the dope vector of unconstrained arrays due to different
1779 index and element alignments.
1780
1781 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1782
1783 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
1784 raise program_error because body has not been seen yet.
1785
1786 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1787
1788 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
1789 an unresolved name.
1790
1791 2011-08-04 Vincent Celier <celier@adacore.com>
1792
1793 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
1794
1795 2011-08-04 Yannick Moy <moy@adacore.com>
1796
1797 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
1798 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
1799
1800 2011-08-04 Thomas Quinot <quinot@adacore.com>
1801
1802 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
1803 instantiation in RCI.
1804
1805 2011-08-04 Emmanuel Briot <briot@adacore.com>
1806
1807 * make.adb: Share more code with gprbuild
1808
1809 2011-08-04 Emmanuel Briot <briot@adacore.com>
1810
1811 * projects.texi: Added documentation for the IDE'Gnat project file
1812 attribute.
1813
1814 2011-08-04 Nicolas Roche <roche@adacore.com>
1815
1816 * gnat_rm.texi: Minor editing.
1817
1818 2011-08-04 Javier Miranda <miranda@adacore.com>
1819
1820 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
1821 and the library case for VM targets.
1822 (Gen_Adainit_Ada): Likewise.
1823
1824 2011-08-04 Robert Dewar <dewar@adacore.com>
1825
1826 * g-altive.ads: Minor comment updates.
1827 * prj-nmsc.adb: Minor reformatting.
1828
1829 2011-08-04 Javier Miranda <miranda@adacore.com>
1830
1831 * opt.ads
1832 (Normalize_Scalars_Config): Value of the configuration switch set by
1833 pragma Normalize_Scalars when it appears in the gnat.adc file.
1834 (Normalize_Scalars): New field for record Config_Switches_Type. Used
1835 to save and restore settings of this pragma.
1836 * opt.adb
1837 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
1838 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
1839
1840 2011-08-04 Vincent Celier <celier@adacore.com>
1841
1842 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
1843
1844 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1845
1846 * makeutl.adb: Minor reformatting.
1847
1848 2011-08-04 Olivier Hainque <hainque@adacore.com>
1849
1850 * g-altive.ads: Update comments to reflect that only the soft
1851 binding is available today.
1852
1853 2011-08-04 Robert Dewar <dewar@adacore.com>
1854
1855 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
1856 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
1857 * gcc-interface/Make-lang.in: Update dependencies.
1858
1859 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1860
1861 * prj-env.adb: Remove local debug traces.
1862
1863 2011-08-04 Yannick Moy <moy@adacore.com>
1864
1865 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
1866 was used instead of Hi_OK, which could cause a read of an uninitialized
1867 value later on. Detected while working on the new warning.
1868 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
1869 to local variable.
1870 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
1871 in more cases, in order to detect more unreferenced values.
1872 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
1873 object for expression, if any.
1874
1875 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1876
1877 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
1878 the operand types instead of the Esize.
1879
1880 2011-08-04 Steve Baird <baird@adacore.com>
1881
1882 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
1883 enable CodePeer_Mode.
1884 * bindusg.adb (Display): Add help message describing -P binder switch.
1885 * gnat_ugn.texi: Document -P binder switch.
1886 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
1887 user-defined main program directly.
1888 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
1889 user-defined main program in the context clause of the package body.
1890
1891 2011-08-04 Yannick Moy <moy@adacore.com>
1892
1893 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
1894 duplicate of Defining_Entity
1895 (Get_Unique_Entity_For_Decl): rename function into
1896 Unique_Defining_Entity
1897 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
1898 (Formal_Proof_On): remove synthesized flag
1899 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1900 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
1901 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
1902 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
1903 Annotate (Formal_Proof)
1904
1905 2011-08-04 Emmanuel Briot <briot@adacore.com>
1906
1907 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
1908 source files with non-standard naming schemes, in imported projects
1909
1910 2011-08-04 Emmanuel Briot <briot@adacore.com>
1911
1912 * makeutl.adb (Complete_Mains): when a multi-unit source file is
1913 specified on the gprbuild command line, we need to compile all units
1914 within that file, not just the first one we find
1915 Fix error message for mains that are not found.
1916
1917 2011-08-04 Thomas Quinot <quinot@adacore.com>
1918
1919 * sem_ch6.adb: Update comment.
1920 * sem_ch12.adb: Minor reformatting.
1921
1922 2011-08-04 Bob Duff <duff@adacore.com>
1923
1924 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
1925 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
1926 race condition whose symptom is to fail to lock Parent. That, in turn,
1927 causes Parent.Awake_Count to be accessed without locking Parent, which
1928 causes another race condition whose symptom is that Parent.Awake_Count
1929 can be off by 1 (either too high or too low). The solution is to lock
1930 Parent unconditionally, and then lock Acceptor, before reading
1931 Acceptor.Terminate_Alternative.
1932
1933 2011-08-04 Arnaud Charlet <charlet@adacore.com>
1934
1935 * debug.adb: Update comment.
1936
1937 2011-08-04 Robert Dewar <dewar@adacore.com>
1938
1939 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
1940 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
1941 exp_ch6.adb: Minor reformatting.
1942
1943 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1944
1945 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
1946 checks for -gnateE.
1947
1948 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1949
1950 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
1951
1952 2011-08-04 Thomas Quinot <quinot@adacore.com>
1953
1954 * sinfo.ads: Minor reformatting.
1955
1956 2011-08-04 Emmanuel Briot <briot@adacore.com>
1957
1958 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
1959 even if there is no location.
1960
1961 2011-08-04 Ed Schonberg <schonberg@adacore.com>
1962
1963 * sem_res.adb, sem_ch4.adb: move check for restriction
1964 No_Task_Hierarchy to resolve_allocator.
1965
1966 2011-08-04 Thomas Quinot <quinot@adacore.com>
1967
1968 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
1969 This flag of N_Pragma nodes is not used, remove it as well as all of
1970 the associated circuitry.
1971
1972 2011-08-04 Javier Miranda <miranda@adacore.com>
1973
1974 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
1975 runtime check on duplicated externa tags
1976 * debug.adb Document switch -gnatdQ.
1977
1978 2011-08-04 Gary Dismukes <dismukes@adacore.com>
1979
1980 * a-fihema.ads: Minor typo fix.
1981
1982 2011-08-04 Yannick Moy <moy@adacore.com>
1983
1984 * sem_ch10.adb: Minor comment update.
1985
1986 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1987
1988 * einfo.adb: Update the node field usage to reflect the renaming of
1989 Return_Flag to Return_ Flag_Or_Transient_Decl.
1990 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
1991 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
1992 (Write_Field15_Name): Change Return_Flag to
1993 Return_Flag_Or_Transient_Decl.
1994 * einfo.ads: Rename node field Return_Flag to
1995 Return_Flag_Or_Transient_Decl. Update the associated comment and all
1996 occurrences in entities.
1997 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
1998 associated Inline pragma.
1999 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
2000 associated Inline pragma.
2001 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
2002 routine.
2003 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
2004 Return_Flag and Set_Return_Flag.
2005 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
2006 objects generated for controlled transients declared inside an
2007 Exception_With_Actions. Update the calls to Return_Flag.
2008 (Process_Object_Declaration): Add code to add a null guard for hook
2009 objects generated for controlled transients declared inside an
2010 Exception_With_Actions. Update related comment.
2011 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
2012 objects generated for controlled transients declared inside an
2013 Exception_With_Actions. Update the calls to Return_Flag.
2014 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
2015
2016 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2017
2018 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
2019 positional aggregate.
2020
2021 2011-08-04 Vincent Celier <celier@adacore.com>
2022
2023 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
2024 SLOC only for pragmas.
2025
2026 2011-08-04 Emmanuel Briot <briot@adacore.com>
2027
2028 * projects.texi: Minor typo fix.
2029
2030 2011-08-04 Emmanuel Briot <briot@adacore.com>
2031
2032 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
2033 on case-sensitive file systems.
2034
2035 2011-08-04 Thomas Quinot <quinot@adacore.com>
2036
2037 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
2038 nested in a disabled pragma.
2039 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
2040 enclosing pragma, if any, for X decisions.
2041
2042 2011-08-04 Thomas Quinot <quinot@adacore.com>
2043
2044 * sem_prag.adb: Minor reformatting.
2045
2046 2011-08-04 Vincent Celier <celier@adacore.com>
2047
2048 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
2049 allowed in no run time mode.
2050
2051 2011-08-04 Vincent Celier <celier@adacore.com>
2052
2053 * make.adb (Check): When -gnatc is used, check for the source file
2054 inside the ALI file with a canonical case file name.
2055
2056 2011-08-04 Emmanuel Briot <briot@adacore.com>
2057
2058 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
2059 overriding the separator.
2060
2061 2011-08-04 Robert Dewar <dewar@adacore.com>
2062
2063 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
2064 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
2065
2066 2011-08-04 Robert Dewar <dewar@adacore.com>
2067
2068 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
2069
2070 2011-08-04 Yannick Moy <moy@adacore.com>
2071
2072 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
2073 'Result only appears in postcondition of function.
2074
2075 2011-08-04 Thomas Quinot <quinot@adacore.com>
2076
2077 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
2078 external tag, include the value of the external tag in the exception
2079 message.
2080
2081 2011-08-04 Yannick Moy <moy@adacore.com>
2082
2083 * sem_attr.adb (Result): modify error message for misplaced 'Result
2084
2085 2011-08-04 Sergey Rybin <rybin@adacore.com>
2086
2087 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
2088 clear that the second argument must be an identifier.
2089
2090 2011-08-04 Thomas Quinot <quinot@adacore.com>
2091
2092 * exp_ch9.adb (Build_Barrier_Function): When compiling with
2093 -fpreserve-control-flow, insert an IF statement on the barrier
2094 condition to ensure that a conditional branch instruction is generated.
2095
2096 2011-08-04 Emmanuel Briot <briot@adacore.com>
2097
2098 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
2099 (Processing_Flags.Ignore_Missing_With): new flag.
2100
2101 2011-08-04 Emmanuel Briot <briot@adacore.com>
2102
2103 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
2104 Source_List_File on case-insensitive systems where the file is actually
2105 on a case-sensitive file system (NFS,...).
2106
2107 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2108
2109 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
2110 function return contains a controlled [extension] aggregate and the
2111 return statement is not part of a handled sequence of statements, wrap
2112 the return in a block. This ensures that all controlled temporaries
2113 generated during aggregate resolution will be picked up by the
2114 finalization machinery.
2115
2116 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2117
2118 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
2119 components, freeze type before resolution, to ensure that default
2120 initializations are present for all components.
2121 * sem_res.adb (Resolve_Actuals): the designated object of an
2122 accces-to-constant type is a legal actual in a call to an
2123 initialization procedure.
2124
2125 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2126
2127 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
2128 N_Unchecked_Type_Conversion to the possible containers of a renamed
2129 transient variable.
2130
2131 2011-08-04 Yannick Moy <moy@adacore.com>
2132
2133 * par-ch13.adb (Aspect_Specifications_Present): recognize
2134 "with Identifier'Class =>" as an aspect, so that a meaningful warning
2135 is issued in Strict mode.
2136 * par.adb: Fix typos in comments.
2137
2138 2011-08-04 Yannick Moy <moy@adacore.com>
2139
2140 * sem_attr.adb (Result): modify error message to take into account Post
2141 aspect when compiling Ada 2012 (or newer) code.
2142
2143 2011-08-04 Nicolas Roche <roche@adacore.com>
2144
2145 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2146 remove need for GCC exceptions.
2147
2148 2011-08-04 Vincent Celier <celier@adacore.com>
2149
2150 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
2151 project, not the source file name.
2152 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
2153 excluded, continue looking. This excluded source will only be returned
2154 if there is no other source with the same base name that is not locally
2155 removed.
2156
2157 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2158
2159 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
2160 private and one of the operands is a real literal, use a qualified
2161 expression rather than a conversion which is not meaningful to the
2162 back-end.
2163
2164 2011-08-04 Yannick Moy <moy@adacore.com>
2165
2166 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
2167 corresponding aspect X'Class are allowed, proceed with analysis of the
2168 aspect instead of skipping it.
2169
2170 2011-08-04 Tristan Gingold <gingold@adacore.com>
2171
2172 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
2173 This will allow to have an Ada implementation for the subprogram.
2174
2175 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2176
2177 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
2178 completion and aspects are present, apply them to the entity for the
2179 type which is currently the partial view, but which is the one that
2180 will be frozen.
2181 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
2182 applies to a partial view, indicate that the full view has predicates
2183 and delayed aspects.
2184 (Replace_Type_Reference): Handle properly predicates that apply to the
2185 full view of a private completion.
2186
2187 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2188
2189 * layout.adb (Layout_Type): For composite types, do not set Esize.
2190 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
2191 set Esize.
2192 (Size_Known): Look at the RM size of components instead of the Esize.
2193 (Freeze_Record_Type): Look at the RM size instead of the Esize to
2194 issue warning and activate Implicit_Packing.
2195 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
2196 if the Esize is not known.
2197 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
2198 for elementary types only.
2199 (Analyze_Record_Representation_Clause): Look at the RM size instead
2200 of the Esize to issue errors.
2201 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
2202 is not known.
2203 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
2204 obsolete block.
2205 Look at the RM size instead of the Esize for types if the latter is
2206 not known.
2207 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
2208
2209 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2210
2211 * sem_type.adb: proper handling of equality not involving anonymous
2212 access types.
2213
2214 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2215
2216 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
2217 Vis_Decls. When creating a library-level finalizer for a package spec,
2218 both the declaration and body of the finalizer are inserted either in
2219 the visible or private declarations of the package spec.
2220
2221 2011-08-04 Javier Miranda <miranda@adacore.com>
2222
2223 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
2224 use of the full-view of a type when invoking Is_Ancestor.
2225 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
2226 the full-view of private parents is requested, then use also the
2227 full-view of the parent of the first derivation.
2228
2229 2011-08-04 Tristan Gingold <gingold@adacore.com>
2230
2231 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
2232 instead of the locally imported procedure.
2233 * s-taprop-mingw.adb (Enter_Task): Ditto.
2234 * s-valrea.adb (Scan_Real): Ditto.
2235 * s-imgrea.adb (Set_Image_Real): Ditto.
2236 * s-flocon.ads: Make the package pure.
2237
2238 2011-08-04 Thomas Quinot <quinot@adacore.com>
2239
2240 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
2241 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
2242 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
2243 New subprogram, moved here from...
2244 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
2245 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
2246 rewriting of the last argument into a procedure call statement here...
2247 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
2248 instead.
2249
2250 2011-08-04 Thomas Quinot <quinot@adacore.com>
2251
2252 * par_sco.adb: Minor reformatting.
2253
2254 2011-08-04 Robert Dewar <dewar@adacore.com>
2255
2256 * erroutc.adb: Minor reformatting.
2257
2258 2011-08-04 Thomas Quinot <quinot@adacore.com>
2259
2260 * par_sco.adb: Comment update.
2261
2262 2011-08-04 Tristan Gingold <gingold@adacore.com>
2263
2264 * s-flocon.ads: New file.
2265 * g-flocon.ads: Now a renaming of s-flocon.
2266 * Makefile.rtl: Add s-flocon.o
2267
2268 2011-08-04 Javier Miranda <miranda@adacore.com>
2269
2270 * exp_strm.adb (Build_Array_Input_Function): if the array type is
2271 constrained, do not attempt to build a subtype of it.
2272
2273 2011-08-04 Yannick Moy <moy@adacore.com>
2274
2275 * errout.ads Change comments: remove 'R'M as an example where quotes
2276 are needed; add ALFA as another case where quotes are not needed
2277 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
2278 case where quotes are not needed.
2279 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
2280 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
2281 Remove all occurrences of 'A'L'F'A
2282
2283 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2284
2285 * sem_ch13.adb: check legality of invariant pragma.
2286
2287 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2288
2289 * bindgen.adb: Add comments.
2290
2291 2011-08-04 Yannick Moy <moy@adacore.com>
2292
2293 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
2294 synthesized flag.
2295 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
2296 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
2297
2298 2011-08-04 Robert Dewar <dewar@adacore.com>
2299
2300 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
2301 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
2302 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
2303
2304 2011-08-04 Thomas Quinot <quinot@adacore.com>
2305
2306 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
2307
2308 2011-08-04 Thomas Quinot <quinot@adacore.com>
2309
2310 PR ada/47880
2311 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
2312 allocated object.
2313
2314 2011-08-04 Robert Dewar <dewar@adacore.com>
2315
2316 * einfo.ads, exp_ch4.adb: Minor reformatting.
2317
2318 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2319
2320 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
2321
2322 2011-08-04 Ed Schonberg <schonberg@adacore.com>
2323
2324 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
2325 type in all cases to compute list of primitive operations, because full
2326 view may be an itype that is not attached to the list of declarations.
2327
2328 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2329
2330 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
2331 library has already been finalized.
2332 (Gen_Adafinal_C): Likewise.
2333 (Gen_Adainit_Ada): Generate an early return if the library has
2334 already been elaborated.
2335 (Gen_Adainit_C): Likewise.
2336 (Gen_Output_File_Ada): Generate an elaboration flag.
2337 (Gen_Output_File_C): Likewise.
2338
2339 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2340
2341 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
2342 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
2343 built in the first place.
2344 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
2345 for CodePeer because Finalize_Address was not built to begin with.
2346 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
2347
2348 2011-08-04 Pascal Obry <obry@adacore.com>
2349
2350 * adaint.c (__gnat_tmp_name): Use current process id to create temp
2351 filenames, this ensures unicity of filenames across processes.
2352
2353 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2354
2355 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
2356 Raise_Controlled to Raise_From_Controlled_Operation. Update the
2357 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
2358 Add False as the actual to From_Abort in the generated call to
2359 Raise_From_Controlled_Operation.
2360
2361 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2362
2363 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
2364 so that the ali file name can be retrieved from outside of this package.
2365 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
2366 doing nothing in the general case, but used to update the object file
2367 timestamp if directly generated by the backend.
2368 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
2369 to a later time than the ali file one.
2370
2371 2011-08-04 Yannick Moy <moy@adacore.com>
2372
2373 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
2374 entities whose body contains an Annotate pragma which forces formal
2375 proof on this body.
2376 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2377 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
2378 Mark_Non_ALFA_Subprogram to pass in a message and node.
2379 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
2380 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
2381 surrounding subprogram.
2382 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
2383 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
2384 as not in ALFA is annotated with Formal_Proof being On, then an error
2385 is issued based on the additional parameters for message and node.
2386 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
2387 * gcc-interface/Make-lang.in: Update dependencies.
2388
2389 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2390
2391 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
2392 Finalize_Address when CodePeer is enabled.
2393
2394 2011-08-04 Pascal Obry <obry@adacore.com>
2395
2396 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
2397 the latter returns a pointer to a static buffer which is deallocated
2398 at the end of the routine.
2399
2400 2011-08-04 Yannick Moy <moy@adacore.com>
2401
2402 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
2403 after index creation; mark unconstrained base array type generated as
2404 being in/not in ALFA as well
2405 (Make_Index): mark subtype created as in/not in ALFA
2406 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
2407 over a loop as in/not in ALFA, depending on its type and form of loop
2408 iteration.
2409
2410 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2411
2412 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
2413 directly to False on .NET and JVM.
2414
2415 2011-08-04 Yannick Moy <moy@adacore.com>
2416
2417 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
2418 constraint that subtype must come from source code to be in ALFA, so
2419 that anonymous subtypes can be in ALFA too.
2420
2421 2011-08-04 Yannick Moy <moy@adacore.com>
2422
2423 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
2424 reference for ALFA mode.
2425 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
2426 procedure public so as to use it from formal verification back-end.
2427
2428 2011-08-04 Jerome Lambourg <lambourg@adacore.com>
2429
2430 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
2431 invalid checks of the Parameter, making Remove_Switch not working
2432 correctly.
2433
2434 2011-08-04 Arnaud Charlet <charlet@adacore.com>
2435
2436 * targparm.ads: Update header: no run-time exception is needed on this
2437 file.
2438
2439 2011-08-04 Vincent Celier <celier@adacore.com>
2440
2441 * a-fihema.adb: Use System.IO instead of GNAT.IO
2442
2443 2011-08-04 Thomas Quinot <quinot@adacore.com>
2444
2445 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
2446 are forbidden in Compiler_Unit mode.
2447
2448 2011-08-04 Robert Dewar <dewar@adacore.com>
2449
2450 * sem_util.adb: Minor reformatting.
2451
2452 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2453
2454 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2455 library-level finalizers.
2456 (Gen_Finalize_Library_C): Update the import string for library-level
2457 finalizers.
2458 (Gen_Finalize_Library_Defs_C): Update the definition name of a
2459 library-level finalizer.
2460 * exp_ch7.adb: Remove with and use clauses for Stringt.
2461 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
2462 Spec_Decl. Add local variable Body_Id. The names of library-level
2463 finalizers are now manually fully qualified and are no longer external.
2464 A single name is now capable of servicing .NET, JVM and non-VM targets.
2465 Pragma Export is no longer required to provide visibility for the name.
2466 (Create_Finalizer_String): Removed.
2467 (New_Finalizer_Name): New routine which mimics New_..._Name.
2468
2469 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2470
2471 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
2472 elaboration counter to Standard_Short_Integer.
2473 * sem_util.adb (Build_Elaboration_Entity): Likewise.
2474 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
2475 (Gen_Elab_Externals_C): Likewise.
2476
2477 2011-08-04 Ed Falis <falis@adacore.com>
2478
2479 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2480 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2481 system-vxworks-mips.ads, system-vxworks-x86.ads
2482 (Always_Compatible_Rep): set to False for all VxWorks targets.
2483
2484 2011-08-04 Robert Dewar <dewar@adacore.com>
2485
2486 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
2487 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
2488 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
2489 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
2490 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
2491 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
2492 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
2493 Minor reformatting and code reorganization.
2494
2495 2011-08-04 Emmanuel Briot <briot@adacore.com>
2496
2497 * projects.texi: Added doc for aggregate projects.
2498
2499 2011-08-04 Emmanuel Briot <briot@adacore.com>
2500
2501 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
2502 Add support for overriding the Project_Path in aggregate projects.
2503
2504 2011-08-04 Robert Dewar <dewar@adacore.com>
2505
2506 * a-cofove.ads: Minor reformatting.
2507
2508 2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2509
2510 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
2511 on the generated code.
2512 (Build_Finalize_Statements): Update the comment on the generated code.
2513 (Build_Initialize_Statements): Update the comment on the generated code.
2514 (Build_Object_Declarations): Add local variable Result. The object
2515 declarations are now built in sequence.
2516 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
2517 RE_Unit_Table.
2518
2519 2011-08-04 Robert Dewar <dewar@adacore.com>
2520
2521 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
2522
2523 2011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2524
2525 * einfo.ads (Elaboration_Entity): Document new definition and use.
2526 (Elaboration_Entity_Required): Adjust to above change.
2527 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
2528 * exp_ch12.adb: And with and use for Snames.
2529 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
2530 * exp_util.adb (Set_Elaboration_Flag): Likewise.
2531 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
2532 <Check_Unit_Name>: Deal with N_Expanded_Name.
2533 <Attribute_Elaborated>: Extend to all unit names.
2534 * sem_elab.adb: And with and use for Uintp.
2535 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
2536 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
2537 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
2538 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
2539 from Gen_Adainit_Ada.
2540 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
2541 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
2542 case, do not call System.Standard_Library.Adafinal; instead call
2543 finalize_library if needed.
2544 (Gen_Adafinal_C): Likewise.
2545 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
2546 non-main program case.
2547 (Gen_Adainit_C): Generate a couple of external declarations here.
2548 In the main program case, set SSL.Finalize_Library_Objects.
2549 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
2550 (Gen_Elab_Calls_C): Likewise.
2551 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
2552 (Gen_Finalize_Library_C): Likewise. Generate a full function.
2553 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
2554 objects here.
2555 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
2556 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
2557 Gen_Adafinal_Ada.
2558 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
2559 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2560 of external declarations. Call Gen_Finalize_Library_C.
2561
2562 2011-08-04 Emmanuel Briot <briot@adacore.com>
2563
2564 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
2565 Compute_Compilation_Phases): new subprogram.
2566 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
2567 The number of mains as well as the various compilation phases that
2568 need to be run are now project tree specific, since various
2569 aggregated trees might have different requirements. In particular,
2570 they do not all require bind or link phases.
2571
2572 2011-08-04 Emmanuel Briot <briot@adacore.com>
2573
2574 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
2575 (Project_Tree_Appdata): New type.
2576 It is now possible to associate application-specific data to a project
2577 tree. In particular, this is used in the gprbuild builder to avoid a
2578 number of global tables and htables, especially now that there can be
2579 several project trees loaded at once because of aggregate projects.
2580 (Debug_Name): new procedure.
2581 * projects.texi: Clarify syntax of "**" for Source_Dirs
2582
2583 2011-08-03 Emmanuel Briot <briot@adacore.com>
2584
2585 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
2586 the "roots" for a main.
2587 (Fill_From_Project): add support for aggregate projects. Main units
2588 in aggregated projects are now automatically added in the list of
2589 files to build (although this fails later on in gprbuild, because
2590 these files are not using the root proejct tree, so this needs
2591 further cleanup)
2592 * gcc-interface/Make-lang.in: Update dependencies.
2593
2594 2011-08-03 Yannick Moy <moy@adacore.com>
2595
2596 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
2597 conditional expression in ALFA.
2598 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
2599 expressions as not in ALFA.
2600
2601 2011-08-03 Robert Dewar <dewar@adacore.com>
2602
2603 * a-cofove.adb: Minor reformatting.
2604
2605 2011-08-03 Emmanuel Briot <briot@adacore.com>
2606
2607 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
2608 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
2609 gprbuild sources.
2610 These packages are more logically placed in the Queue package, since
2611 they manipulate the queue. It is also likely that they can be adapted
2612 for gnatmake, thus sharing more code.
2613 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
2614 that we could move the above.
2615
2616 2011-08-03 Emmanuel Briot <briot@adacore.com>
2617
2618 * errutil.adb (Finalize): clean up the list of error messages on exit.
2619 Calling this subprogram multiple times will no longer show duplicate
2620 error messages on stderr.
2621
2622 2011-08-03 Emmanuel Briot <briot@adacore.com>
2623
2624 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
2625 Getopt_Switches when we have already define a command line
2626 configuration.
2627
2628 2011-08-03 Yannick Moy <moy@adacore.com>
2629
2630 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
2631 in ALFA. Instead, they are considered as assertions to prove.
2632 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
2633 nodes as not in ALFA. Instead, include conditional expressions in ALFA
2634 if they have no ELSE part, or if they occur in pre- and postconditions,
2635 where the Condition cannot have side-effects in ALFA
2636 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
2637 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2638 Instead, include type conversion between scalar types in ALFA.
2639 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2640 if-and-only-if its type is in ALFA.
2641
2642 2011-08-03 Thomas Quinot <quinot@adacore.com>
2643
2644 * scos.adb, get_scos.adb, put_scos.adb
2645 New code letter for decisions: G (entry guard)
2646 * par_sco.adb
2647 (Traverse_Subprogram_Body): Rename to...
2648 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2649 (Traverse_Protected_Body): New subprogram
2650 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2651 protected bodies and entry bodies.
2652
2653 2011-08-03 Yannick Moy <moy@adacore.com>
2654
2655 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2656 entities with get/set subprograms, which is set on procedure entities
2657 generated by the compiler for a postcondition.
2658 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2659 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2660 entity for a declaration
2661 (Get_Unique_Entity_For_Decl): new function returning an entity which
2662 represents a declaration, so that matching spec and body have the same
2663 entity.
2664
2665 2011-08-03 Robert Dewar <dewar@adacore.com>
2666
2667 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2668 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2669
2670 2011-08-03 Yannick Moy <moy@adacore.com>
2671
2672 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2673 library-level because retriction No_Implicit_Dynamic_Code in the
2674 front-end prevents its definition as a local subprogram
2675 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2676 for reuse in other contexts
2677 (Traverse_Declarations_Or_Statements,
2678 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2679 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2680 procedures take a callback parameter to be called on all declarations
2681 * lib-xref.ads
2682 (Traverse_All_Compilation_Units): new generic function to traverse a
2683 compilation unit and call a callback parameter on all declarations
2684
2685 2011-08-03 Javier Miranda <miranda@adacore.com>
2686
2687 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
2688 in Java since they are always enclosed in a namespace that
2689 differentiates them, and overloaded entities are supported by the VM.
2690
2691 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2692
2693 * checks.adb (Determine_Range): If a computed bound of an operation is
2694 outside the range of the base type of the expression, and overflow
2695 checks are enabled, the result is unknown and cannot be used for any
2696 subsequent constant folding.
2697 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
2698 unknown, so is the result of the comparison.
2699
2700 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2701
2702 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
2703 From_Abort. When finalization was triggered by an abort, propagate
2704 Standard'Abort_Signal rather than Program_Error.
2705 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
2706 From_Abort.
2707 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
2708 From_Abort. When finalization was triggered by an abort, propagate
2709 Standard'Abort_Signal rather than Program_Error.
2710 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
2711 From_Abort.
2712 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
2713 Abort_Id. Update the calls to Build_Object_Declarations and
2714 Build_Raise_Statement to include Abort_Id.
2715 (Build_Adjust_Statements): New local variable Abort_Id. Update the
2716 calls to Build_Object_Declarations and Build_Raise_Statement to include
2717 Abort_Id.
2718 (Build_Finalize_Statements): New local variable Abort_Id. Update the
2719 calls to Build_Object_Declarations and Build_Raise_Statement to include
2720 Abort_Id.
2721 (Build_Components): Create an entity for Abort_Id when exceptions are
2722 allowed on the target.
2723 (Build_Finalizer): New local variable Abort_Id.
2724 (Build_Initialize_Statements): New local variable Abort_Id. Update the
2725 calls to Build_Object_Declarations and Build_Raise_Statement to include
2726 Abort_Id.
2727 (Build_Object_Declarations): Add new formal Abort_Id. Create the
2728 declaration of flag Abort_Id to preserve the original abort status
2729 before finalization code is executed.
2730 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
2731 runtime routine Raise_From_Controlled_Operation.
2732 (Create_Finalizer): Update the call to Build_Raise_Statement to include
2733 Abort_Id. Update the call to Build_Object_Declarations to include
2734 Abort_Id. Update the layout of the finalizer body.
2735 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
2736 (Process_Transient_Objects): New local variable Abort_Id. Remove the
2737 clunky code to create all flags and objects related to
2738 exception propagation and replace it with a call to
2739 Build_Object_Declarations. Update the call to Build_Raise_Statement to
2740 include Abort_Id.
2741 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
2742 Add new formal Abort_Id and associated comment on its use.
2743 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
2744 on its use.
2745 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
2746 Remove the clunky code to create all flags and objects related to
2747 exception propagation and replace it with a call to
2748 Build_Object_Declarations. Update the call to Build_Raise_Statement.
2749
2750 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2751
2752 * s-tassta.adb: Fix minor typos.
2753
2754 2011-08-03 Robert Dewar <dewar@adacore.com>
2755
2756 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
2757 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
2758
2759 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2760
2761 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
2762 to packages. This ensures that the finalizer body will not end up
2763 inside the freeze node.
2764 (Process_Declarations): Add code to detect whether a freeze node has a
2765 nested finalization collection.
2766
2767 2011-08-03 Pascal Obry <obry@adacore.com>
2768
2769 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
2770 (Current_Session): Return a not null access to Session_Type.
2771 (Default_Session): Likewise.
2772
2773 2011-08-03 Robert Dewar <dewar@adacore.com>
2774
2775 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
2776 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
2777
2778 2011-08-03 Pascal Obry <obry@adacore.com>
2779
2780 * g-awk.ads: Minor comment fix.
2781
2782 2011-08-03 Sergey Rybin <rybin@adacore.com>
2783
2784 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2785 the tree structure related to discriminant constraints.
2786 Original_Discriminant cannot be used any more for computing the
2787 defining name for the reference to a discriminant.
2788
2789 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2790
2791 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
2792 function is not visibly tagged, this is not a dispatching call and
2793 therfore is not Tag_Indeterminate, even if the function is marked as
2794 dispatching on result.
2795
2796 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2797
2798 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
2799 (Expand_N_Free_Statement): Add a guard to protect against run-times
2800 which do not support controlled types.
2801 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
2802 against run-times which do not support controlled types.
2803 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
2804 against run-times which do not support controlled types.
2805 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
2806 against run-times which do not support controlled types.
2807 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
2808 protect against run-times which do not support controlled types.
2809
2810 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2811
2812 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
2813 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
2814
2815 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2816
2817 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
2818 modified in the source, to prevent spurious warnings when compiling
2819 with -gnatg.
2820
2821 2011-08-03 Thomas Quinot <quinot@adacore.com>
2822
2823 * a-except-2005.adb: Minor reformatting.
2824
2825 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2826
2827 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
2828 is a renaming declaration in the private part of a package, do not emit
2829 a warning that the with_clause could be moved because the renaming may
2830 be used in the body or in a child unit.
2831
2832 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2833
2834 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2835 Propagate the Comes_From_Source attribute from the original return
2836 object to the renaming.
2837
2838 2011-08-03 Jose Ruiz <ruiz@adacore.com>
2839
2840 * exp_ch7.adb (Build_Raise_Statement): Do not call
2841 Raise_From_Controlled_Operation when this routine is not present in
2842 the run-time library.
2843 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
2844 libraries (Ravenscar), tasks are non-terminating, and protected objects
2845 and tasks can only appear at library level, so we do not want
2846 finalization of protected objects nor tasks.
2847 * exp_intr.adb: Minor clarification in comment.
2848 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
2849 Gen_Output_File_C): Remove references to finalization of library-level
2850 objects when using restricted run-time libraries.
2851
2852 2011-08-03 Ed Schonberg <schonberg@adacore.com>
2853
2854 * sem_ch3.adb (Build_Discriminant_Constraints): Set
2855 Original_Discriminant only if the parent type is a generic formal.
2856
2857 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2858
2859 * exp_ch13.adb: Add with and use clause for Targparm;
2860 (Expand_N_Free_Statement): Prevent the generation of a custom
2861 Deallocate on .NET/JVM targets since this requires pools and address
2862 arithmetic.
2863 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
2864 .NET/JVM targets, attach the newly allocated object to the access
2865 type's finalization collection. Do not generate a call to
2866 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
2867 exist in the runtime.
2868 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
2869 create a custom Allocate for object that do not require initialization.
2870 Attach a newly allocated object to the access type's finalization
2871 collection on .NET/JVM.
2872 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
2873 assignment of controlled types on .NET/JVM. The two hidden pointers
2874 Prev and Next and stored and later restored after the assignment takes
2875 place.
2876 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
2877 kludge for .NET/JVM to recognize a particular piece of code coming from
2878 Heap_Management and change the call to Finalize into Deep_Finalize.
2879 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
2880 finalization collections on .NET/JVM only for types derived from
2881 Controlled. Separate the association of storage pools with a collection
2882 and only allow it on non-.NET/JVM targets.
2883 (Make_Attach_Call): New routine.
2884 (Make_Detach_Call): New routine.
2885 (Process_Object_Declarations): Suppress the generation of
2886 build-in-place return object clean up code on .NET/JVM since it uses
2887 pools.
2888 * exp_ch7.ads (Make_Attach_Call): New routine.
2889 (Make_Detach_Call): New routine.
2890 * exp_intr.adb Add with and use clause for Targparm.
2891 (Expand_Unc_Deallocation): Detach a controlled object from a collection
2892 on .NET/JVM targets.
2893 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
2894 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
2895 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
2896 names used in finalization.
2897
2898 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2899
2900 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
2901 (Attach, Detach): Lock the current task when chaining an object onto a
2902 collection.
2903
2904 2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2905
2906 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
2907 Rewritten to create the message strings when the exception is not
2908 raised by an abort during finalization.
2909 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
2910 Raise_From_Controlled_Operation and update its associated comment.
2911 * a-fihema.ads, a-fihema.adb: New GNAT unit.
2912 Ada.Finalization.Heap_Management provides key functionality
2913 associated with controlled objects on the heap, their creation,
2914 finalization and reclamation. Type Finalization_Collection is
2915 effectively a wrapper which sits ontop of a storage pool and performs
2916 all necessary bookkeeping for all the objects it contains. Each
2917 access-to-controlled or access-to-class-wide type receives a collection
2918 as part of its expansion. The compiler generates buffer code and
2919 invokes Allocate / Deallocate to create and destroy allocated
2920 controlled objects.
2921 * a-finali.adb ("="): Removed.
2922 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
2923 fields Prev and Next.
2924 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
2925 A library unit with at least one controlled object on the library level
2926 has a special finalizer which is invoked by the binder. To signal this,
2927 ali files carry field PF.
2928 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
2929 associated comment on field usage.
2930 * a-tags.adb (Get_RC_Offset): Removed.
2931 (Needs_Finalization): New routine.
2932 * a-tags.ads: Update the structure of the GNAT dispatch tables.
2933 Dispatch tables now carry field Needs_Finalization which provides
2934 runtime indication whether a type is controlled or has controlled
2935 components or both. Remove field RC_Offset.
2936 (Get_RC_Offset): Removed along with its associated pragma Export.
2937 Since tagged types with controlled components no longer carry hidden
2938 field _controller, the special mechanism to retrieve its location is no
2939 longer needed.
2940 (Needs_Finalization): New routine.
2941 * atree.ads, atree.adb (Elist24): New routine.
2942 (Set_Elist24): New routine.
2943 * atree.h: Add a define clause for Elist24.
2944 * bindgen.adb New library-level variable Lib_Final_Built.
2945 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
2946 presence of a VM target, the routine generates calls to the proper
2947 library finalization routine.
2948 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
2949 targets. Set the correct library finalization routine depending on
2950 whether the library has controlled objects or this is a VM compilation.
2951 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
2952 to library-level finalizers of compiled units in reverse order of
2953 elaboration. It also produces exception management code and reraises a
2954 potential exception after all units have been finalized.
2955 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
2956 library-level finalizers of compiled units in reverse order of
2957 elaboration.
2958 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
2959 definitions of all library-level finalizers available to the compilation
2960 (Gen_Main_Ada): Directly call Adafinal which now contails all target
2961 dependent code.
2962 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
2963 System.Standard_Library.Adafinal directly. If the library needs
2964 finalization actions, create the sequence of finalization calls.
2965 (Gen_Output_File_Ada): Alphabetize local variables and constants.
2966 Generate a with clause for System.Soft_Links when compiling for a VM.
2967 Remove the code which imports System.Standard_Library.Adafinal as
2968 Do_Finalize. Generate the library finalization routine.
2969 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
2970 If the library needs finalization actions, create all the definitions
2971 of library- level finalizers.
2972 (Has_Finalizer): New routine. Determines whether at least one compiled
2973 unit has a library-level finalizer.
2974 Add type Qualification_Mode.
2975 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
2976 * einfo.adb: New usage of field 15 as Return_Flag.
2977 Remove Finalization_Chain_Entity from the usages of field 19.
2978 Remove Associated_Final_Chain from the usages of field 23.
2979 New usage of field 23 as Associated_Collection.
2980 New usage of field 24 as Finalizer.
2981 New usage of flag 252 as Is_Processed_Transient.
2982 (Associated_Final_Chain): Removed.
2983 (Associated_Collection): New routine.
2984 (Finalization_Chain_Entity): Removed.
2985 (Finalizer): New routine.
2986 (Is_Finalizer): New routine.
2987 (Is_Processed_Transient): New routine.
2988 (Return_Flag): New routine.
2989 (Set_Associated_Final_Chain): Removed.
2990 (Set_Associated_Collection): New routine.
2991 (Set_Finalization_Chain_Entity): Removed.
2992 (Set_Finalizer): New routine.
2993 (Set_Is_Processed_Transient): New routine.
2994 (Set_Return_Flag): New routine.
2995 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
2996 displayed flags.
2997 (Write_Field8_Name): Alphabetize the output.
2998 (Write_Field11_Name): Alphabetize the output.
2999 (Write_Field12_Name): Alphabetize the output.
3000 (Write_Field13_Name): Alphabetize the output.
3001 (Write_Field14_Name): Alphabetize the output.
3002 (Write_Field15_Name): Alphabetize the output.
3003 (Write_Field16_Name): Alphabetize the output.
3004 (Write_Field17_Name): Alphabetize the output.
3005 (Write_Field18_Name): Alphabetize the output.
3006 (Write_Field19_Name): Alphabetize the output. Remove the output of
3007 Finalization_Chain_Entity.
3008 (Write_Field20_Name): Alphabetize the output.
3009 (Write_Field21_Name): Alphabetize the output.
3010 (Write_Field22_Name): Alphabetize the output.
3011 (Write_Field23_Name): Alphabetize the output. Remove the output of
3012 Associated_Final_Chain. Add output for Associated_Collection.
3013 (Write_Field24_Name): Alphabetize the output.
3014 (Write_Field25_Name): Add output for Finalizer.
3015 (Write_Field26_Name): Alphabetize the output.
3016 (Write_Field27_Name): Alphabetize the output.
3017 (Write_Field28_Name): Alphabetize the output.
3018 * einfo.ads: Add new field description for Associated_Collection and
3019 its uses in nodes.
3020 Remove Associated_Final_Chain and its uses in nodes.
3021 Remove Finalization_Chain_Entity and its uses in nodes.
3022 Add new field description for Finalizer and its uses in nodes.
3023 Add new synthesized attribute Is_Finalizer.
3024 Add new flag description for Is_Processed_Transient and its uses in
3025 nodes.
3026 Add new field description for Return_Flag and its uses in nodes.
3027 (Associated_Final_Chain): Removed along with its pragma Inline.
3028 (Associated_Collection): New routine and pragma Inline.
3029 (Finalization_Chain_Entity): Removed along with its pragma Inline.
3030 (Finalizer): New routine and pragma Inline.
3031 (Is_Finalizer): New routine and pragma Inline.
3032 (Is_Processed_Transient): New routine and pragma Inline.
3033 (Return_Flag): New routine and pragma Inline.
3034 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
3035 (Set_Associated_Collection): New routine and pragma Inline.
3036 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
3037 (Set_Finalizer): New routine and pragma Inline.
3038 (Set_Is_Processed_Transient): New routine and pragma Inline.
3039 (Set_Return_Flag): New routine and pragma Inline.
3040 * exp_aggr.adb: Alphabetize subprograms.
3041 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
3042 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
3043 associated comments. Remove local variables External_Final_List and
3044 Attach.
3045 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
3046 Ancestor. Remove the retrieval of finalization lists. Update the call to
3047 Make_Adjust_Call.
3048 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
3049 lists. Update the call to Late_Expansion.
3050 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
3051 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
3052 (Gen_Assign): Remove the retrieval of the finalization list used to
3053 build the assignment. Update the calls to Make_Init_Call and
3054 Make_Adjust_Call.
3055 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
3056 Remove the mechanism to determine attachment levels and finalization
3057 list retrieval. Remove the processing for coextensions.
3058 (Init_Controller): Removed. Controllers no longer exist.
3059 (Late_Expansion): Remove formals Flist and Obj along with their
3060 associated comments. Update the calls to Build_Record_Aggr_Code and
3061 Build_Array_Aggr_Code.
3062 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
3063 (Expand_N_Freeze_Entity): Add special processing for finalizers which
3064 appear in entry bodies, protected subprograms and task bodies.
3065 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
3066 * exp_ch3.adb (Add_Final_Chain): Removed.
3067 (Build_Array_Init_Proc): Alphabetize local variables.
3068 (Build_Assignment): Alphabetize local variables. Update the call to
3069 Maked_Adjust_Call.
3070 (Build_Class_Wide_Master): Rename local variables to better reflect
3071 their role.
3072 (Build_Discriminant_Assignments): Code reformatting.
3073 (Build_Init_Call_Thru): Code reformatting.
3074 (Build_Init_Procedure): Code reformatting. Generate a special version
3075 of Deep_Finalize which is capable of finalizing all initialized
3076 components and ignore the rest.
3077 (Build_Init_Statements): Rename local variables to better reflect their
3078 role.
3079 Reimplement the mechanism to include the creation and update of an index
3080 variable called a "counter". It is used as a bookmark for tracing
3081 initialized and non-initialized components.
3082 (Build_Initialization_Call): Remove local variable Controller_Typ.
3083 Alphabetize all local variables. Remove the initialization of the
3084 record controller and update the call to Make_Init_Call.
3085 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
3086 New local variable Counter.
3087 (Constrain_Array): Alphabetize.
3088 (Expand_Freeze_Array_Type): Create a collection instead of a
3089 finalization list.
3090 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
3091 Finalize_Address which is used in conjunction with allocated controlled
3092 objects.
3093 (Expand_N_Object_Declaration): Remove the creation of a finalization
3094 list for anonymous access types. Update the calls to Make_Init_Call and
3095 Make_Adjust_Call.
3096 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
3097 retrieval of finalization lists. Remove the expansion of the record
3098 controller. Create TSS primitive Finalize_Address used in conjunction
3099 with controlled objects on the heap. Create finalization collections
3100 for access-to-controlled record components.
3101 (Expand_Record_Controller): Removed.
3102 (Freeze_Type): Remove the freezing of record controllers. Freezing of
3103 class-wide types now requires additional processing. Create
3104 finalization collections for access-to-controlled types.
3105 (Increment_Counter): New routine.
3106 (Make_Counter): New routine.
3107 (Make_Eq_If): Remove the mention of Name_uController.
3108 (Make_Predefined_Primitive_Specs): There is no longer need to skip
3109 types coming from System.Finalization_Root.
3110 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
3111 (Predefined_Primitive_Bodies): There is no longer need to skip types
3112 coming from System.Finalization_Root.
3113 (Stream_Operation_OK): Do not generate stream routines for
3114 type Ada.Finalization.Heap_Management.Finalization_Collection.
3115 * exp_ch3.ads: Alphabetize subprograms.
3116 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
3117 Add with and use clause for Lib.
3118 (Complete_Coextension_Finalization): Removed.
3119 (Complete_Controlled_Allocation): New routine. Create a finalization
3120 collection for anonymous access-to-controlled types. Create a custom
3121 Allocate which interfaces with the back end and the machinery in
3122 Heap_Management.
3123 (Expand_Allocator_Expression): Add necessary calls to
3124 Complete_Controlled_Allocation. Remove the retrieval of finalization
3125 lists. Update the calls to Make_Adjust_Call. Generate a call to
3126 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3127 the associated collection.
3128 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
3129 Code clean up. Remove the retrieval of finalization lists and
3130 attachment levels.
3131 Update the call to Make_Init_Call. Generate a call to
3132 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
3133 the associated collection.
3134 (Get_Allocator_Final_List): Removed. Finalization lists are not
3135 available.
3136 (Suitable_Element): Remove the mention of Name_uController.
3137 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
3138 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
3139 the left hand side, carry out the assignment and adjust the left hand
3140 side.
3141 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
3142 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
3143 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
3144 BIP_Collection and BIPcollection.
3145 (Build_Heap_Allocator): New routine used to allocate the return object
3146 of a build-in-place function onto a collection.
3147 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
3148 (Expand_Call): Do not replace direct calls to Deep routines with their
3149 aliases.
3150 (Expand_N_Extended_Return_Statement): Give all variables shorter names
3151 and update their occurrences. Add a special return flag to monitor the
3152 [ab]normal execution of the function. The flag is set right before the
3153 return statement.
3154 Rewrite the mechanism used to allocate a build-in-place return object
3155 on the heap or on a storage pool.
3156 (Is_Direct_Deep_Call): New routine.
3157 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
3158 build-in-place function call instead of a final list. Build a call to
3159 Set_Finalize_Address_Ptr to decorate the associated collection.
3160 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
3161 order to name the build-in-place function call's result for later
3162 finalization. Add a collection to a build-in-place function call
3163 instead of a final list.
3164 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
3165 build-in-place function call instead of a final list. Remove the code
3166 which moves one final list and transforms it into the actual in a
3167 nested build-in-place call.
3168 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
3169 build-in-place function call instead of a final list.
3170 (Move_Final_List): Removed.
3171 (Needs_BIP_Collection): New routine.
3172 (Needs_BIP_Final_List): Removed.
3173 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
3174 enumeration type BIP_Formal_Kind.
3175 Update the related comment.
3176 (Needs_BIP_Collection): New routine.
3177 (Needs_BIP_Final_List): Removed.
3178 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
3179 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
3180 majority of subprograms in this unit. Add Name_Finalize_Address to
3181 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
3182 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
3183 statements for an array type.
3184 (Build_Adjust_Statements): Create the adjust statements for a record
3185 type.
3186 (Build_Cleanup_Statements): New routine. A procedure which given any
3187 construct containing asynchronous calls, references to _master, or is a
3188 task body, a task allocation or a protected body produces the necessary
3189 runtime calls to clean up these constructs.
3190 (Build_Exception_Handler): New routine.
3191 (Build_Final_List): Removed.
3192 (Build_Finalization_Collection): New routine. A core procedure which
3193 creates a collection to service heap allocated controlled objects
3194 associated with an access-to-controlled type.
3195 (Build_Finalize_Statements): Create the finalization statements for a
3196 record types.
3197 (Build_Finalizer): New routine. A core procedure which given any
3198 construct with declarations and/or statements detects all objects which
3199 need any type of clean up (controlled objects, protected objects) and
3200 generates all necessary code to clean up the said objects in the proper
3201 order.
3202 (Build_Finalizer_Call): New routine.
3203 (Build_Initialize_Statements): Create the initialization statements for
3204 an array type. The generated routine contains code to finalize partially
3205 initialized arrays.
3206 (Build_Object_Declarations): New routine.
3207 (Build_Raise_Statement): New routine.
3208 (Clean_Simple_Protected_Objects): Removed.
3209 (Controller_Component): Removed.
3210 (Enclosing_Function): New routine.
3211 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
3212 either declarations or statements or both.
3213 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
3214 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
3215 package.
3216 (Find_Final_List): Removed.
3217 (Global_Flist_Ref): Removed.
3218 (In_Finalization_Root): Removed.
3219 (Insert_Actions_In_Scope_Around): Determine the range of the transient
3220 scope in terms of tree nodes. Process all transient variables within
3221 that range.
3222 (Make_Adjust_Call): Rewritten. There is no longer an attach call
3223 generated after the adjust.
3224 (Make_Attach_Call): Removed.
3225 (Make_Call): New routine.
3226 (Make_Clean): Removed.
3227 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
3228 build routines.
3229 (Make_Deep_Proc): Rewritten to generate the new profile signature used
3230 in Deep routines.
3231 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
3232 build routines.
3233 (Make_Final_Call): Modified to simply create a call to either
3234 Deep_Finalize or Finalize.
3235 (Make_Finalize_Address_Body): New routine.
3236 (Make_Finalize_Address_Stmts): New routine. A function which produces
3237 TSS primitive Finalize_Address used in conjunction with heap allocated
3238 controlled objects.
3239 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
3240 (Make_Init_Call): Rewritten. There is no longer an attach call
3241 generated after initialization.
3242 (Make_Local_Deep_Finalize): New routine.
3243 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3244 (Make_Transient_Block): Remove the finalization list retrieval and
3245 manipulation.
3246 (Needs_Finalization): Moved to Exp_Util.
3247 (Parent_Field_Type): New routine.
3248 (Preprocess_Components): New routine.
3249 (Process_Transient_Objects): New routine.
3250 (Wrap_HSS_In_Block): New routine.
3251 (Wrap_Transient_Declaration): Remove finalization list management and
3252 controller insertion.
3253 (Wrap_Transient_Expression): Code reformatting.
3254 (Wrap_Transient_Statement): Code reformatting.
3255 * exp_ch7.ads (Build_Final_List): Removed.
3256 (Build_Finalization_Collection): New routine.
3257 (Build_Raise_Statement): New routine.
3258 (Controller_Component): Removed.
3259 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
3260 (Find_Final_List): Removed.
3261 (In_Finalization_Root): Removed.
3262 (Is_Simple_Protected_Type): Update related comment.
3263 (Make_Adjust_Call): New parameter profile and associated comments.
3264 (Make_Attach_Call): Removed.
3265 (Make_Final_Call): New parameter profile and associated comments.
3266 (Make_Finalize_Address_Body): New routine.
3267 (Make_Init_Call): New parameter profile and associated comments.
3268 (Make_Local_Deep_Finalize): New routine.
3269 (Make_Set_Finalize_Address_Ptr_Call): New routine.
3270 (Needs_Finalization): Moved to Exp_Util.
3271 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
3272 (Expand_N_Protected_Body): Remove the handling of finalization lists.
3273 (Find_Protection_Type): Moved to Exp_Util.
3274 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
3275 (Make_DT): Update sequence of dispatch table initialization. Remove the
3276 initialization of field RC_Offset. Add initialization of field Needs_
3277 Finalization.
3278 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
3279 Reimplement how an object is first finalized, then deallocated.
3280 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
3281 Code reformatting.
3282 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
3283 Register TSS_Finalize_Address with type TSS_Names.
3284 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
3285 procedure provides the interface between an allocation / deallocation
3286 and the support machinery in Ada.Finalization.Heap_Management.
3287 (Find_Init_Call): Code reformatting.
3288 (Find_Init_Call_In_List): Code reformatting.
3289 (Find_Protection_Type): Moved from Exp_Ch9.
3290 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
3291 (Has_Controlled_Coextensions): Removed.
3292 (Has_Controlled_Objects): New routine.
3293 (In_Library_Level_Package_Body): New routine.
3294 (Insert_Action_After): New routine.
3295 (Is_Finalizable_Transient): New routine. This predicate determines
3296 whether an object declaration is one of the many variants of controlled
3297 transients.
3298 (Is_Null_Access_BIP_Func_Call): New routine.
3299 (Is_Non_BIP_Func_Call): New routine.
3300 (Is_Related_To_Func_Return): New routine.
3301 (Needs_Finalization): Moved from Exp_Ch7.
3302 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
3303 (Find_Protection_Type): Moved from Exp_Ch9.
3304 (Has_Controlled_Coextensions): Removed.
3305 (Has_Controlled_Objects): New routine.
3306 (In_Library_Level_Package_Body): New routine.
3307 (Insert_Action_After): New routine.
3308 (Is_Finalizable_Transient): New routine.
3309 (Is_Null_Access_BIP_Func_Call): New routine.
3310 (Is_Non_BIP_Func_Call): New routine.
3311 (Is_Related_To_Func_Return): New routine.
3312 (Needs_Finalization): Moved from Exp_ch7.
3313 * expander.adb (Expand): Add a case for N_Free_Statement.
3314 * freeze.adb (Freeze_All): Replace the generation of a finalization
3315 list with a collection for access-to-controlled types.
3316 (Freeze_Entity): Code reformatting.
3317 (Freeze_Record_Type): Remove the freezing of a record controller
3318 component.
3319 (Freeze_Subprogram): Code reformatting.
3320 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
3321 finalization list.
3322 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
3323 has a library-level finalizer.
3324 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
3325 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
3326 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
3327 files. Add a-fihema to the list of object files.
3328 * par-ch4.adb:
3329 Alphabetize the associations in type Is_Parameterless_Attribute.
3330 * rtsfind.ads: Ada.Finalization_List.Controller and
3331 System.Finalization_Implementation are no longer a GNAT unit.
3332 Update the range of type Ada_Finalization_Child. Remove the following
3333 recoverable entities:
3334
3335 RE_Attach_To_Final_List
3336 RE_Deep_Tag_Attach
3337 RE_Finalize_List
3338 RE_Finalize_One
3339 RE_Finalizable_Ptr_Ptr
3340 RE_Global_Final_List
3341 RE_Limited_Record_Controller
3342 RE_List_Controller
3343 RE_Move_Final_List
3344 RE_Record_Controller
3345 RE_Simple_List_Controller
3346
3347 Add the following recoverable entities:
3348
3349 RE_Add_Offset_To_Address
3350 RE_Allocate
3351 RE_Base_Pool
3352 RE_Deallocate
3353 RE_Exception_Identity
3354 RE_Finalization_Collection
3355 RE_Finalization_Collection_Ptr
3356 RE_Needs_Finalization
3357 RE_Save_Library_Occurrence
3358 RE_Set_Finalize_Address_Ptr
3359 RE_Set_Storage_Pool_Ptr
3360 RE_Storage_Count
3361 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
3362 Name_uController.
3363 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
3364 (First_Stored_Discriminant): Remove the mention of Name_uController.
3365 * sem_aux.ads: Comment reformatting.
3366 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
3367 to redecorate an already existing class-wide type.
3368 (Decorate_Tagged_Type): New parameter profile and associated comment.
3369 Create a "shadow class-wide type" for a shadow entity.
3370 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
3371 of the final chain along with the associated comment.
3372 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
3373 Full_Desig and set it to the full view of the designated type.
3374 Initialize the finalization collection to empty.
3375 (Build_Derived_Record_Type): Alphabetize local variables. Code
3376 reformatting.
3377 (Collect_Fixed_Components): Remove the mention of Name_uController.
3378 (Create_Constrained_Components): Remove the mention of Name_uController.
3379 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
3380 class-wide type of a shadow entity.
3381 (Process_Full_View): Update the machinery which marks type
3382 Limited_Controlled's entity as limited.
3383 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
3384 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
3385 list, instead make a collection build-in-place formal.
3386 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
3387 a designated type in order to establish a match between the renaming
3388 and the renamed entity.
3389 (Find_Selected_Component): Add guard to prevent spurious exceptions
3390 from being raised on .NET/JVM.
3391 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
3392 to the list of primitive that need special processing. Update arrays
3393 C_Names and D_Names.
3394 (Replace_Types): Handle class-wide types.
3395 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
3396 different parameter profile, look at the first formal.
3397 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
3398 use clauses for Exp_Util.
3399 * sem_res.adb: Remove with and use clauses for Elists.
3400 (Propagate_Coextensions): Removed.
3401 (Resolve_Allocator): Do not propagate the list of coextensions from one
3402 allocator to another.
3403 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
3404 Deaccessed_T to Desig_Typ.
3405 (Enter_Name): Remove the mention of Name_uController.
3406 (Gather_Components): Remove the mention of Name_uController.
3407 (Incomplete_Or_Private_View): New routine.
3408 (Is_Coextension_Root): Removed.
3409 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
3410 * sem_util.ads (Incomplete_Or_Private_View): New routine.
3411 (Is_Coextension_Root): Removed.
3412 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
3413 Controlled types are now derived from a null tagged record. Remove
3414 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
3415 * sinfo.adb (Coextensions): Removed.
3416 (Set_Coextensions): Removed.
3417 * sinfo.ads: Remove Coextensions from the explanation of node fields
3418 and its uses in nodes.
3419 Update the field usage of N_Allocator.
3420 (Coextensions): Removed along with its pragma Inline.
3421 (Set_Coextensions): Removed along with its pragma Inline.
3422 * snames.ads-tmpl: Remove names
3423
3424 Name_uClean
3425 Name_uController
3426 Name_uFinal_List
3427 Name_uLocal_Final_List
3428 Name_Finalization_Root
3429 Name_Next
3430 Name_Prev
3431
3432 Add names
3433
3434 Name_uFinalizer
3435 Name_Finalize_Address
3436 * s-pooglo.adb (Allocate): Add overriding indicator.
3437 (Deallocate): Add overriding indicator.
3438 (Storage_Size): Add overriding indicator.
3439 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
3440 than Finalize_Global_List.
3441 (Null_Finalize_Global_List): Removed.
3442 (Save_Library_Occurrence): New routine.
3443 * s-soflin.ads: Remove variable Finalize_Global_List along with its
3444 initialization. Add variable Finalize_Library_Objects along with its
3445 pragma Export. Add variables Library_Exception and
3446 Library_Exception_Set along with their pragma Export.
3447 (Null_Finalize_Global_List): Removed.
3448 (Save_Library_Occurrence): New routine.
3449 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
3450 rather than Finalize_Global_List.
3451 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
3452 of the constructed node.
3453
3454 2011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3455
3456 * link.c: Include "auto-host.h" before system headers.
3457
3458 2011-08-03 Vincent Celier <celier@adacore.com>
3459
3460 * make.adb (Gnatmake): Add to table Library_Projs only library projects
3461 that are not extended. Do not check if a library project that is
3462 extended should be regenerated. Do not add to table Library_Paths the
3463 libraries that are in extended projects. Link only with libraries that
3464 are in libray projects that are not extended.
3465 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
3466 for a library project that is extended.
3467
3468 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3469
3470 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
3471 conforming subprogram renamings that appear to be completions if they
3472 are not fully conformant.
3473 Such renamings are homographs but not completions.
3474 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
3475 names in a subprogram renaming that appears in an instance.
3476
3477 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3478
3479 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
3480 not immutably limited, build actual subtype from expression to provide
3481 proper bounds to caller.
3482
3483 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3484
3485 * sem_ch8.adb: Minor comment correction.
3486
3487 2011-08-03 Thomas Quinot <quinot@adacore.com>
3488
3489 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
3490 returning a limited array, use an extended return statement.
3491
3492 2011-08-03 Vincent Celier <celier@adacore.com>
3493
3494 * make.adb (Initialize): If --subdirs= is used, but no project file is
3495 specified, attempt to create the specify subdir if it does not already
3496 exist and use it as the object directory as if -D had been specified.
3497
3498 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3499
3500 * s-tpopsp-vms.adb: New file.
3501 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
3502 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
3503
3504 2011-08-03 Emmanuel Briot <briot@adacore.com>
3505
3506 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
3507 package.
3508
3509 2011-08-03 Yannick Moy <moy@adacore.com>
3510
3511 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
3512 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
3513 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
3514 detect that an array has static bounds.
3515
3516 2011-08-03 Thomas Quinot <quinot@adacore.com>
3517
3518 * exp_dist.adb: Minor reformatting.
3519
3520 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3521
3522 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
3523 (ATCB_Key): Removed, not always used.
3524
3525 2011-08-03 Emmanuel Briot <briot@adacore.com>
3526
3527 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
3528 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
3529 most remaining global variables.
3530
3531 2011-08-03 Robert Dewar <dewar@adacore.com>
3532
3533 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
3534 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
3535 reformatting.
3536
3537 2011-08-03 Javier Miranda <miranda@adacore.com>
3538
3539 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
3540 that must be passed by copy in VM targets.
3541
3542 2011-08-03 Emmanuel Briot <briot@adacore.com>
3543
3544 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
3545 duplicates a similar htable now in the project tree.
3546
3547 2011-08-03 Claire Dross <dross@adacore.com>
3548
3549 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
3550 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
3551 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
3552 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
3553 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
3554 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
3555 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
3556 update.
3557
3558 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3559
3560 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
3561 (ATCB_Key): Removed, not always used.
3562 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
3563 s-taprop-posix.adb.
3564 * s-tpopsp-tls.adb: New file.
3565 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
3566 x86/x64/ia64/powerpc/sparc Linux.
3567
3568 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3569
3570 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
3571 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
3572
3573 2011-08-03 Thomas Quinot <quinot@adacore.com>
3574
3575 * rtsfind.ads, exp_dist.adb, exp_dist.ads
3576 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
3577 Fix type selection for mapping integer types to PolyORB types.
3578
3579 2011-08-03 Bob Duff <duff@adacore.com>
3580
3581 * sem_ch7.adb: Minor comment clarification.
3582
3583 2011-08-03 Bob Duff <duff@adacore.com>
3584
3585 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
3586 an error analyzing a choice, skip further processing. Further
3587 processing could cause a crash or cascade errors.
3588
3589 2011-08-03 Emmanuel Briot <briot@adacore.com>
3590
3591 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
3592 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
3593 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
3594 prj-env.ads (Shared_Project_Tree_Data): new type
3595 An aggregate project and its aggregated trees need to share the common
3596 data structures used for lists of strings, packages,... This makes the
3597 code simpler since otherwise we have to pass the root tree (also used
3598 for the configuration file data) in addition to the current project
3599 tree. This also avoids ambiguities as to which tree should be used.
3600 And finally this saves a bit of memory.
3601 (For_Every_Project_Imported): new parameter Tree.
3602 Since aggregated projects are using a different tree, we need to let
3603 the caller know which tree to use to manipulate the returned project.
3604
3605 2011-08-03 Robert Dewar <dewar@adacore.com>
3606
3607 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
3608 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
3609 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
3610 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
3611
3612 2011-08-03 Javier Miranda <miranda@adacore.com>
3613
3614 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
3615 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
3616
3617 2011-08-03 Bob Duff <duff@adacore.com>
3618
3619 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
3620 the Base_Type.
3621
3622 2011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
3623
3624 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
3625 g-sehash.ads: Fix typo. Update header.
3626
3627 2011-08-03 Thomas Quinot <quinot@adacore.com>
3628
3629 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
3630 expansion.
3631
3632 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3633
3634 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
3635 prefixes of private types along with records, since the selector may be
3636 a discriminant.
3637 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3638 private types along with records, since the selector may be a
3639 discriminant.
3640
3641 2011-08-03 Emmanuel Briot <briot@adacore.com>
3642
3643 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
3644
3645 2011-08-03 Javier Miranda <miranda@adacore.com>
3646
3647 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3648 Tagged_Type_Expansion.
3649
3650 2011-08-03 Yannick Moy <moy@adacore.com>
3651
3652 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
3653 violation when the argument of concatenation is the name of a
3654 constant.
3655
3656 2011-08-03 Emmanuel Briot <briot@adacore.com>
3657
3658 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3659 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3660 (Process_Declarative_Items): new parameter Child_Env.
3661
3662 2011-08-03 Yannick Moy <moy@adacore.com>
3663
3664 * alfa.ads: Update format of ALFA section in ALI file in order to
3665 add a mapping from bodies to specs when both are present.
3666 (ALFA_Scope_Record): Add components for spec file/scope.
3667 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
3668 present.
3669 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
3670 collected, fill in the spec information when relevant.
3671 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
3672 present.
3673
3674 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3675
3676 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3677 code unit to decide whether to add internally generated subprograms.
3678
3679 2011-08-03 Javier Miranda <miranda@adacore.com>
3680
3681 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
3682 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
3683 be handled by copy in VM targets.
3684
3685 2011-08-03 Emmanuel Briot <briot@adacore.com>
3686
3687 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
3688 code with Makeutl.Get_Switches.
3689 * prj-tree.adb: Update comment.
3690
3691 2011-08-03 Thomas Quinot <quinot@adacore.com>
3692
3693 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
3694 subprogram with a limited formal that does not support external
3695 streaming.
3696
3697 2011-08-03 Yannick Moy <moy@adacore.com>
3698
3699 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
3700 continuation line
3701 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
3702 not from current unit in two phases, because it is not possible to
3703 change the table while iterating over its content.
3704 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
3705
3706 2011-08-03 Sergey Rybin <rybin@adacore.com>
3707
3708 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
3709 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
3710
3711 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3712
3713 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
3714 and the component type is composite, this is ambiguous for predefined
3715 concatenation, but if the node is not overloaded and the entity is a use
3716 -defined function its profile can be used to resolve that aggregate.
3717
3718 2011-08-03 Robert Dewar <dewar@adacore.com>
3719
3720 * exp_ch4.adb: Minor code cleanup.
3721
3722 2011-08-03 Thomas Quinot <quinot@adacore.com>
3723
3724 * exp_dist.adb: Do not generate distribution stubs if serious errors
3725 have been diagnosed.
3726
3727 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3728
3729 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
3730 the first formal of a primitive operation, go to the base type to
3731 handle properly an access to a derived type with constrained
3732 discriminants.
3733 * sem_type.adb (Disambiguate): an immediately visible operator hides a
3734 user-defined function that is only use-visible.
3735
3736 2011-08-03 Robert Dewar <dewar@adacore.com>
3737
3738 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
3739 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
3740 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
3741 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
3742 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
3743 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
3744 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
3745 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
3746
3747 2011-08-03 Robert Dewar <dewar@adacore.com>
3748
3749 * repinfo.adb (List_Mechanism): Add handling of
3750 Convention_Ada_Pass_By_XXX.
3751 * sem_mech.adb (Set_Mechanism): Ditto.
3752 * sem_prag.adb (Process_Convention): Add entries for
3753 Convention_Ada_Pass_By_XXX.
3754 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
3755
3756 2011-08-03 Pascal Obry <obry@adacore.com>
3757
3758 * makeutl.adb: Minor reformatting.
3759
3760 2011-08-03 Vincent Celier <celier@adacore.com>
3761
3762 * fname-uf.adb
3763 (Get_File_Name) If the file cannot be found when there are no config
3764 pragmas file and May_Fail is True, return No_File instead of the file
3765 name, to be consistent.
3766
3767 2011-08-03 Pascal Obry <obry@adacore.com>
3768
3769 * adaint.c (__gnat_is_executable_file_attr): Avoid access
3770 to null pointer.
3771
3772 2011-08-03 Javier Miranda <miranda@adacore.com>
3773
3774 * sem_ch13.adb
3775 (Same_Representation): In VM targets the representation of arrays with
3776 aliased components differs from arrays with non-aliased components.
3777
3778 2011-08-03 Emmanuel Briot <briot@adacore.com>
3779
3780 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
3781 not systematically lower case attribute indexes that contain no "."
3782 Fix definition of several Naming attributes, which take
3783 a unit name as index and therefore should be case insensitive.
3784 Minor refactoring (reduce length of variable names).
3785
3786 2011-08-03 Emmanuel Briot <briot@adacore.com>
3787
3788 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
3789
3790 2011-08-03 Emmanuel Briot <briot@adacore.com>
3791
3792 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
3793 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
3794 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
3795 prj-tree.ads (Prj.Tree.Environment): new type.
3796
3797 2011-08-03 Emmanuel Briot <briot@adacore.com>
3798
3799 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
3800 prj-tree.adb, prj-tree.ads (Environment): new type.
3801
3802 2011-08-03 Emmanuel Briot <briot@adacore.com>
3803
3804 * prj-tree.ads: Remove unused variable.
3805
3806 2011-08-03 Yannick Moy <moy@adacore.com>
3807
3808 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
3809 issuing messages related to SPARK restriction violation.
3810
3811 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3812
3813 * sem_ch6.adb: guard against error nodes in return statements.
3814
3815 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3816
3817 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
3818 a warning can only appear on a configuration file, so emit warning
3819 without further checks.
3820
3821 2011-08-03 Arnaud Charlet <charlet@adacore.com>
3822
3823 * s-interr.ads: add overriding keyword.
3824
3825 2011-08-03 Geert Bosch <bosch@adacore.com>
3826
3827 * exp_attr.adb: Fix minor typo.
3828
3829 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3830
3831 * par-ch4.adb: improve error recovery.
3832
3833 2011-08-03 Emmanuel Briot <briot@adacore.com>
3834
3835 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
3836 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
3837 to Errout_Handling.
3838
3839 2011-08-03 Emmanuel Briot <briot@adacore.com>
3840
3841 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
3842 "external" as an attribute name in aggregate projects.
3843
3844 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3845
3846 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
3847 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
3848 from 0, so we need to adjust.
3849
3850 2011-08-03 Emmanuel Briot <briot@adacore.com>
3851
3852 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
3853 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
3854
3855 2011-08-03 Yannick Moy <moy@adacore.com>
3856
3857 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
3858 restriction on overloaded entity if the entity is not an operator.
3859
3860 2011-08-03 Yannick Moy <moy@adacore.com>
3861
3862 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
3863 restrict.ads: Rename remaining Check_Formal_Restriction* into
3864 Check_SPARK_Restriction*.
3865
3866 2011-08-03 Emmanuel Briot <briot@adacore.com>
3867
3868 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
3869 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
3870 qualifier.
3871 (Project_Empty): removed
3872 (Empty_Project): new parameter Qualifier
3873 This is used to have fields specific to aggregate projects, cleaner
3874 New field to store the list of aggregated projects.
3875 (Check_Aggregate_Project): removed
3876 (Process_Aggregated_Projects, Free): new subprograms.
3877
3878 2011-08-03 Olivier Hainque <hainque@adacore.com>
3879
3880 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
3881
3882 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3883
3884 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
3885 explicit dereference of an unconstrained type, create a constrained
3886 subtype for it, as is done for function calls that return an
3887 unconstrained type.
3888
3889 2011-08-03 Thomas Quinot <quinot@adacore.com>
3890
3891 * g-pehage.adb (Finalize): Avoid possible double-free.
3892
3893 2011-08-03 Steve Baird <baird@adacore.com>
3894
3895 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
3896 Elab_Spec/Body attrs in CodePeer_Mode.
3897
3898 2011-08-03 Javier Miranda <miranda@adacore.com>
3899
3900 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
3901 low bound is not known at compile time but they have no others choice.
3902 Done because in this case the bounds can be obtained directly from the
3903 aggregate.
3904
3905 2011-08-03 Ed Falis <falis@adacore.com>
3906
3907 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
3908 on VxWorks SMP. Remove unusable constant ANY_CPU.
3909
3910 2011-08-03 Emmanuel Briot <briot@adacore.com>
3911
3912 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
3913 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
3914 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
3915 Prj.Env.Initialize_Empty): new subprograms
3916 (Get_Env, Find_Project): remove parameter Target_Name.
3917
3918 2011-08-03 Gary Dismukes <dismukes@adacore.com>
3919
3920 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
3921 as a condition for the delayed call to Derived_Subprograms done for the
3922 case of the rewriting of a derived type that constrains the
3923 discriminants of its parent type.
3924 Avoids redundant subprogram derivations for private subtype derivations.
3925
3926 2011-08-03 Javier Miranda <miranda@adacore.com>
3927
3928 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
3929 Build_Record_Aggr_Code.
3930 (Build_Record_Aggr_Code): Add missing support to initialize hidden
3931 discriminants in extension aggregates.
3932
3933 2011-08-03 Emmanuel Briot <briot@adacore.com>
3934
3935 * prj-pp.adb (Print): also output project qualifiers, since in
3936 particular "aggregate" is mandatory in an aggregate project.
3937
3938 2011-08-03 Emmanuel Briot <briot@adacore.com>
3939
3940 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
3941 (Debug_Output): new function.
3942
3943 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3944
3945 * gnat_ugn.texi: Document -Wstack-usage.
3946 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
3947
3948 2011-08-03 Thomas Quinot <quinot@adacore.com>
3949
3950 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
3951 have keyword LIMITED.
3952
3953 2011-08-03 Yannick Moy <moy@adacore.com>
3954
3955 * alfa.adb, alfa.ads, alfa_test.adb: New files.
3956 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
3957 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
3958 section (does not happen in compiler, only if code directly calls
3959 Scan_ALI).
3960 * get_alfa.adb, get_alfa.ads: New files.
3961 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
3962 needed.
3963 * lib-xref-alfa.adb: New file.
3964 * lib-xref.adb, lib-xref.ads
3965 (Xref_Entry): redefine information needed in cross-references for ALFA.
3966 Push ALFA treatments in separated local package.
3967 (Enclosing_Subpragram_Or_Package): treat specially subprogram
3968 identifiers. Return entity of package body instead of spec. Return
3969 Empty for a scope with no location.
3970 (Generate_Reference): adapt to new components for ALFA information.
3971 Remove the need for D references on definitions.
3972 (Is_Local_Reference): moved to ALFA local package
3973 (Output_References): extract subfunction as Extract_Source_Name
3974 (Output_Local_References): remove procedure, replaced by filtering of
3975 cross-references in package ALFA and printing in Put_ALFA.
3976 (Write_Entity_Name): remove procedure
3977 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
3978 print exact name of entity as it appears in source file
3979 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
3980 * put_alfa.adb, put_alfa.ads: New files.
3981 * xref_lib.adb (Search_Xref): protect read of cross-references against
3982 reading other sections of the ALI file, in gnatxref
3983 (Search): protect read of cross-references against reading other
3984 sections of the ALI file, in gnatfind.
3985 * gcc-interface/Make-lang.in: Update dependencies.
3986
3987 2011-08-03 Thomas Quinot <quinot@adacore.com>
3988
3989 * sem_ch3.adb: Minor reformatting.
3990
3991 2011-08-03 Jose Ruiz <ruiz@adacore.com>
3992
3993 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
3994 raising an exception.
3995
3996 2011-08-03 Ed Schonberg <schonberg@adacore.com>
3997
3998 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
3999 type, always use 1 as the lower bound or string, even if lower bound of
4000 context is not static, to handle properly null strings in a non-static
4001 context.
4002
4003 2011-08-03 Bob Duff <duff@adacore.com>
4004
4005 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
4006 always legal on the right-hand side of an assignment statement; there
4007 is always an applicable index constraint in this case. Therefore, the
4008 check for Pkind = N_Assignment_Statement is now unconditional -- it
4009 doesn't depend on whether Is_Constrained (Typ).
4010
4011 2011-08-03 Robert Dewar <dewar@adacore.com>
4012
4013 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
4014
4015 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4016
4017 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
4018 for an itype created within a generic unit.
4019
4020 2011-08-03 Eric Botcazou <ebotcazou@adacore.com>
4021
4022 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
4023 suppresses all inlining.
4024
4025 2011-08-03 Robert Dewar <dewar@adacore.com>
4026
4027 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
4028 exp_aggr.adb: Minor reformatting.
4029
4030 2011-08-03 Thomas Quinot <quinot@adacore.com>
4031
4032 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
4033 tagged assignment when discriminant checks are suppressed. This is
4034 useless and extremely costly in terms of static stack usage.
4035
4036 2011-08-03 Bob Duff <duff@adacore.com>
4037
4038 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
4039 of generics, because this leads to the wrong entity in the wrong scope,
4040 causing (e.g.) pragma Export_Procedure to get an error if the entity is
4041 an instance.
4042 (Process_Interface_Name): Follow Alias for instances of generics, to
4043 correct for the above change.
4044
4045 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4046
4047 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
4048 is an integer literal it is always safe to replace the reference. In
4049 addition, if the reference appears in the generated code for an object
4050 declaration it is necessary to copy because otherwise the reference
4051 might be to the uninitilized value of the discriminant of the object
4052 itself.
4053
4054 2011-08-03 Pascal Obry <obry@adacore.com>
4055
4056 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
4057 ACL used, in this case we want to check for ending .exe, not .exe
4058 anywhere in the path.
4059
4060 2011-08-03 Sergey Rybin <rybin@adacore.com>
4061
4062 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
4063 the tree structure (semantic decoration of references to record
4064 discriminants).
4065
4066 2011-08-03 Gary Dismukes <dismukes@adacore.com>
4067
4068 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
4069 choices of a named array aggregate, bail out when any choices are
4070 marked as Errors_Posted.
4071
4072 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4073
4074 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
4075 in which entity is frozen, to handle properly loop variables in
4076 iterators.
4077
4078 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4079
4080 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
4081 subtype is not static, compute the upper bound using attributes, to
4082 handle properly index types that are not integer types.
4083
4084 2011-08-03 Bob Duff <duff@adacore.com>
4085
4086 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
4087 Update copyright notice.
4088
4089 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4090
4091 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
4092 Original_Discriminant if within an instance.
4093 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
4094
4095 2011-08-03 Thomas Quinot <quinot@adacore.com>
4096
4097 * einfo.ads: Minor reformatting.
4098
4099 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4100
4101 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
4102 composite type with an unfrozen subcomponent, in the profile of a
4103 primitive operation.
4104
4105 2011-08-03 Robert Dewar <dewar@adacore.com>
4106
4107 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
4108
4109 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4110
4111 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
4112 unconstrained type with discriminants is initialized with an aggregate,
4113 use the constrained subtype of the aggregate as the type of the object,
4114 because it is immutable, and this allows the back-end to generate no
4115 code for the object declaration.
4116
4117 2011-08-03 Robert Dewar <dewar@adacore.com>
4118
4119 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
4120 comparison operand is variable, and turns out to be zero or negative.
4121
4122 2011-08-03 Javier Miranda <miranda@adacore.com>
4123
4124 * exp_intr.adb
4125 (Expand_Dispatching_Constructor_Call): Disable expansion of
4126 code required for native targets. Done to avoid generating
4127 references to unavailable runtime entities in VM targets.
4128 * exp_ch3.adb
4129 (Expand_N_Object_Declaration): Add missing support to handle
4130 the explicit initialization of class-wide interface objects.
4131 Fix documentation.
4132
4133 2011-08-03 Matthew Heaney <heaney@adacore.com>
4134
4135 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
4136
4137 2011-08-03 Matthew Heaney <heaney@adacore.com>
4138
4139 * a-cbdlli.adb (Splice): move source items from first to last
4140
4141 2011-08-03 Yannick Moy <moy@adacore.com>
4142
4143 * sem_util.ads: comment added.
4144
4145 2011-08-03 Javier Miranda <miranda@adacore.com>
4146
4147 * exp_aggr.adb
4148 (Expand_Record_Aggregate): In VM targets disable the expansion into
4149 assignments of aggregates whose type is not known at compile time.
4150
4151 2011-08-03 Ed Schonberg <schonberg@adacore.com>
4152
4153 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
4154 protected entries and task entries, to build the proper renaming
4155 declaration for entry formals, used in debugging.
4156 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
4157 parameters in the same way.
4158
4159 2011-08-02 Robert Dewar <dewar@adacore.com>
4160
4161 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
4162 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
4163 code reorganization.
4164
4165 2011-08-02 Robert Dewar <dewar@adacore.com>
4166
4167 * debug.adb: Debug flag d.P to suppress length comparison optimization
4168 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
4169 comparison of Length by comparing First/Last instead.
4170
4171 2011-08-02 Matthew Heaney <heaney@adacore.com>
4172
4173 * a-cobove.ads: Code clean up.
4174
4175 2011-08-02 Vincent Celier <celier@adacore.com>
4176
4177 * adaint.c (file_names_case_sensitive_cache): New static int.
4178 (__gnat_get_file_names_case_sensitive): Cache the return value in
4179 file_names_case_sensitive_cache at the first invocation, to avoid
4180 multiple calls to getenv.
4181
4182 2011-08-02 Bob Duff <duff@adacore.com>
4183
4184 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
4185
4186 2011-08-02 Yannick Moy <moy@adacore.com>
4187
4188 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
4189 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
4190 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
4191 indicate that we are in a precondition or postcondition. This is used in
4192 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
4193 decide whether to flag the spec or body of the current subprogram as
4194 not in ALFA.
4195
4196 2011-08-02 Fabien Chouteau <chouteau@adacore.com>
4197
4198 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
4199 list.
4200 * a-extiin.ads: New file.
4201
4202 2011-08-02 Bob Duff <duff@adacore.com>
4203
4204 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
4205 now raises Name_Error instead of Use_Error in certain cases. The other
4206 parts of this AI were already implemented properly.
4207
4208 2011-08-02 Vincent Celier <celier@adacore.com>
4209
4210 * link.c: Only import "auto-host.h" when building the gnattools.
4211
4212 2011-08-02 Yannick Moy <moy@adacore.com>
4213
4214 * sem_util.adb: Inter-unit inlining does not work for a subprogram
4215 which calls a local subprogram, so extract subprogram
4216 from Mark_Non_ALFA_Subprogram_Body.
4217
4218 2011-08-02 Javier Miranda <miranda@adacore.com>
4219
4220 * exp_ch9.adb
4221 (Extract_Dispatching_Call): If the type of the dispatching object is an
4222 access type then return an explicit dereference in the Object out-mode
4223 parameter.
4224
4225 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4226
4227 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
4228 compatibility checks for all indexes of an array subtype, not just the
4229 first. Reset Has_Dynamic_Range_Check on the subtype before each
4230 potential check to ensure that Insert_Range_Checks will not elide any
4231 of the dynamic checks.
4232
4233 2011-08-02 Yannick Moy <moy@adacore.com>
4234
4235 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
4236 SPARK restriction at parsing time.
4237 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
4238 directive only if the SPARK restriction is set for this unit.
4239
4240 2011-08-02 Yannick Moy <moy@adacore.com>
4241
4242 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
4243 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
4244 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
4245 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
4246 Mark_Non_ALFA_Subprogram_Body.
4247 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
4248 inlined.
4249
4250 2011-08-02 Yannick Moy <moy@adacore.com>
4251
4252 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
4253 might be costly.
4254
4255 2011-08-02 Robert Dewar <dewar@adacore.com>
4256
4257 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
4258 exp_ch3.adb: Minor reformatting.
4259
4260 2011-08-02 Emmanuel Briot <briot@adacore.com>
4261
4262 * adaint.c (__gnat_locate_exec_on_path): only returns executable
4263 files, not any regular file.
4264 (__gnat_locate_file_with_predicate): new subprogram.
4265
4266 2011-08-02 Yannick Moy <moy@adacore.com>
4267
4268 * sinfo.adb, sinfo.ads: Restrict the use of flags
4269 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
4270 nodes, plus N_Subtype_Declaration for the 2nd one.
4271
4272 2011-08-02 Sergey Rybin <rybin@adacore.com>
4273
4274 * gnat_rm.texi: Ramification of pragma Eliminate documentation
4275 - fix bugs in the description of Source_Trace;
4276 - get rid of UNIT_NAME;
4277
4278 2011-08-02 Javier Miranda <miranda@adacore.com>
4279
4280 * exp_ch9.adb
4281 (Build_Dispatching_Requeue): Adding support for VM targets
4282 since we cannot directly reference the Tag entity.
4283 * exp_sel.adb (Build_K): Adding support for VM targets.
4284 (Build_S_Assignment): Adding support for VM targets.
4285 * exp_disp.adb
4286 (Default_Prim_Op_Position): In VM targets do not restrict availability
4287 of predefined interface primitives to compiling in Ada 2005 mode.
4288 (Is_Predefined_Interface_Primitive): In VM targets this service is not
4289 restricted to compiling in Ada 2005 mode.
4290 (Make_VM_TSD): Generate code that declares and initializes the OSD
4291 record. Needed to support dispatching calls through synchronized
4292 interfaces.
4293 * exp_ch3.adb
4294 (Make_Predefined_Primitive_Specs): Enable generation of predefined
4295 primitives associated with synchronized interfaces.
4296 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
4297 primitives associated with synchronized interfaces.
4298
4299 2011-08-02 Yannick Moy <moy@adacore.com>
4300
4301 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
4302 statements hidden in SPARK if preceded by the HIDE directive
4303 (Parse_Exception_Handlers): mark each exception handler in a sequence of
4304 exception handlers as hidden in SPARK if preceded by the HIDE directive
4305 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
4306 if starting with the HIDE directive
4307 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
4308 starting with the HIDE directive; mark the declarations in a private
4309 part as hidden in SPARK if the private part starts with the HIDE
4310 directive
4311 * restrict.adb, restrict.ads
4312 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
4313 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
4314 argument node belongs to a part which is hidden in SPARK
4315 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
4316 parts in SPARK; protect the possibly costly call to
4317 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
4318 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
4319 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
4320 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
4321 Tok_SPARK_Hide.
4322 (Scan): recognize special comment starting with '#' and followed by
4323 SPARK keyword "hide" as a HIDE directive.
4324
4325 2011-08-02 Yannick Moy <moy@adacore.com>
4326
4327 * types.ads, erroutc.ads: Minor reformatting.
4328
4329 2011-08-02 Vincent Celier <celier@adacore.com>
4330
4331 * link.c: Add response file support for cross platforms.
4332
4333 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4334
4335 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
4336 in an association, set parent field of copy before partial analysis.
4337 * sem_res.adb (Resolve_Slice): create reference to itype only when
4338 expansion is enabled.
4339
4340 2011-08-02 Yannick Moy <moy@adacore.com>
4341
4342 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
4343 for new flag denoting which subprogram bodies are in ALFA
4344 * restrict.adb, sem_ch7.adb: Update comment
4345 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4346 sem_ch9.adb, sem_res.adb: Add calls to
4347 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
4348 * sem_ch6.adb (Analyze_Function_Return): add calls to
4349 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
4350 middle of the body, and extended return.
4351 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
4352 False when missing return.
4353 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
4354 to True for subprograms whose spec is in ALFA. Remove later on the flag
4355 on the entity used for a subprogram body when there exists a separate
4356 declaration.
4357 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
4358 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
4359 False, otherwise do nothing.
4360
4361 2011-08-02 Robert Dewar <dewar@adacore.com>
4362
4363 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4364
4365 2011-08-02 Yannick Moy <moy@adacore.com>
4366
4367 * sem_ch4.ads: minor formatting.
4368
4369 2011-08-02 Yannick Moy <moy@adacore.com>
4370
4371 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
4372 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
4373 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
4374 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
4375 opt.ads: cleanup of SPARK mode
4376
4377 2011-08-02 Yannick Moy <moy@adacore.com>
4378
4379 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
4380 types.
4381 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
4382 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
4383 * sem_ch3.adb
4384 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
4385 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
4386 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
4387 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
4388 types.
4389 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
4390 non-static range.
4391 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
4392 functions whose return type is not in ALFA.
4393 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
4394 specifications.
4395 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4396 parameter's type is not in ALFA.
4397 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4398 types are in ALFA.
4399
4400 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4401
4402 * sem_ch6 (Analyze_Expression_Function): treat the function as
4403 Inline_Always, and introduce a subprogram declaration for it when it is
4404 not a completion.
4405 * inline.adb (Add_Inlined_Body): recognize bodies that come from
4406 expression functions, so that the back-end can determine whether they
4407 can in fact be inlined.
4408 * sem_util.adb (Is_Expression_Function): predicate to determine whether
4409 a function body comes from an expression function.
4410
4411 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4412
4413 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4414 null exclusions to test Can_Never_Be_Null on the anonymous access types
4415 of the formals rather than testing the formals themselves. Exclude this
4416 check in cases where the Old_Formal is marked as a controlling formal,
4417 to avoid issuing spurious errors for bodies completing dispatching
4418 operations (due to the flag not getting set on controlling access
4419 formals in body specs).
4420 (Find_Corresponding_Spec): When checking full and subtype conformance of
4421 subprogram bodies in instances, pass Designated and E in that order, for
4422 consistency with the expected order of the formals (New_Id followed by
4423 Old_Id).
4424
4425 2011-08-02 Robert Dewar <dewar@adacore.com>
4426
4427 * sem_ch8.adb: Minor reformatting.
4428
4429 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4430
4431 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4432 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4433 primitive operations of class-wide actuals.
4434
4435 2011-08-02 Javier Miranda <miranda@adacore.com>
4436
4437 * exp_atag.ads, exp_atag.adb
4438 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4439 since its value is implicitly passed in argument Typ.
4440 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4441 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4442 Build_Common_Dispatching_Select_Statements.
4443
4444 2011-08-02 Robert Dewar <dewar@adacore.com>
4445
4446 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4447 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4448 Minor reformatting.
4449
4450 2011-08-02 Robert Dewar <dewar@adacore.com>
4451
4452 * sem_res.adb: Minor reformatting.
4453 * sem_prag.adb: Minor reformatting.
4454
4455 2011-08-02 Javier Miranda <miranda@adacore.com>
4456
4457 * exp_atag.adb, exp_atags.ads
4458 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4459 by the tagged type Entity. Required to use this routine in the VM
4460 targets since we do not have available the Tag entity in the VM
4461 platforms.
4462 * exp_ch6.adb
4463 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4464 Ada.Tags has not been previously loaded.
4465 * exp_ch7.adb
4466 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4467 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4468 * sem_aux.adb
4469 (Enclosing_Dynamic_Scope): Add missing support to handle the full
4470 view of enclosing scopes. Required to handle enclosing scopes that
4471 are synchronized types whose full view is a task type.
4472 * exp_disp.adb
4473 (Build_VM_TSDs): Minor code improvement to avoid generating and
4474 analyzing lists with empty nodes.
4475 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4476 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4477 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4478 (Make_Disp_Timed_Select_Body): Add support for VM targets.
4479 (Make_Select_Specific_Data_Table): Add support for VM targets.
4480 (Make_VM_TSD): Generate code to initialize the SSD structure of
4481 the TSD.
4482
4483 2011-08-02 Yannick Moy <moy@adacore.com>
4484
4485 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4486 cross-references section in ALI.
4487 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4488 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4489 Sub).
4490 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4491 subprogram or package entity of a node
4492 (Is_Local_Reference_Type): new function returns True for references
4493 selected in local cross-references.
4494 (Lt): function extracted from Lt in Output_References
4495 (Write_Entity_Name): function extracted from Output_References
4496 (Generate_Definition): generate reference with type 'D' for definition
4497 of objects (object declaration and parameter specification), with
4498 appropriate locations and units, for use in local cross-references.
4499 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4500 references of type 'I' for initialization in object definition.
4501 (Output_References): move part of function Lt and procedure
4502 Write_Entity_Name outside of the body. Ignore references of types 'D'
4503 and 'I' introduced for local cross-references.
4504 (Output_Local_References): new procedure to output the local
4505 cross-references sections.
4506 (Lref_Entity_Status): new array defining whether an entity is a local
4507 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4508 with 'I' type when initialization expression is present.
4509 * get_scos.adb, get_scos.ads: Correct comments and typos
4510
4511 2011-08-02 Javier Miranda <miranda@adacore.com>
4512
4513 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4514 the JVM target.
4515 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4516 the JVM target.
4517 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4518 TSD support.
4519
4520 2011-08-02 Vincent Celier <celier@adacore.com>
4521
4522 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4523 (No_Space_Img): New function
4524 (Find_Excluded_Sources): When reading from a file, record the file name
4525 and the line number for each excluded source.
4526 (Mark_Excluded_Sources): When reporting an error, if the excluded
4527 sources were read from a file, include file name and line number in
4528 the error message.
4529
4530 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4531
4532 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4533
4534 2011-08-02 Robert Dewar <dewar@adacore.com>
4535
4536 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4537
4538 2011-08-02 Javier Miranda <miranda@adacore.com>
4539
4540 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4541 generation of TSDs to the DOTNET compiler.
4542 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4543 generation of TSDs to the DOTNET compiler.
4544
4545 2011-08-02 Javier Miranda <miranda@adacore.com>
4546
4547 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4548 record of all the tagged types declared inside library level package
4549 declarations, library level package bodies or library level subprograms.
4550 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4551 associated with a given tagged type.
4552 (Build_VM_TSDs): New subprogram.
4553 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4554 compilation units that are subprograms.
4555 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4556 compilation units that are package bodies.
4557 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4558 units that are a package declaration or a package instantiation.
4559 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4560 reorganization to improve the error generated by the frontend when the
4561 function Ada.Tags.Secondary_Tag is not available.
4562 * rtsfind.ads (RE_Register_TSD): New runtime entity.
4563 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4564
4565 2011-08-02 Javier Miranda <miranda@adacore.com>
4566
4567 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4568
4569 2011-08-02 Robert Dewar <dewar@adacore.com>
4570
4571 * s-imenne.ads: Minor reformatting.
4572
4573 2011-08-02 Robert Dewar <dewar@adacore.com>
4574
4575 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
4576 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
4577 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
4578
4579 2011-08-02 Robert Dewar <dewar@adacore.com>
4580
4581 * einfo.ads (Materialize_Entity): Document this is only for renamings
4582 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
4583 required debug information in the case where we transform the object
4584 declaration into a renaming declaration.
4585 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
4586 object
4587 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
4588 Materialize_Entity.
4589
4590 2011-08-02 Robert Dewar <dewar@adacore.com>
4591
4592 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
4593 Suppress_Init_Procs.
4594 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
4595 Suppress_Initialization/Initialization_Suppressed.
4596 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
4597 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
4598 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
4599 * sem_prag.adb: New processing for pragma Suppress_Initialization.
4600
4601 2011-08-02 Robert Dewar <dewar@adacore.com>
4602
4603 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
4604 Minor reformatting.
4605
4606 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4607
4608 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4609 only have inheritable classwide pre/postconditions.
4610
4611 2011-08-02 Javier Miranda <miranda@adacore.com>
4612
4613 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4614 * rtsfind.ads (RE_Check_TSD): New runtime entity.
4615 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4616 checks if the external tag of a type is the same as the external tag
4617 of some other declaration.
4618
4619 2011-08-02 Thomas Quinot <quinot@adacore.com>
4620
4621 * s-taskin.ads: Minor reformatting.
4622
4623 2011-08-02 Emmanuel Briot <briot@adacore.com>
4624
4625 * g-comlin.adb (Display_Help): swap the order in which it prints the
4626 short help and the general usage.
4627
4628 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4629
4630 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4631 the aspect declarations and attach them to the generic copy for
4632 subsequent analysis.
4633 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4634 declarations of the generic tree to the new subprogram declarations.
4635 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4636 conditions that apply to a subprogram instance.
4637
4638 2011-08-02 Robert Dewar <dewar@adacore.com>
4639
4640 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4641
4642 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4643
4644 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4645 private type with a tagged full view is not derived in the immediate
4646 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4647
4648 2011-08-02 Robert Dewar <dewar@adacore.com>
4649
4650 * exp_ch4.adb: Minor reformatting.
4651
4652 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4653
4654 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4655 Ada2012 iterator, the loop will be rewritten during expansion into a
4656 while loop with a cursor and an element declaration. Do not analyze the
4657 body in this case, because if the container is for indefinite types the
4658 actual subtype of the elements will only be determined when the cursor
4659 declaration is analyzed.
4660
4661 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4662
4663 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4664 size/alignment related attributes in CodePeer_Mode.
4665
4666 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4667
4668 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4669 Prepend_Element, since this can result in the operation getting the
4670 wrong slot in the full type's dispatch table if the full type has
4671 inherited operations. The incomplete type's operation will get added
4672 to the proper position in the full type's primitives
4673 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4674 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4675 dispatching operations, since there are cases where nonprimitive
4676 subprograms can get added to the list of incomplete dependents (such
4677 as subprograms in nested packages).
4678 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4679 private part when determining whether to add a primitive with a
4680 parameter of a tagged incomplete type to the Private_Dependents list.
4681 Such primitives can also occur in the visible part, and should not have
4682 been excluded from being private dependents.
4683 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4684 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4685 list of a Taft-amendment incomplete type is a primitive before issuing
4686 an error that the full type must appear in the same unit. There are
4687 cases where nonprimitives can be in the list (such as subprograms in
4688 nested packages).
4689 * sem_disp.adb (Derives_From): Use correct condition for checking that
4690 a formal's type is derived from the type of the corresponding formal in
4691 the parent subprogram (the condition was completely wrong). Add
4692 checking that was missing for controlling result types being derived
4693 from the result type of the parent operation.
4694
4695 2011-08-02 Yannick Moy <moy@adacore.com>
4696
4697 * errout.adb (First_Node): minor renaming
4698 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4699 first node.
4700
4701 2011-08-02 Yannick Moy <moy@adacore.com>
4702
4703 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4704 before accessing operands.
4705 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4706 decide whether an initialization expression respects SPARK rules, as
4707 the plain node is the expanded one. This allows for more valid warnings
4708 to be issued.
4709 * gnat_rm.texi: Minor update.
4710
4711 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4712
4713 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4714 previous change.
4715
4716 2011-08-02 Robert Dewar <dewar@adacore.com>
4717
4718 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4719
4720 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4721
4722 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4723 loop statements and the element renaming declaration with a block when
4724 the element type is controlled.
4725
4726 2011-08-02 Yannick Moy <moy@adacore.com>
4727
4728 * sinfo.ads: Minor formatting.
4729
4730 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4731
4732 * sem_aggr.adb (Add_Association): if the association has a box and no
4733 expression, use the Sloc of the aggregate itself for the new
4734 association.
4735 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4736 the Original_Node.
4737
4738 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4739
4740 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4741 When a container is provided via a function call, generate a renaming
4742 of the function result. This avoids the creation of a transient scope
4743 and the premature finalization of the container.
4744 * exp_ch7.adb (Is_Container_Cursor): Removed.
4745 (Wrap_Transient_Declaration): Remove the supression of the finalization
4746 of the list controller when the declaration denotes a container cursor,
4747 it is not needed.
4748
4749 2011-08-02 Yannick Moy <moy@adacore.com>
4750
4751 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4752 node is from source, instead of the original node being from source.
4753 * sem_aggr.adb
4754 (Resolve_Array_Aggregate): refine the check for a static expression, to
4755 recognize also static ranges
4756 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4757 Array_Type_Declaration): postpone the test for the type being a subtype
4758 mark after the type has been resolved, so that component-selection and
4759 expanded-name are discriminated.
4760 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4761 to distinguish the case of an iteration scheme, so that an error is
4762 issed on a non-static range in SPARK except in an iteration scheme.
4763 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4764 In_Iter_Schm = True.
4765 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4766 user-defined operators so that they are allowed in renaming
4767 * sem_ch8.adb
4768 (Find_Selected_Component): refine the check for prefixing of operators
4769 so that they are allowed in renaming. Move the checks for restrictions
4770 on selector name after analysis discriminated between
4771 component-selection and expanded-name.
4772 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4773 concatenation argument of string type if it is static.
4774 * sem_util.adb, sem_util.ads
4775 (Check_Later_Vs_Basic_Declarations): add a new function
4776 Is_Later_Declarative_Item to decice which declarations are allowed as
4777 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4778 mode, add that renamings are considered as later items.
4779 (Enclosing_Package): new function to return the enclosing package
4780 (Enter_Name): correct the rule for homonyms in SPARK
4781 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4782 from source (result of expansion) to avoid issuing wrong warnings.
4783
4784 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4785
4786 * errout.adb: On anything but an expression First_Node returns its
4787 argument.
4788
4789 2011-08-02 Pascal Obry <obry@adacore.com>
4790
4791 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4792
4793 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4794
4795 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4796 Set the associated loop as the related expression of internally
4797 generated cursors.
4798 * exp_ch7.adb (Is_Container_Cursor): New routine.
4799 (Wrap_Transient_Declaration): Supress the finalization of the list
4800 controller when the declaration denotes a container cursor.
4801
4802 2011-08-02 Yannick Moy <moy@adacore.com>
4803
4804 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4805 command line now.
4806 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4807 expression is a simple expression. This check cannot be performed in
4808 the semantics, so just drop it.
4809 (P_Index_Or_Discriminant_Constraint): move check that the index or
4810 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4811 semantics. Other cases were previously checked in the semantics.
4812 * par-ch4.adb (P_Name): move checks that a selector name is not
4813 character literal or an operator symbol to Find_Selected_Component in
4814 the semantics
4815 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4816 declarations are not placed after later declarations in a separate
4817 procedure in Sem_Util (possibly not the best choice?), to be used both
4818 during parsing, for Ada 83 mode, and during semantic analysis, for
4819 SPARK mode.
4820 * par-endh.adb (Check_End): move check that end label is not missing
4821 to Process_End_Label in the semantics
4822 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4823 the special case for SPARK restriction
4824 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4825 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4826 parameter Force to issue the error message even on internal node (used
4827 for generated end label). Call Check_Restriction to check when an error
4828 must be issued. In SPARK mode, issue an error message even if the
4829 restriction is not set.
4830 (Check_Restriction): new procedure with an additional out parameter to
4831 inform the caller that a message has been issued
4832 * sem_aggr.adb: Minor modification of message
4833 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4834 instead of issuing an error message directly
4835 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4836 declarations are not placed after later declarations, by calling
4837 Check_Later_Vs_Basic_Declarations
4838 (Analyze_Subtype_Declaration): move here the check that an index or
4839 discriminant constraint must be a subtype mark. Change the check that
4840 a subtype of String must start at one so that it works on subtype marks.
4841 * sem_ch4.adb (Analyze_Call): move here the check that a named
4842 association cannot follow a positional one in a call
4843 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4844 instead of issuing an error message directly
4845 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4846 selector name is not a character literal or an operator symbol. Move
4847 here the check that the prefix of an expanded name cannot be a
4848 subprogram or a loop statement.
4849 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4850 procedure called from parsing and semantics to check that basic
4851 declarations are not placed after later declarations
4852 (Process_End_Label): move here the check that end label is not missing
4853
4854 2011-08-02 Arnaud Charlet <charlet@adacore.com>
4855
4856 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4857 representation clause in codepeer mode, since it confuses CodePeer and
4858 does not bring useful info.
4859
4860 2011-08-02 Ed Falis <falis@adacore.com>
4861
4862 * init.c: initialize fp hw on MILS.
4863
4864 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4865
4866 * errout.adb (First_Node): for bodies, return the node itself (small
4867 optimization). For other nodes, do not check source_unit if the node
4868 comes from Standard.
4869
4870 2011-08-02 Robert Dewar <dewar@adacore.com>
4871
4872 * exp_ch3.adb: Minor comment additions.
4873 * sem_ch13.adb: Minor reformatting.
4874
4875 2011-08-02 Pascal Obry <obry@adacore.com>
4876
4877 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4878
4879 2011-08-02 Robert Dewar <dewar@adacore.com>
4880
4881 * sem_attr.adb: Minor reformatting.
4882
4883 2011-08-02 Robert Dewar <dewar@adacore.com>
4884
4885 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4886 (Has_Default_Component_Value): Removed
4887 * einfo.ads Comment updates
4888 (Has_Default_Aspect): Replaces Has_Default_Value
4889 (Has_Default_Component_Value): Removed
4890 * exp_ch13.adb
4891 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4892 * exp_ch3.adb
4893 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4894 (Get_Simple_Init_Val): Handle Default_Value aspect
4895 (Needs_Simple_Initialization): Handle Default_Value aspect
4896 * exp_ch3.ads: Needs_Simple_Initialization
4897 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4898 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4899 * sem_ch13.adb
4900 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4901 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4902 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4903
4904 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4905
4906 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4907 package containing iteration primitives.
4908 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4909
4910 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4911
4912 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4913 "of", pre-analyze expression in case it is a function call with
4914 finalization actions that must be placed ahead of the loop.
4915 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4916 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4917
4918 2011-08-02 Geert Bosch <bosch@adacore.com>
4919
4920 * cstand.adb (Create_Float_Types): Only consider C's long double for
4921 Long_Long_Float, in addition to double.
4922
4923 2011-08-02 Robert Dewar <dewar@adacore.com>
4924
4925 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4926 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4927 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4928 Minor reformatting.
4929
4930 2011-08-02 Ed Schonberg <schonberg@adacore.com>
4931
4932 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4933 indexed component.
4934
4935 2011-08-02 Javier Miranda <miranda@adacore.com>
4936
4937 * einfo.ads, einfo.adb
4938 (Original_Access_Type): Move this attribute to Node26 since there was
4939 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4940 which causes conflicts and breaks the generation of the .NET compiler.
4941 (Interface_Name): Add missing documentation on JGNAT only uses of
4942 this attribute.
4943
4944 2011-08-02 Geert Bosch <bosch@adacore.com>
4945
4946 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4947 (Find_Back_End_Float_Type): Likewise
4948 (Create_Back_End_Float_Types): Likewise
4949 (Create_Float_Types): Likewise
4950 (Register_Float_Type): Likewise
4951 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4952 Nlist and split out type selection in new local Find_Base_Type function.
4953 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4954 Nlist
4955 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4956
4957 2011-08-02 Robert Dewar <dewar@adacore.com>
4958
4959 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4960 alpha order).
4961 * opt.ads: Minor comment change.
4962 * sem_ch12.adb: Minor code reorganization.
4963
4964 2011-08-02 Gary Dismukes <dismukes@adacore.com>
4965
4966 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4967 subtype's list of rep items to the list on the full subtype in the case
4968 where the lists are the same.
4969
4970 2011-08-02 Geert Bosch <bosch@adacore.com>
4971
4972 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4973 using the one from System.Strings, which also deallocates all strings.
4974
4975 2011-08-02 Geert Bosch <bosch@adacore.com>
4976
4977 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4978 function.
4979 * gcc-interface/Make-lang.in: Update dependencies.
4980
4981 2011-08-02 Olivier Hainque <hainque@adacore.com>
4982
4983 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4984 end_locus.
4985
4986 2011-08-02 Javier Miranda <miranda@adacore.com>
4987
4988 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4989 associated with anonymous access to subprograms.
4990
4991 2011-08-02 Geert Bosch <bosch@adacore.com>
4992
4993 * opt.ads
4994 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4995 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4996 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4997 (Add_Symbol_Definition): Move to switch-c.adb
4998 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4999 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
5000 (Add_Symbol_Definition): Move to switch-c.adb.
5001 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
5002 * sem_warn.adb
5003 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5004 Move to warnsw.adb.
5005 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
5006 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
5007 Move to warnsw.adb.
5008 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
5009 (Add_Symbol_Definition): Moved from Prepcomp.
5010 * switch-c.ads: Update copyright notice. Use String_List instead of
5011 Argument_List, removing dependency on System.OS_Lib.
5012
5013 2011-08-02 Yannick Moy <moy@adacore.com>
5014
5015 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
5016 mode on initialization expression which does not respect SPARK
5017 restrictions.
5018 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
5019 if the tree referenced by its argument represents an initialization
5020 expression in SPARK, suitable for initializing an object in an object
5021 declaration.
5022
5023 2011-08-02 Javier Miranda <miranda@adacore.com>
5024
5025 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
5026 internally generated access to subprogram with its associated protected
5027 subprogram type.
5028 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
5029
5030 2011-08-02 Geert Bosch <bosch@adacore.com>
5031
5032 * cstand.adb (Register_Float_Type): Print information about type to
5033 register, if the Debug_Flag_Dot_B is set.
5034 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
5035 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
5036 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
5037 with a requested precision of more than Max_Digits digits and no more
5038 than Max_Base_Digits digits, if a range specification is present and the
5039 Predefined_Float_Types list has a suitable type to derive from.
5040 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
5041 case of type completion with pragma Import
5042 * sem_prag.adb
5043 (Process_Import_Predefined_Type): Processing to complete a type
5044 with pragma Import. Currently supports floating point types only.
5045 (Set_Convention_From_Pragma): Do nothing without underlying type.
5046 (Process_Convention): Guard against absence of underlying type,
5047 which may happen when importing incomplete types.
5048 (Process_Import_Or_Interface): Handle case of importing predefined
5049 types. Tweak error message.
5050
5051 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5052
5053 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
5054 functions to previous change. Reorganize code slightly.
5055
5056 2011-08-02 Geert Bosch <bosch@adacore.com>
5057
5058 * back_end.ads (Register_Type_Proc): New call back procedure type for
5059 allowing the back end to provide information about available types.
5060 (Register_Back_End_Types): New procedure to register back end types.
5061 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
5062 available types.
5063 * cstand.adb (Back_End_Float_Types): New list for floating point types
5064 supported by the back end.
5065 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
5066 (Copy_Float_Type): New procedure to make new copies of predefined types.
5067 (Register_Float_Type): New call back procedure to populate the BEFT list
5068 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
5069 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
5070 (Create_Float_Types): New procedure to create entities for floating
5071 point types predefined in Standard, and put these and any remaining
5072 BEFTs on the Predefined_Float_Types list.
5073 * stand.ads (Predefined_Float_Types): New list for predefined floating
5074 point types that do not have declarations in package Standard.
5075
5076 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5077
5078 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
5079 entity node for the unit containing the parameter.
5080 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
5081 (Add_Inlined_Subprogram): Likewise.
5082 * gcc-interface/Make-lang.in: Update dependencies.
5083
5084 2011-08-02 Thomas Quinot <quinot@adacore.com>
5085
5086 * s-stusta.adb (Print): Make sure Pos is always initialized to a
5087 suitable value.
5088
5089 2011-08-02 Geert Bosch <bosch@adacore.com>
5090
5091 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
5092
5093 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5094
5095 * sem_type.adb (Covers): Move trivial case to the top and reuse the
5096 computed value of Base_Type.
5097
5098 2011-08-02 Yannick Moy <moy@adacore.com>
5099
5100 * restrict.adb (Check_Restriction): issue an error for any use of
5101 class-wide, even if the No_Dispatch restriction is not set.
5102 * sem_aggr.adb: Correct typos in comments and messages in formal mode
5103 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
5104 when completing a private extension, the type named in the private part
5105 is not the same as that named in the visible part.
5106 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
5107 of an inherited primitive operations of a tagged type or type extension
5108 that returns the tagged type.
5109 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
5110 function which returns True for an implicit operation inherited by the
5111 derived type declaration for the argument type.
5112 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
5113 order.
5114
5115 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5116
5117 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
5118 Process_Bounds, to perform analysis with expansion of a range or an
5119 expression that is the iteration scheme for a loop.
5120 (Analyze_Iterator_Specification): If domain of iteration is given by a
5121 function call with a controlled result, as is the case if call returns
5122 a predefined container, ensure that finalization actions are properly
5123 generated.
5124 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
5125
5126 2011-08-02 Javier Miranda <miranda@adacore.com>
5127
5128 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
5129 * gcc-interface/Make-lang.in: Update dependencies.
5130
5131 2011-08-02 Javier Miranda <miranda@adacore.com>
5132
5133 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
5134 determine if the analysis is performed using N or Original_Node (N).
5135 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
5136 functionality of routine Is_Variable avoids code duplication.
5137 * checks.adb (Determine_Range): Handle temporaries generated by
5138 Remove_Side_Effects.
5139
5140 2011-08-02 Javier Miranda <miranda@adacore.com>
5141
5142 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
5143 expansion of the condition. Required since the previous analysis was
5144 done with expansion disabled (see Resolve_Quantified_Expression) and
5145 hence checks were not inserted and record comparisons have not been
5146 expanded.
5147
5148 2011-08-02 Ed Falis <falis@adacore.com>
5149
5150 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
5151 Update header.
5152
5153 2011-08-02 Bob Duff <duff@adacore.com>
5154
5155 * opt.ads: Minor comment fix.
5156
5157 2011-08-02 Bob Duff <duff@adacore.com>
5158
5159 * sem_ch12.adb (Analyze_Package_Instantiation,
5160 Analyze_Subprogram_Instantiation): Turn off style checking while
5161 analyzing an instance. Whatever style checks that apply to the generic
5162 unit should apply, so it makes no sense to apply them in an instance.
5163 This was causing trouble when compiling an instance of a runtime
5164 unit that violates the -gnatyO switch.
5165 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
5166 one of the two case statements, causing spurious errors.
5167
5168 2011-08-02 Robert Dewar <dewar@adacore.com>
5169
5170 * uname.adb: Minor reformatting.
5171 * gnatcmd.adb: Minor reformatting.
5172 * exp_attr.adb: Minor reformatting.
5173
5174 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5175
5176 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
5177 No_Dispatching_Calls, do not look for the Assign primitive, because
5178 predefined primitives are not created in this case.
5179
5180 2011-08-02 Bob Duff <duff@adacore.com>
5181
5182 * stylesw.ads: Minor comment fixes.
5183
5184 2011-08-02 Robert Dewar <dewar@adacore.com>
5185
5186 * freeze.adb (Add_To_Result): New procedure.
5187
5188 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5189
5190 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
5191 time, if the specific run-time routines for handling streams of strings
5192 are not available, use the default mechanism.
5193
5194 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5195
5196 * s-regpat.ads: Fix typo.
5197
5198 2011-08-02 Vincent Celier <celier@adacore.com>
5199
5200 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
5201 not null, call it to create the in memory config project file without
5202 parsing an existing default config project file.
5203
5204 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5205
5206 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
5207
5208 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5209
5210 * sem_elim.adb: an abstract subprogram does not need an eliminate
5211 pragma for its descendant to be eliminable.
5212
5213 2011-08-02 Ed Falis <falis@adacore.com>
5214
5215 * init.c: revert to handling before previous checkin for VxWorks
5216 * s-intman-vxworks.adb: delete unnecessary declarations related to
5217 using Ada interrupt facilities for handling signals.
5218 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
5219 * s-intman-vxworks.ads: Import __gnat_install_handler as
5220 Initialize_Interrupts.
5221 * s-taprop-vxworks.adb: Delete Signal_Mask.
5222 (Abort_Handler): change construction of mask to unblock exception
5223 signals.
5224
5225 2011-08-02 Jerome Guitton <guitton@adacore.com>
5226
5227 * a-except-2005.adb (Raise_From_Signal_Handler): Call
5228 Debug_Raise_Exception before propagation starts.
5229
5230 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5231
5232 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
5233 to Restriction_Check_Required.
5234 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
5235 * sem_res.adb (Resolve_Call): Likewise.
5236 * sem_attr.adb (Check_Stream_Attribute): Likewise.
5237
5238 2011-08-02 Bob Duff <duff@adacore.com>
5239
5240 * stylesw.ads: Update comment.
5241 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
5242 * errout.ads: Remove obsolete comment.
5243
5244 2011-08-02 Javier Miranda <miranda@adacore.com>
5245
5246 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
5247 (Set_Is_Safe_To_Reevaluate): new procedure.
5248 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
5249 assignment is allowed on safe-to-reevaluate variables.
5250 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
5251 temporary created to remove side effects in expressions that use
5252 the secondary stack as safe-to-reevaluate.
5253 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
5254 variables that are not true constants.
5255
5256 2011-08-02 Robert Dewar <dewar@adacore.com>
5257
5258 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
5259 sem_res.adb, sem_ch6.adb: Minor reformatting.
5260
5261 2011-08-02 Jerome Guitton <guitton@adacore.com>
5262
5263 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
5264
5265 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5266
5267 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
5268 not set Overridden_Operation if subprogram is an initialization
5269 procedure.
5270
5271 2011-08-02 Yannick Moy <moy@adacore.com>
5272
5273 * par-ch6.adb: Correct obsolete name in comments
5274 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
5275 which takes two message arguments (existing function takes one), with
5276 second message used for continuation.
5277 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
5278 block statements that originate from a source block statement, not
5279 generated block statements
5280 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
5281 symmetry with procedure case
5282 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
5283 function to issue an error in formal mode if a package specification
5284 contains more than one tagged type or type extension.
5285 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
5286 parameters matching formals of tagged types are objects (or ancestor
5287 type conversions of objects), not general expressions. Issue an error
5288 on view conversions that are not involving ancestor conversion of an
5289 extended type.
5290 (Resolve_Type_Conversion): in formal mode, issue an error on the
5291 operand of an ancestor type conversion which is not an object
5292 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
5293 procedure so that it works also for actuals of function calls
5294 (Is_Actual_Tagged_Parameter): new function which determines if its
5295 argument is an actual parameter of a formal of tagged type in a
5296 subprogram call
5297 (Is_SPARK_Object_Reference): new function which determines if the tree
5298 referenced by its argument represents an object in SPARK
5299
5300 2011-08-02 Robert Dewar <dewar@adacore.com>
5301
5302 * sem_ch3.adb: Minor reformatting
5303 Minor comment addition
5304 Minor error msg text change
5305
5306 2011-08-02 Javier Miranda <miranda@adacore.com>
5307
5308 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
5309 function. Used to be more precise when we generate a variable plus one
5310 assignment to remove side effects in the evaluation of the Bound
5311 expressions.
5312 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
5313 of the bound expression to force its re-analysis and thus expand the
5314 associated transient scope (if required). Code cleanup replacing the
5315 previous code that declared the constant entity by an invocation to
5316 routine Force_Evaluation which centralizes this work in the frontend.
5317
5318 2011-08-02 Robert Dewar <dewar@adacore.com>
5319
5320 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
5321 (Base_Type): Now uses improved Is_Base_Type function
5322 * einfo.ads (Base_Type): Inline this function
5323
5324 2011-08-02 Robert Dewar <dewar@adacore.com>
5325
5326 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
5327 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
5328
5329 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5330
5331 * gcc-interface/Make-lang.in: Update dependencies.
5332 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
5333 targets.
5334
5335 2011-08-02 Yannick Moy <moy@adacore.com>
5336
5337 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
5338 non-simple expression used in delta constraint
5339 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
5340 index constraint which is not a subtype mark
5341 * par.adb: With and use Restrict
5342 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
5343 mode on component type which is not a subtype mark and default
5344 expression on component
5345 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
5346 of string which does not have a lower index bound equal to 1
5347 (Array_Type_Declaration): issue an error in formal mode on index or
5348 component type which is not a subtype mark, and on aliased keyword on
5349 component
5350 (Derived_Type_Declaration): issue an error in formal mode on interface,
5351 limited or abstract type
5352 (Record_Type_Declaration): issue an error in formal mode on interface
5353 (Record_Type_Definition): issue an error in formal mode on tagged types
5354 and type extensions not declared in the specification of a library unit
5355 package; on null non-tagged record; on variant part
5356
5357 2011-08-02 Vincent Celier <celier@adacore.com>
5358
5359 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
5360 not declared for qualified library project when Library_Name is not
5361 declared, but Library_Dir is.
5362
5363 2011-08-02 Robert Dewar <dewar@adacore.com>
5364
5365 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
5366 pragmas (affects aspects [Component_]Default_Value
5367 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
5368 component type for the resolution
5369
5370 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5371
5372 * einfo.adb (Base_Type): Tune implementation for speed.
5373
5374 2011-08-02 Robert Dewar <dewar@adacore.com>
5375
5376 * freeze.adb: Minor reformatting.
5377
5378 2011-08-02 Thomas Quinot <quinot@adacore.com>
5379
5380 * scos.ads: Update comments.
5381
5382 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5383
5384 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
5385 base type, because the parent may be a subtype of a private type whose
5386 convention is established in a private part.
5387
5388 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5389
5390 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
5391 statement in a block when the expansion of the return expression has
5392 created a finalization chain.
5393 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
5394 with the parent node.
5395 Add N_Extended_Return_Statement to handle the case where a transient
5396 object declaration appears in the Return_Object_Declarations list of
5397 an extended return statement.
5398
5399 2011-08-02 Matthew Gingell <gingell@adacore.com>
5400
5401 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5402 unused parameter 'name'.
5403
5404 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5405
5406 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5407 inherited operation, check whether its alias, which is the source
5408 operastion that it renames, has been marked eliminated.
5409
5410 2011-08-02 Javier Miranda <miranda@adacore.com>
5411
5412 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5413 in-mode parameter whose type is an access type since it can be used to
5414 modify its designated object. Enforce code that handles as safe an
5415 access type that is not access-to-constant but it is the result of a
5416 previous removal of side-effects.
5417 (Remove_Side_Effects): Minor code reorganization of cases which require
5418 no action. Done to incorporate documentation on new cases uncovered
5419 working in this ticket: no action needed if this routine was invoked
5420 too early and the nodes are not yet decorated.
5421 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5422 to routine Remove_Side_Effects by calls to Force_Evaluation since they
5423 were issued with actuals that are implicitly provided by
5424 Force_Evaluation.
5425
5426 2011-08-02 Robert Dewar <dewar@adacore.com>
5427
5428 * sem_ch3.adb, sem_res.adb: Minor reformatting.
5429
5430 2011-08-02 Yannick Moy <moy@adacore.com>
5431
5432 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5433 to issue an error in formal mode on attribute not supported in this mode
5434 (Analyze_Attribute): issue errors on standard attributes not supported
5435 in formal mode.
5436 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5437 comment, and issue error in formal mode on modulus which is not a power
5438 of 2.
5439 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5440 range.
5441 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5442 subtype mark.
5443 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5444 operator on modular type (except 'not').
5445
5446 2011-08-02 Robert Dewar <dewar@adacore.com>
5447
5448 * gnat_rm.texi: Minor reformatting.
5449
5450 2011-08-02 Arnaud Charlet <charlet@adacore.com>
5451
5452 * s-osinte-linux.ads: Minor comment update and reformatting.
5453 * i-cexten.ads: Make this unit pure, as for its parent.
5454 Will allow its usage in more contexts if needed.
5455
5456 2011-08-02 Robert Dewar <dewar@adacore.com>
5457
5458 * s-utf_32.ads: Minor comment fix.
5459
5460 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5461
5462 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5463 operation of a tagged synchronized type, handle the case where the
5464 controlling argument is overloaded.
5465
5466 2011-08-02 Yannick Moy <moy@adacore.com>
5467
5468 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5469 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5470 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5471 SPARK mode and formal verification mode on processing SPARK restriction
5472 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5473 requiring consistency checking.
5474
5475 2011-08-02 Robert Dewar <dewar@adacore.com>
5476
5477 * sem_res.adb: Minor reformatting.
5478
5479 2011-08-02 Robert Dewar <dewar@adacore.com>
5480
5481 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5482 a-cforse.ads: Remove unneeded with of Ada.Containers
5483 Remove commented out pragma Inline's
5484 Move specifications of new subprograms to the actual specs
5485
5486 2011-08-02 Yannick Moy <moy@adacore.com>
5487
5488 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5489 a-cforse.ads: Update comments.
5490
5491 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5492
5493 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5494
5495 2011-08-02 Robert Dewar <dewar@adacore.com>
5496
5497 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5498 a-cforse.ads, a-cofove.ads: Minor reformatting.
5499
5500 2011-08-02 Claire Dross <dross@adacore.com>
5501
5502 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5503 a-cofove.ads: Add comments.
5504
5505 2011-08-02 Yannick Moy <moy@adacore.com>
5506
5507 * gnat_rm.texi: Document formal containers.
5508
5509 2011-08-02 Emmanuel Briot <briot@adacore.com>
5510
5511 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5512 are empty sections.
5513
5514 2011-08-02 Robert Dewar <dewar@adacore.com>
5515
5516 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5517 reformatting.
5518
5519 2011-08-02 Robert Dewar <dewar@adacore.com>
5520
5521 * aspects.adb: New aspects Default_Value and Default_Component_Value
5522 New format of Aspect_Names table checks for omitted entries
5523 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5524 handling of boolean aspects for derived types.
5525 New aspects Default_Value and Default_Component_Value
5526 New format of Aspect_Names table checks for omitted entries
5527 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5528 (Has_Default_Value): New flag
5529 (Has_Default_Component_Value): New flag
5530 (Has_Default_Value): New flag
5531 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5532 table.
5533 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5534 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5535 Default_Value and Default_Component_Value
5536 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5537 New aspects Default_Value and Default_Component_Value
5538 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5539 * sprint.adb: Print N_Aspect_Specification node when called from gdb
5540
5541 2011-08-02 Vincent Celier <celier@adacore.com>
5542
5543 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5544 inherit library kind.
5545
5546 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5547
5548 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5549 Minor reformatting.
5550
5551 2011-08-02 Robert Dewar <dewar@adacore.com>
5552
5553 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5554
5555 2011-08-02 Yannick Moy <moy@adacore.com>
5556
5557 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5558
5559 2011-08-02 Robert Dewar <dewar@adacore.com>
5560
5561 * impunit.adb: Add comment.
5562
5563 2011-08-02 Yannick Moy <moy@adacore.com>
5564
5565 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5566 qualification of aggregates in formal mode
5567 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5568 another aggregate
5569 (Resolve_Aggregate): complete the test that an aggregate is adequately
5570 qualified in formal mode
5571
5572 2011-08-02 Pascal Obry <obry@adacore.com>
5573
5574 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
5575 * mlib-prj.adb: Supress warning when compiling binder generated file.
5576 (Build_Library): Supress all warnings when compiling the binder
5577 generated file.
5578
5579 2011-08-02 Yannick Moy <moy@adacore.com>
5580
5581 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
5582 from here...
5583 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
5584 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
5585 Add with/use clauses to make Check_Formal_Restriction visible
5586
5587 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5588
5589 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
5590 in-parameters when type of the generic formal is private in the generic
5591 spec and non-private in the body.
5592
5593 2011-08-02 Claire Dross <dross@adacore.com>
5594
5595 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
5596 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
5597 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
5598 * impunit.adb, Makefile.rtl: Take new files into account.
5599
5600 2011-08-02 Robert Dewar <dewar@adacore.com>
5601
5602 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
5603 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5604
5605 2011-08-02 Yannick Moy <moy@adacore.com>
5606
5607 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5608 formal mode
5609 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5610 matching static array bounds, taking into account the special case of
5611 string literals
5612 * sem_ch3.adb: Typo in comment.
5613
5614 2011-08-02 Yannick Moy <moy@adacore.com>
5615
5616 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5617 which issues an error in formal mode if its argument node is originally
5618 from source
5619 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5620 has a discriminant specification so that it does not include the case
5621 of derived types
5622 (Derived_Type_Declaration): move here the test that a derived type has a
5623 discriminant specification
5624 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5625 first element of a component association before accessing its choices
5626 (presence of component association is not enough)
5627 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5628 declaration is a library item before accessing the next element in a
5629 list, as library items are not member of lists
5630 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5631 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5632 Check_Formal_Restriction whenever possible.
5633
5634 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5635
5636 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5637 reference when needed.
5638
5639 2011-08-02 Bob Duff <duff@adacore.com>
5640
5641 * gnat_ugn.texi: Fix typo.
5642
5643 2011-08-02 Vincent Celier <celier@adacore.com>
5644
5645 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5646 archive file name. Do not use the full path name of archives for Open
5647 VMS.
5648
5649 2011-08-02 Robert Dewar <dewar@adacore.com>
5650
5651 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5652 Analyze_Aspect_Specifications
5653 * sem_ch13.adb
5654 (Analyze_Aspect_Specifications): New handling for boolean aspects
5655 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5656 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5657 sequence for Analyze_Aspect_Specifications
5658 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5659 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5660
5661 2011-08-02 Robert Dewar <dewar@adacore.com>
5662
5663 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5664 aspects, since these no longer exist.
5665
5666 2011-08-02 Robert Dewar <dewar@adacore.com>
5667
5668 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5669 semicolon, do not try to see if there are aspects following it.
5670 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5671 aspect spec.
5672
5673 2011-08-02 Robert Dewar <dewar@adacore.com>
5674
5675 * sem_ch8.adb, aspects.ads: Minor reformatting.
5676
5677 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5678
5679 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5680 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5681 extracted from...
5682 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5683
5684 2011-08-02 Yannick Moy <moy@adacore.com>
5685
5686 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5687 mode on subprogram declaration outside of package specification, unless
5688 it is followed by a pragma Import
5689 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5690 Access_Type_Declaration): issue error in formal mode on access type
5691 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5692 incomplete type
5693 (Analyze_Object_Declaration): issue error in formal mode on object
5694 declaration which does not respect SPARK restrictions
5695 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5696 declaration which does not respect SPARK restrictions
5697 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5698 error in formal mode on digits or delta constraint
5699 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5700 decimal fixed point type
5701 (Derived_Type_Declaration): issue error in formal mode on derived type
5702 other than type extensions of tagged record types
5703 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5704 with check on access definition
5705 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5706 mode on protected definition.
5707 (Analyze_Task_Definition): issue error in formal mode on task definition
5708
5709 2011-08-02 Robert Dewar <dewar@adacore.com>
5710
5711 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5712
5713 2011-08-02 Javier Miranda <miranda@adacore.com>
5714
5715 * sem_ch6.adb (Can_Override_Operator): New function.
5716 (Verify_Overriding_Indicator): Add missing code to check overriding
5717 indicator in operators. Fixes regression.
5718 (Check_Overriding_Indicator): Minor reformating after replacing the
5719 code that evaluates if the subprogram can override an operator by
5720 invocations to the above new function.
5721 * einfo.adb
5722 (Write_Field26_Name): Add missing code to ensure that, following
5723 the documentation in einfo.ads, this field is not shown as attribute
5724 "Static_Initialization" on non-dispatching functions.
5725
5726 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5727
5728 * sem_res.adb (Resolve_Call): A call to
5729 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5730 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5731 i.e., when the second parameter is of type Time_Span.
5732
5733 2011-08-02 Vincent Celier <celier@adacore.com>
5734
5735 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5736 with an archive instead of -L<library dir> -l<library name>.
5737
5738 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5739
5740 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5741 mark the base types In_Use in addition to making the operations
5742 use_visible.
5743
5744 2011-08-02 Ed Falis <falis@adacore.com>
5745
5746 * init.c: add and setup __gnat_signal_mask for the exception signals
5747 * s-inmaop-vxworks.adb: new file.
5748 * s-intman-vxworks.adb: remove unnecessary initializations and
5749 simplify remaining
5750 * s-intman-vxworks.ads: remove unnecessary variable
5751 * s-taprop-vxworks.adb: simplify signal initialization
5752
5753 2011-08-02 Robert Dewar <dewar@adacore.com>
5754
5755 * sem_ch8.adb: Minor code reorganization, comment updates.
5756
5757 2011-08-02 Robert Dewar <dewar@adacore.com>
5758
5759 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5760 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5761 here from Sem_Res.
5762 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5763 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5764
5765 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5766
5767 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5768 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5769 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5770 use_type_clauses, to handle more efficiently use_type and use_all_type
5771 constructs.
5772 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5773 Ada2012 Use_All_Type clause.
5774 (Use_Class_Wide_Operations): new procedure.
5775
5776 2011-08-02 Robert Dewar <dewar@adacore.com>
5777
5778 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5779 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5780 expression to expression function.
5781
5782 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5783
5784 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5785 if types are compatible.
5786
5787 2011-08-02 Yannick Moy <moy@adacore.com>
5788
5789 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5790 returns True if its argument array types have same dimension and same
5791 static bounds at each index.
5792 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5793 OUT or IN OUT paramaters which are not view conversions in SPARK.
5794 (Resolve_Arithmetic_Op): issue an error in formal mode on
5795 multiplication or division with operands of fixed point types which are
5796 not qualified or explicitly converted.
5797 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5798 Boolean or array type (except String) operands.
5799 (Resolve_Equality_Op): issue an error in formal mode on equality
5800 operators for array types other than String with non-matching static
5801 bounds.
5802 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5803 for array types with non-matching static bounds. Factorize the code in
5804 Matching_Static_Array_Bounds.
5805 (Resolve_Qualified_Expression): issue an error in formal mode on
5806 qualified expressions for array types with non-matching static bounds.
5807 (Resolve_Type_Conversion): issue an error in formal mode on type
5808 conversion for array types with non-matching static bounds
5809
5810 2011-08-02 Robert Dewar <dewar@adacore.com>
5811
5812 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5813
5814 2011-08-02 Ed Schonberg <schonberg@adacore.com>
5815
5816 * par-ch9.adb: save location of entry for proper error message.
5817
5818 2011-08-02 Javier Miranda <miranda@adacore.com>
5819
5820 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5821 (Use_Full_View) which permits this routine to climb through the
5822 ancestors using the full-view of private parents.
5823 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5824 Use_Full_View to true in calls to Is_Ancestor.
5825 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5826 true in call to Is_Ancestor.
5827 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5828 Use_Full_View to true in call to Is_Ancestor.
5829 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5830 call to Is_Ancestor.
5831 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5832 Use_Full_View to true in calls to Is_Ancestor.
5833 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5834 Make_Select_Specific_Data_Table, Register_Primitive,
5835 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5836 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5837 to true in call to Is_Ancestor.
5838 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5839 Use_Full_View to true in calls to Is_Ancestor.
5840 * exp_cg.adb
5841 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5842 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5843
5844 2011-08-02 Robert Dewar <dewar@adacore.com>
5845
5846 * gnat_rm.texi: Minor reformatting.
5847 * sem_prag.adb: Minor reformatting.
5848
5849 2011-08-02 Tristan Gingold <gingold@adacore.com>
5850
5851 * vms_data.ads: Add VMS qualifier for -gnateP.
5852
5853 2011-08-02 Robert Dewar <dewar@adacore.com>
5854
5855 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5856 * par-ch7.adb (P_Package): Proper placement of aspects for package
5857 decl/instantiation.
5858 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5859 (End_Statements): Add Is_Sloc parameterr
5860 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5861 (Check_End): Ad Is_Sloc parameter
5862 (End_Statements): Add Is_Sloc parameterr
5863
5864 2011-08-02 Vincent Celier <celier@adacore.com>
5865
5866 * ug_words: Add VMS qualifier equivalent to -gnateP:
5867 /SYMBOL_PREPROCESSING.
5868
5869 2011-08-02 Jose Ruiz <ruiz@adacore.com>
5870
5871 * gnat-style.texi: For hexadecimal numeric literals the typical
5872 grouping of digits is 4 to represent 2 bytes.
5873 A procedure spec which is split into several lines is indented two
5874 characters.
5875
5876 2011-08-02 Yannick Moy <moy@adacore.com>
5877
5878 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5879 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5880 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5881 properly qualified
5882 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5883 choice in array aggregate
5884 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5885 mark as ancestor
5886 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5887 positional and named aggregate for record, or others in record
5888 aggregate, or multiple choice in record aggregate
5889 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5890 array operands to logical operations AND, OR and XOR do not have the
5891 same static lower and higher bounds
5892 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5893
5894 2011-08-01 Robert Dewar <dewar@adacore.com>
5895
5896 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5897 Replaces Last_Source_Node_In_Sequence.
5898 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5899 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5900 parens and blank in string (this was inconsistently implemented).
5901 * errout.ads
5902 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5903 blank in string (this was inconsistently implemented).
5904 * gnat1drv.adb
5905 (Set_Global_Switches): Set formal mode switches appropriately
5906 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5907 * par-prag.adb
5908 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5909 call Set_Error_Msg_Lang to set "spark" as language name.
5910 * par.adb: Remove unnecessary call to set formal language for errout
5911 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5912 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5913 name.
5914 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5915 calls to it, moved after resolution so that types are known
5916 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5917 result of concatenation is not of type String
5918 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5919 concatenation is not properly restricted
5920 * gnat_rm.texi: Add doc on pragma Spark_95.
5921 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5922 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5923 * gcc-interface/Make-lang.in: Update dependencies.
5924
5925 2011-08-01 Javier Miranda <miranda@adacore.com>
5926
5927 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5928 condition that detects if the overridden operation must replace an
5929 existing entity.
5930
5931 2011-08-01 Javier Miranda <miranda@adacore.com>
5932
5933 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5934 code declarations inserted by Insert_Actions in each alternative of the
5935 N_Case_Expression node.
5936
5937 2011-08-01 Robert Dewar <dewar@adacore.com>
5938
5939 * sem_ch6.adb: Minor code reorganization.
5940 * sem_util.adb: Minor reformatting.
5941
5942 2011-08-01 Pascal Obry <obry@adacore.com>
5943
5944 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5945 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5946
5947 2011-08-01 Yannick Moy <moy@adacore.com>
5948
5949 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5950 literal or operator symbol which is prefixed
5951 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5952 mode on access attributes.
5953 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5954 that concatenation operands are properly restricted in formal mode
5955 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5956 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5957 result of the concatenation has a type different from String.
5958 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5959 Analyze_Quantified_Expression, Analyze_Slice,
5960 Analyze_Null): issue an error in formal mode on unsupported constructs
5961 * sem_ch5.adb
5962 (Analyze_Block_Statement): only issue error on source block statement
5963 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5964 function which returns the last node in a list of nodes for which
5965 Comes_From_Source returns True, if any
5966 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5967 Last_Source_Node_In_Sequence
5968 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5969 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5970 mode on unsupported constructs
5971 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5972 rest of the actions may be needed later on since the error is marked as
5973 not serious.
5974 * sinfo.ads: Typos in comments.
5975
5976 2011-08-01 Pascal Obry <obry@adacore.com>
5977
5978 * projects.texi: Minor editing.
5979
5980 2011-08-01 Yannick Moy <moy@adacore.com>
5981
5982 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5983 insertion character ~~
5984 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5985 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5986 with insertion character ~~
5987 (Set_Msg_Text): treat insertion character ~~
5988 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5989 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5990 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5991 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5992 errors related to the formal language restriction not serious
5993 (insertion character |).
5994 * par.adb (Par): set formal language for error messages if needed
5995 * sem_ch6.adb (Check_Missing_Return): take into account possible
5996 generated statements at the end of the function
5997 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5998 enumeration value to define a new pragma SPARK_95
5999 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
6000 SPARK_Version): new type and variables to store the SPARK version
6001 (none by default).
6002 (SPARK_Mode): return True when SPARK_Version is set
6003 * par-prag.adb: Correct indentation
6004 (Prag): take Pragma_SPARK_95 into account
6005 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
6006 into account.
6007
6008 2011-08-01 Robert Dewar <dewar@adacore.com>
6009
6010 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
6011 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
6012 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
6013
6014 2011-08-01 Pascal Obry <obry@adacore.com>
6015
6016 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
6017 Target_Name to Get_Path call.
6018 (Parse_Single_Project): Likewise.
6019 (Post_Parse_Context_Clause): Likewise.
6020 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
6021 Call Initialise_Project_Path with the proper Target_Name.
6022 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
6023 search path.
6024 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
6025 with the proper Target_Name.
6026 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
6027 Part.Parse routine.
6028 (Parse_Project_And_Apply_Config): Likewise.
6029 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
6030 This is fine as this part of the code is supporting only native
6031 compilation.
6032 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
6033 is fine as this part of the code is supporting only native compilation.
6034
6035 2011-08-01 Yannick Moy <moy@adacore.com>
6036
6037 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
6038 of homonym, unless the homonym is one of the cases allowed in SPARK
6039 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
6040 package declaration occurring after a body.
6041
6042 2011-08-01 Robert Dewar <dewar@adacore.com>
6043
6044 * checks.adb, exp_ch4.adb: Minor reformatting.
6045
6046 2011-08-01 Javier Miranda <miranda@adacore.com>
6047
6048 * einfo.ads (Access_Disp_Table): Fix documentation.
6049 (Dispatch_Table_Wrappers): Fix documentation.
6050
6051 2011-08-01 Pascal Obry <obry@adacore.com>
6052
6053 * prj-env.adb, prj-env.ads: Minor reformatting.
6054
6055 2011-08-01 Yannick Moy <moy@adacore.com>
6056
6057 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
6058 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6059 procedures out of these packages.
6060 * errout.ads, errout.adb
6061 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
6062 procedures in of this package
6063 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
6064 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
6065 on misplaced later vs initial declarations, like in Ada 83
6066 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
6067 formal mode on attribute of private type whose full type declaration
6068 is not visible
6069 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
6070 package declaration inside a package specification
6071 (Analyze_Full_Type_Declaration): issue error in formal mode on
6072 controlled type or discriminant type
6073 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
6074 user-defined operator means that it should come from the source
6075 (New_Overloaded_Entity): issue error in formal mode on overloaded
6076 entity.
6077 * sem_ch6.ads, sem_ch13.ads: typos in comments.
6078
6079 2011-08-01 Thomas Quinot <quinot@adacore.com>
6080
6081 * atree.adb: Minor reformatting.
6082 * checks.adb: Minor reformatting.
6083
6084 2011-08-01 Vincent Celier <celier@adacore.com>
6085
6086 * s-parame-vms-ia64.ads: Fix typo in comment
6087 Minor reformatting
6088 * s-parame-vms-restrict.ads: Removed, unused.
6089
6090 2011-08-01 Javier Miranda <miranda@adacore.com>
6091
6092 * exp_ch3.adb
6093 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
6094 * sem_ch3.adb
6095 (Constrain_Index): Remove side effects in the evaluation of the bounds.
6096 * sem_ch3.ads, sem_ch3.adb
6097 (Is_Constant_Bound): New extended version of the subprogram that was
6098 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
6099 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
6100 * sem_aux.ads (Constant_Value): Fix typo in comment.
6101 * checks.adb (Generate_Index_Checks): New implementation which, for
6102 array objects with constant bounds, generates the runtime check
6103 referencing the bounds of the array type. For other cases this routine
6104 provides its previous behavior obtaining such values from the array
6105 object.
6106 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
6107 parent type.
6108 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
6109 we cannot have semantic interpretations of the new node.
6110
6111 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6112
6113 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
6114 expressions.
6115
6116 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6117
6118 * sem_ch8.adb: Minor code editing.
6119 * s-vxwext.adb: Remove trailing space.
6120 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
6121 consistency with other files.
6122
6123 2011-08-01 Thomas Quinot <quinot@adacore.com>
6124
6125 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
6126
6127 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6128
6129 * par-ch10.adb: reject parameterized expressions as compilation unit.
6130 * sem_ch4.adb: handle properly conditional expression with overloaded
6131 then_clause and no else_clause.
6132
6133 2011-08-01 Tristan Gingold <gingold@adacore.com>
6134
6135 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
6136 like done by System.Aux_DEC.
6137 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
6138
6139 2011-08-01 Yannick Moy <moy@adacore.com>
6140
6141 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
6142 missing label at end of declaration (subprogram or package)
6143 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
6144 of positional and named parameter association
6145 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
6146 Error_Msg_SP which adds a prefix to the error message giving the name
6147 of the formal language analyzed
6148 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
6149 access result type in subprogram, unconstrained array as result type,.
6150 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
6151 procedure
6152 * sem_ch8.adb: Code clean up.
6153
6154 2011-08-01 Javier Miranda <miranda@adacore.com>
6155
6156 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
6157 * einfo.ads (Access_Disp_Table): Fix documentation.
6158 (Dispatch_Table_Wrappers): Fix documentation.
6159 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
6160 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
6161 to enforce the documentation of this attribute.
6162 (Set_Is_Interface): Cleanup the assertion.
6163 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
6164 the Underlying_Type entity before reading attribute Access_Disp_Table.
6165 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
6166 Locate the Underlying_Type before reading attribute Access_Disp_Table.
6167 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
6168 the Underlying_Type entity before reading attribute Access_Disp_Table.
6169 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
6170 Locate the Underlying_Type entity before reading attribute
6171 Access_Disp_Table.
6172
6173 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6174
6175 * s-poosiz.ads: Additional overriding indicators.
6176
6177 2011-08-01 Yannick Moy <moy@adacore.com>
6178
6179 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
6180 formal mode.
6181 (Analyze_Iteration_Scheme): issue error in formal mode when loop
6182 parameter specification does not include a subtype mark.
6183 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
6184 formal mode on abstract subprogram.
6185 (Analyze_Subprogram_Specification): issue error in formal mode on
6186 user-defined operator.
6187 (Process_Formals): issue error in formal mode on access parameter and
6188 default expression.
6189 * sem_ch9.adb (Analyze_Abort_Statement,
6190 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
6191 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
6192 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
6193 Analyze_Requeue, Analyze_Selective_Accept,
6194 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
6195 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
6196 issue error in formal mode on user-defined raise statement.
6197
6198 2011-08-01 Thomas Quinot <quinot@adacore.com>
6199
6200 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
6201 declaration being hidden when overriding an implicit inherited
6202 subprogram.
6203 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
6204 (-gnats), do not complain about a source file that contains only a
6205 pragma No_Body.
6206
6207 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6208
6209 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
6210 variable if already set.
6211
6212 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6213
6214 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
6215 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
6216 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
6217 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
6218 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
6219 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
6220 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
6221 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
6222 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
6223 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
6224 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
6225 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
6226 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
6227 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
6228 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
6229 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
6230 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
6231 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
6232 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
6233 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
6234 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
6235 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
6236 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
6237 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
6238 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
6239 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
6240 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
6241 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
6242 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
6243 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
6244 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
6245 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
6246 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
6247 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
6248 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
6249 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
6250 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
6251 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
6252 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
6253 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
6254 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
6255 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
6256 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
6257 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
6258 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
6259 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
6260 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
6261 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
6262 s-osinte-mingw.ads: Update to GPLv3 run-time license.
6263 Use GNAT instead of GNARL.
6264
6265 2011-08-01 Bob Duff <duff@adacore.com>
6266
6267 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
6268 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
6269 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
6270 reformatting.
6271
6272 2011-08-01 Yannick Moy <moy@adacore.com>
6273
6274 * debug.adb (d.D) reverve flag for the SPARK mode
6275 (d.E) reverve flag for SPARK generation mode
6276 (d.F) reverve flag for Why generation mode
6277 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
6278 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
6279 functions which return True when the corresponding modes are set
6280 (Formal_Language): return "spark" or "alfa" when in formal verification
6281 mode.
6282 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
6283 Error_Msg to prefix the error message with a tag giving the formal
6284 language
6285 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
6286 message with a tag giving the formal language
6287 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
6288 block statement
6289 (Analyze_Case_Statement): issue error in formal mode on case statement
6290 with a single "others" case alternative
6291 (Analyze_Exit_Statement): issue errors in formal mode on exit
6292 statements which do not respect SPARK restrictions
6293 (Analyze_Goto_Statement): issue error in formal mode on goto statement
6294 (Check_Unreachable_Code): always issue an error (not a warning) in
6295 formal mode on unreachable code (concerns both code after an infinite
6296 loop and after an unconditional jump, both not allowed in SPARK)
6297 * sem_ch6.adb (Analyze_Return_Statement): add call to
6298 Set_Return_Present for a procedure containing a return statement
6299 (already done for functions in Analyze_Function_Return)
6300 (Analyze_Function_Return): issue error in formal mode on extended
6301 return or if return is not last statement in function
6302 (Check_Missing_Return): issue error in formal mode if function does
6303 not end with return or if procedure contains a return
6304 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
6305 function to detect if there is an inner scope of its parameter S which
6306 is a loop.
6307
6308 2011-08-01 Thomas Quinot <quinot@adacore.com>
6309
6310 * sem_ch6.ads: Minor reformatting.
6311
6312 2011-08-01 Javier Miranda <miranda@adacore.com>
6313
6314 * sem_util.adb (Abstract_Interface_List): Complete condition when
6315 processing private type declarations to avoid reading unavailable
6316 attribute.
6317 (Is_Synchronized_Tagged_Type): Complete condition when processing
6318 private extension declaration nodes to avoid reading unavailable
6319 attribute.
6320
6321 2011-08-01 Thomas Quinot <quinot@adacore.com>
6322
6323 * sem_ch3.adb: Minor reformatting.
6324
6325 2011-08-01 Thomas Quinot <quinot@adacore.com>
6326
6327 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
6328 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
6329 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
6330 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
6331 for VMS, instead parametrize the common implementation with
6332 System.Parameters declarations.
6333
6334 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
6335
6336 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
6337
6338 2011-08-01 Tristan Gingold <gingold@adacore.com>
6339
6340 * seh_init.c: Fix SEH handler installation on win64.
6341
6342 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6343
6344 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
6345 double analysis of an anonymous access to subprogram, because it can
6346 lead to improper sharing of profiles and a back-end crash.
6347
6348 2011-08-01 Robert Dewar <dewar@adacore.com>
6349
6350 * make.adb, sem_ch4.adb: Minor reformatting.
6351 * gcc-interface/Make-lang.in: Update dependencies.
6352 * sem_util.adb, exp_ch5.adb: Minor reformatting.
6353
6354 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6355
6356 * gnat_rm.texi: Fix definition of Long_Integer.
6357
6358 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6359
6360 * exp_aggr.adb: check limit size of static aggregate unconditionally,
6361 to prevent storage exhaustion.
6362 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
6363 finalized is a function body, insert the cleanup code before the final
6364 return statement, to prevent spurious warnings.
6365 * s-pooglo.ads: add overriding indicator.
6366
6367 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6368
6369 * sem_ch4.adb (Operator_Check): improve error message when both a
6370 with_clause and a use_clause are needed to make operator usage legal.
6371 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
6372 determine whether a compilation unit is visible within an other,
6373 either through a with_clause in the current unit, or a with_clause in
6374 its library unit or one one of its parents.
6375
6376 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6377
6378 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
6379 over an arbitrary expression of an array or container type.
6380 * lib-xref.adb: clarify comment.
6381
6382 2011-08-01 Bob Duff <duff@adacore.com>
6383
6384 * einfo.ads: Minor reformatting.
6385 * debug.adb: Minor comment improvement.
6386
6387 2011-08-01 Javier Miranda <miranda@adacore.com>
6388
6389 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
6390 consider hidden subprograms as valid candidates.
6391
6392 2011-08-01 Arnaud Charlet <charlet@adacore.com>
6393
6394 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6395
6396 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
6397
6398 * gnat_ugn.texi: Fix typo.
6399
6400 2011-08-01 Robert Dewar <dewar@adacore.com>
6401
6402 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6403 lib-xref.adb: Minor reformatting
6404
6405 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6406
6407 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6408 when to generate a call to Move_Final_List.
6409 (Has_Controlled_Parts): Remove this function.
6410
6411 2011-08-01 Geert Bosch <bosch@adacore.com>
6412
6413 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6414 "," in choice list.
6415
6416 2011-08-01 Thomas Quinot <quinot@adacore.com>
6417
6418 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6419 explicit raise of a predefined exception as Comes_From_Source if the
6420 original N_Raise_Statement comes from source.
6421
6422 2011-08-01 Robert Dewar <dewar@adacore.com>
6423
6424 * sinfo.ads: Add comment.
6425 * sem_ch6.adb: Minor reformatting.
6426
6427 2011-08-01 Robert Dewar <dewar@adacore.com>
6428
6429 * freeze.adb (Freeze_Entity): Refine check for bad component size
6430 clause to avoid rejecting confirming clause when atomic/aliased present.
6431
6432 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6433
6434 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6435 better determine whether an entity reference is a write.
6436 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6437 subcomponent.
6438 * lib-xref.adb (Output_References): Do no suppress a read reference at
6439 the same location as an immediately preceeding modify-reference, to
6440 handle properly in-out actuals.
6441
6442 2011-08-01 Tristan Gingold <gingold@adacore.com>
6443
6444 * env.c (__gnat_setenv) [VMS]: Refine previous change.
6445
6446 2011-08-01 Quentin Ochem <ochem@adacore.com>
6447
6448 * i-cstrin.adb (New_String): Changed implementation, now uses only the
6449 heap to compute the result.
6450
6451 2011-08-01 Robert Dewar <dewar@adacore.com>
6452
6453 * atree.ads: Minor reformatting.
6454
6455 2011-08-01 Emmanuel Briot <briot@adacore.com>
6456
6457 * g-expect.adb (Get_Command_Output): Fix memory leak.
6458
6459 2011-08-01 Geert Bosch <bosch@adacore.com>
6460
6461 * cstand.adb (P_Float_Type): New procedure to print the definition of
6462 predefined fpt types.
6463 (P_Mixed_Name): New procedure to print a name using mixed case
6464 (Print_Standard): Use P_Float_Type for printing floating point types
6465 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6466 precision IEEE float.
6467
6468 2011-08-01 Thomas Quinot <quinot@adacore.com>
6469
6470 * sem_ch3.adb: Minor reformatting.
6471
6472 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6473
6474 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6475 the completion of a generic function, insert the new body rather than
6476 rewriting the original.
6477
6478 2011-08-01 Yannick Moy <moy@adacore.com>
6479
6480 * sinfo.ads, errout.ads: Typos in comments.
6481
6482 2011-08-01 Robert Dewar <dewar@adacore.com>
6483
6484 * par-endh.adb: Minor reformatting.
6485
6486 2011-08-01 Robert Dewar <dewar@adacore.com>
6487
6488 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6489 (Pre_Post_Aspects): New subtype.
6490 * par-ch12.adb (P_Generic): New syntax for aspects in packages
6491 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6492 * par-ch7.adb (P_Package): Remove Decl parameter
6493 (P_Package): Handle new syntax for aspects (before IS)
6494 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6495 new aspect syntax
6496 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6497 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6498 (P_Package): Remove Decl parameter
6499 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6500 aspects
6501 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6502 specs
6503 * sem_util.ads, sem_util.adb (Static_Boolean): New function
6504 * sinfo.ads: Document new syntax for aspects in packages etc.
6505 * sprint.adb: Handle new syntax of aspects before IS in package
6506
6507 2011-08-01 Thomas Quinot <quinot@adacore.com>
6508
6509 * atree.ads: Minor reformatting.
6510 * sem_prag.adb: Minor reformatting.
6511
6512 2011-08-01 Robert Dewar <dewar@adacore.com>
6513
6514 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6515 case expr alternative.
6516
6517 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6518
6519 * sem_ch12.adb: Fix typo.
6520
6521 2011-08-01 Geert Bosch <bosch@adacore.com>
6522
6523 * sem_prag.adb (Check_No_Link_Name): New procedure.
6524 (Process_Import_Or_Interface): Use Check_No_Link_Name.
6525 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6526 instead of Standard_Long_Long_Float_Size global. Preparation for
6527 eventual removal of per type constants.
6528 * exp_util.ads (Get_Stream_Size): New function returning the stream
6529 size value of subtype E.
6530 * exp_util.adb (Get_Stream_Size): Implement new function.
6531 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6532 function.
6533 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6534 * einfo.adb:
6535 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6536
6537 2011-08-01 Geert Bosch <bosch@adacore.com>
6538
6539 * cstand.adb: Fix comments.
6540 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6541 count of arguments.
6542
6543 2011-08-01 Robert Dewar <dewar@adacore.com>
6544
6545 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6546
6547 2011-08-01 Geert Bosch <bosch@adacore.com>
6548
6549 * atree.ads: Fix comment.
6550
6551 2011-08-01 Robert Dewar <dewar@adacore.com>
6552
6553 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6554 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6555 * par.adb: Add with for Namet.Sp.
6556 * par-tchk.adb: Minor reformatting.
6557
6558 2011-08-01 Vincent Celier <celier@adacore.com>
6559
6560 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6561 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6562 of the init procedure of a SAL.
6563 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6564 New procedure.
6565
6566 2011-08-01 Thomas Quinot <quinot@adacore.com>
6567
6568 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6569 reformatting.
6570
6571 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6572
6573 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
6574
6575 2011-08-01 Thomas Quinot <quinot@adacore.com>
6576
6577 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
6578 conformant with its spec (return True only for types that have
6579 an overriding Initialize primitive operation that prevents them from
6580 having preelaborable initialization).
6581 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
6582 initialization for controlled types in Ada 2005 or later mode.
6583
6584 2011-08-01 Robert Dewar <dewar@adacore.com>
6585
6586 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
6587 Postcondition.
6588 (Same_Aspect): New function.
6589 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
6590 Type_Invariant, Precondition, Postcondition.
6591 * snames.ads-tmpl: Add Name_Type_Invariant.
6592
6593 2011-08-01 Robert Dewar <dewar@adacore.com>
6594
6595 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
6596 here.
6597 (Freeze_All_Ent): Fix error in handling inherited aspects.
6598 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
6599 already analyzed, but don't skip entire processing of a declaration,
6600 that's wrong in some cases of declarations being rewritten.
6601 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
6602 Don't delay for integer, string literals
6603 Treat predicates in usual manner for delay, remove special case code,
6604 not needed.
6605 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
6606 (Build_Predicate_Function): Update saved expression in aspect
6607 (Build_Invariant_Procedure): Update saved expression in aspect
6608 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6609 of replacement of discriminant references if the reference is simple.
6610
6611 2011-08-01 Robert Dewar <dewar@adacore.com>
6612
6613 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6614 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6615 Static_Predicate and Dynamic_Predicate.
6616 (Build_Predicate_Function): Add processing for Static_Predicate
6617 and Dynamic_Predicate.
6618 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6619 (From_Static_Predicate): New flag
6620 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6621
6622 2011-08-01 Robert Dewar <dewar@adacore.com>
6623
6624 * usage.adb: Documentation cleanup for Ada version modes in usage.
6625 * expander.adb: Minor reformatting.
6626
6627 2011-08-01 Robert Dewar <dewar@adacore.com>
6628
6629 * atree.ads: Minor comment fix.
6630 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6631 a-witeio.ads, sem_prag.adb: Minor reformatting.
6632
6633 2011-08-01 Doug Rupp <rupp@adacore.com>
6634
6635 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6636 pointers. Use descrip.h header file for convenience. Add some
6637 comments.
6638
6639 2011-08-01 Robert Dewar <dewar@adacore.com>
6640
6641 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6642 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6643 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6644 New procedure.
6645 (Check_Aspect_At_End_Of_Declarations): New procedure
6646 (Analye_Aspect_Specification): Minor changes for above procedures
6647 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6648 specification node as well.
6649
6650 2011-08-01 Pascal Obry <obry@adacore.com>
6651
6652 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6653 Windows files. Use GetFilesAttributes() in this case to check for file
6654 existence instead of returning with an error code.
6655
6656 2011-08-01 Vincent Celier <celier@adacore.com>
6657
6658 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6659 High is above Source length.
6660
6661 2011-08-01 Robert Dewar <dewar@adacore.com>
6662
6663 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6664
6665 2011-08-01 Robert Dewar <dewar@adacore.com>
6666
6667 * aspects.ads (Boolean_Aspects): New subtype.
6668 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6669 for derived types in cases where the parent type and derived type have
6670 aspects.
6671 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6672 with aspects when parent type also has aspects.
6673 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6674 boolean expression at this point).
6675 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6676 accordance with final decision on the Ada 2012 feature.
6677 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6678
6679 2011-08-01 Matthew Heaney <heaney@adacore.com>
6680
6681 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6682
6683 2011-08-01 Pascal Obry <obry@adacore.com>
6684
6685 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6686 Fix Replace_Slice when High is above current string size.
6687 (Replace_Slice): Fix DL computation when High is above current
6688 string length.
6689
6690 2011-08-01 Gary Dismukes <dismukes@adacore.com>
6691
6692 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6693
6694 2011-08-01 Matthew Heaney <heaney@adacore.com>
6695
6696 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6697 of node.
6698
6699 2011-08-01 Pascal Obry <obry@adacore.com>
6700
6701 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6702 reformatting.
6703
6704 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6705
6706 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6707 access to protected subprograms in generic bodies.
6708 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6709 protected type, indicate that the convention of the subprogram is
6710 Convention_Protected, because it may be used in subsequent declarations
6711 within the protected declaration.
6712
6713 2011-08-01 Vincent Celier <celier@adacore.com>
6714
6715 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6716 and "final" procedures when the name of the library is "ada", to avoid
6717 duplicate symbols "adainit" and "adafinal" in executables.
6718
6719 2011-08-01 Ed Schonberg <schonberg@adacore.com>
6720
6721 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6722 quantified expression that appears within a postcondition and uses the
6723 Ada2012 'Result attribute.
6724
6725 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6726
6727 * init.c (__gnat_error_handler): Cast reason to int.
6728 (__gnat_install_handler): Explain sa_sigaction use.
6729
6730 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6731
6732 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6733 subprogram has copy-in copy-out parameters, try to promote the mode of
6734 the return type if it is passed in registers.
6735
6736 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6737
6738 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6739 left operand as addressable.
6740
6741 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6742
6743 * gcc-interface/gigi.h (build_function_stub): Remove.
6744 (build_return_expr): Likewise.
6745 (convert_vms_descriptor): Declare.
6746 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6747 (build_function_stub): Move to...
6748 * gcc-interface/utils2.c (build_return_expr): Move to...
6749 * gcc-interface/trans.c (build_function_stub): ...here.
6750 (build_return_expr): ...here.
6751 (Subprogram_Body_to_gnu): Add local variable for language_function.
6752 Disconnect the parameter attributes cache, if any, once done with it.
6753 Call end_subprog_body only after setting the end_locus.
6754 Build the stub associated with the function, if any, at the very end.
6755 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6756 variables and streamline control flow.
6757
6758 2011-07-23 Arnaud Charlet <charlet@adacore.com>
6759
6760 PR ada/49819
6761 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6762 g-trasym-dwarf.adb.
6763
6764 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6765
6766 PR bootstrap/49794
6767 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6768 Assign to act.sa_sigaction.
6769 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6770 current->return_address to char * before arithmetic.
6771
6772 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6773
6774 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6775 Correct argument types.
6776 Extract code from reason.
6777 (__gnat_install_handler): Assign to act.sa_sigaction.
6778
6779 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6780
6781 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6782 (GNAT1_OBJS): ...here.
6783
6784 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6785
6786 PR ada/48711
6787 * g-socthi-mingw.adb (Fill): Fix formatting.
6788
6789 * gcc-interface/gigi.h: Move around comment.
6790
6791 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6792
6793 PR ada/46350
6794 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6795
6796 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
6797
6798 PR ada/48711
6799 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6800
6801 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6802
6803 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6804 range comparison if Pmode is SImode.
6805
6806 2011-07-12 Laurent GUERBY <laurent@guerby.net>
6807 Eric Botcazou <ebotcazou@adacore.com>
6808
6809 * adadecode.c: Wrap up in extern "C" block.
6810 * adadecode.h: Likewise.
6811 * adaint.c: Likewise. Remove 'const' keyword.
6812 * adaint.h: Likewise.
6813 * argv.c: Likewise.
6814 * atree.h: Likewise.
6815 * cio.c: Likewise.
6816 * cstreams.c: Likewise.
6817 * env.c: Likewise.
6818 * exit.c: Likewise.
6819 * fe.h: Likewise.
6820 * final.c: Likewise.
6821 * init.c: Likewise.
6822 * initialize.c: Likewise.
6823 * link.c: Likewise.
6824 * namet.h: Likewise.
6825 * nlists.h: Likewise.
6826 * raise.c: Likewise.
6827 * raise.h: Likewise.
6828 * repinfo.h: Likewise.
6829 * seh_init.c: Likewise.
6830 * targext.c: Likewise.
6831 * tracebak.c: Likewise.
6832 * uintp.h: Likewise.
6833 * urealp.h: Likewise.
6834 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6835 * xsinfo.adb: Likewise.
6836 * xsnamest.adb: Likewise.
6837 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6838 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6839 * gcc-interface/misc.c: Likewise.
6840 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6841 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6842 ada/targext.o here...
6843 (GNAT_ADA_OBJS): ...and not here.
6844 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6845 (GNATBIND_OBJS): Reorder.
6846
6847 2011-07-07 Richard Henderson <rth@redhat.com>
6848
6849 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6850 dwarf2out_frame_init.
6851
6852 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6853
6854 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6855
6856 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6857
6858 PR target/39150
6859 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6860
6861 2011-07-06 Richard Guenther <rguenther@suse.de>
6862
6863 * gcc-interface/misc.c (gnat_init): Merge calls to
6864 build_common_tree_nodes and build_common_tree_nodes_2.
6865 Re-initialize boolean_false_node.
6866
6867 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6868 Olivier Hainque <hainque@adacore.com>
6869 Nicolas Setton <setton@adacore.com>
6870
6871 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6872 the type according to the ARTIFICIAL_P parameter.
6873 (create_type_decl): Likewise.
6874 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6875
6876 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6877
6878 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6879 (gnatbind): Likewise.
6880
6881 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6882
6883 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6884
6885 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6886
6887 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6888 local variable throughout. Remove useless call to Base_Type.
6889 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6890 Take it also into account for the volatileness of the field. Set the
6891 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6892
6893 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6894
6895 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6896 on a dereference built for a by-ref object if it has an address clause.
6897
6898 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6899
6900 * einfo.ads (Address_Taken): Document use for the second argument of
6901 Asm_Input and Asm_Output attributes.
6902 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6903 argument is an entity name, then set Address_Taken on it.
6904 <Attribute_Asm_Output>: Likewise.
6905 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6906 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6907 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6908 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6909
6910 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6911
6912 PR middle-end/46500
6913 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6914
6915 2011-06-14 Joseph Myers <joseph@codesourcery.com>
6916
6917 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6918 (ada/utils.o): Update dependencies.
6919 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6920 ../../../libcpp/libcpp.a.
6921 * gcc-interface/utils.c: Include common/common-target.h.
6922 (process_attributes): Use targetm_common.have_named_sections.
6923
6924 2011-06-07 Richard Guenther <rguenther@suse.de>
6925
6926 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6927 set_sizetype.
6928
6929 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6930
6931 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6932 TREE_THIS_NOTRAP flag.
6933
6934 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6935
6936 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6937 Fix thinko.
6938
6939 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6940
6941 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6942 constants whose full view has discriminants specially.
6943
6944 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6945
6946 * gcc-interface/utils.c: Include diagnostic.h.
6947 (gnat_write_global_declarations): Output debug information for all
6948 global type declarations before finalizing the compilation unit.
6949 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6950
6951 2011-05-25 Jakub Jelinek <jakub@redhat.com>
6952
6953 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6954
6955 2011-05-25 Kai Tietz <ktietz@redhat.com>
6956
6957 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6958 initialization instead of const/none-const pointer assignment.
6959
6960 2011-05-24 Joseph Myers <joseph@codesourcery.com>
6961
6962 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6963 $(EXTRA_GNAT1_OBJS).
6964 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6965 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6966 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6967 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6968 libcommon-target.a instead of prefix.o.
6969
6970 2011-05-21 Joseph Myers <joseph@codesourcery.com>
6971
6972 PR ada/49097
6973 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6974
6975 2011-05-20 Joseph Myers <joseph@codesourcery.com>
6976
6977 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6978 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6979 instead of version.o.
6980
6981 2011-05-18 Kai Tietz <ktietz@redhat.com>
6982
6983 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6984 boolean_false_node instead of integer_zero_node.
6985 (convert_with_check): Likewise.
6986 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6987
6988 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6989
6990 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6991 type of the parameter is an unconstrained array, convert the actual to
6992 the type of the formal in the In Out and Out cases as well.
6993
6994 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6995
6996 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6997 call build_function_type_array or build_varargs_function_type_array
6998 instead.
6999 (create_subprog_type): Don't call build_function_type; call
7000 build_function_type_vec instead.
7001
7002 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
7003
7004 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
7005 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
7006 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
7007
7008 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
7009
7010 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
7011
7012 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
7013 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
7014
7015 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7016
7017 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
7018
7019 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7020
7021 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
7022 instead of accessing TYPE_ARG_TYPES directly.
7023 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
7024
7025 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7026
7027 PR ada/48844
7028 * gcc-interface/gigi.h (get_variant_part): Declare.
7029 * gcc-interface/decl.c (get_variant_part): Make global.
7030 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
7031 types have the same constant size, are record types and T1 has a
7032 variant part while T2 doesn't.
7033
7034 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
7035
7036 * gcc-interface/utils.c (begin_subprog_body): Do not call
7037 get_pending_sizes.
7038 (end_subprog_body): Likewise.
7039
7040 2011-05-04 Richard Guenther <rguenther@suse.de>
7041
7042 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
7043 int_const_binop.
7044 (pos_to_constructor): Likewise.
7045
7046 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
7047 Eric Botcazou <ebotcazou@adacore.com>
7048
7049 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
7050 of build_function_type. Adjust calls to...
7051 (build_raise_check): ...this. Do not take a void_tree parameter.
7052 Call build_function_type_list instead of build_function_type.
7053 Fix head comment and swap couple of conditional blocks.
7054
7055 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
7056
7057 * gnatvsn.ads (Library_Version): Bump to 4.7.
7058 (Current_Year): Bump to 2011.
7059
7060 2011-04-29 Michael Matz <matz@suse.de>
7061
7062 * gcc-interface/misc.c (gnat_handle_option): Set
7063 warn_maybe_uninitialized.
7064
7065 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
7066
7067 * gnat_ugn.texi (Complexity Metrics Control): Update link to
7068 the Watson/McCabe paper.
7069
7070 2011-04-23 Jim Meyering <meyering@redhat.com>
7071
7072 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
7073
7074 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7075
7076 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
7077 onto the new type.
7078
7079 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
7080
7081 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
7082 parameter.
7083 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
7084 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
7085 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
7086 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
7087 <all>: Do not set flags on the reused DECL node coming from an alias.
7088 Set DECL_IGNORED_P on the DECL node built for subprograms if they
7089 don't need debug info here...
7090 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
7091 (gigi): Adjust calls to create_subprog_decl.
7092 (build_raise_check): Likewise.
7093 (establish_gnat_vms_condition_handler): Likewise.
7094 (Compilation_Unit_to_gnu): Likewise.
7095 (gnat_to_gnu): Likewise.
7096
7097 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
7098
7099 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
7100 (NO_REORDER_ADAFLAGS): New variable.
7101 (EXTRA_GNATTOOLS): Always define.
7102 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
7103 Clean up and adjust list of files compiled with special options.
7104 * gcc-interface/Make-lang.in: Likewise.
7105 (ada/decl.o): Cosmetical change.
7106 (ada/misc.o): Remove dependency on $(PLUGIN_H).
7107
7108 2011-04-20 Jim Meyering <meyering@redhat.com>
7109
7110 * initialize.c (__gnat_initialize): Remove useless if-before-free.
7111
7112 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7113
7114 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
7115 $(CFLAGS) on the link line.
7116
7117 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
7118
7119 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
7120 padded type built for the return type if it is unconstrained.
7121
7122 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
7123
7124 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
7125
7126 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
7127
7128 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
7129 before calling TREE_CHAIN.
7130 * gcc-interface/misc.c (gnat_init_ts): New function.
7131 (LANG_HOOKS_INIT_TS): Define.
7132
7133 2011-04-12 Martin Jambor <mjambor@suse.cz>
7134
7135 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
7136 instead of cgraph_node.
7137
7138 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7139
7140 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
7141 alignment on fields of the RETURN type built for the Copy-In Copy-Out
7142 mechanism.
7143
7144 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
7145
7146 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
7147 of aggregate types that contain a placeholder.
7148
7149 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
7150
7151 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
7152 TYPE_ARG_TYPES.
7153 (handle_type_generic_attribute): Likewise.
7154
7155 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
7156
7157 PR ada/47163
7158 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
7159
7160 2011-04-04 Kai Tietz <ktietz@redhat.com>
7161
7162 PR ada/47163
7163 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
7164 to flag value.
7165
7166 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7167
7168 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
7169 type case, do not strip a padding type around the array type.
7170
7171 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7172
7173 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
7174 types.
7175
7176 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7177
7178 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
7179 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
7180 code for -feliminate-unused-debug-types.
7181 (gnat_post_options): Likewise.
7182
7183 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7184
7185 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7186 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
7187 distinct copy.
7188
7189 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7190
7191 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
7192 DECL_ARTIFICIAL flag on enumeration types.
7193
7194 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7195
7196 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
7197 fat pointer types artificial unconditionally.
7198 <E_Array_Subtype>: Attach the base array type as a parallel type if it
7199 isn't artificial.
7200
7201 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7202
7203 * gcc-interface/gigi.h (get_dummy_type): Declare.
7204 (build_dummy_unc_pointer_types): Likewise.
7205 (finish_fat_pointer_type): Likewise.
7206 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
7207 fat pointer type has been built, complete it in place.
7208 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
7209 and thin pointers. Remove useless variable.
7210 (finish_fat_pointer_type): Make global and move to...
7211 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
7212 (get_dummy_type): New function.
7213 (build_dummy_unc_pointer_types): Likewise.
7214 (gnat_pushdecl): Propage the name to the anonymous variants only.
7215 (update_pointer_to): Only adjust the pointer types in the unconstrained
7216 array case.
7217
7218 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7219
7220 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
7221 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
7222 if this is a Taft amendment type and the full declaration is available.
7223 * gcc-interface/trans.c (process_type): Likewise.
7224 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
7225 (process_freeze_entity): Likewise.
7226 * gcc-interface/utils.c (dummy_global): New static variable.
7227 (gnat_write_global_declarations): If there are types declared as used
7228 at the global level, insert them in the global hash table.
7229
7230 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7231
7232 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
7233 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
7234 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
7235 copy.
7236 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
7237 flag of the type accordingly.
7238 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
7239
7240 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
7241
7242 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7243 finalizing types when updating the pointers to the designated type.
7244 <all>: Finalize the deferred types even if we didn't defer processing
7245 of incomplete types in this invocation.
7246
7247 2011-04-01 Olivier Hainque <hainque@adacore.com>
7248 Nicolas Setton <setton@adacore.com>
7249 Eric Botcazou <ebotcazou@adacore.com>
7250
7251 * gcc-interface/misc.c (gnat_descriptive_type): New function.
7252 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
7253
7254 2011-03-28 Kai Tietz <ktietz@redhat.com>
7255
7256 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
7257 Windows targets.
7258 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
7259 * system-mingw.ads (System): Change ZCX_By_Default default to True.
7260
7261 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
7262
7263 2011-03-28 Tristan Gingold <gingold@adacore.com>
7264
7265 PR ada/44431
7266 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
7267 Use ada output of gnatbind.
7268 (ada/b_gnatb.adb): Ditto.
7269 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
7270 (ada.mostlyclean, ada.stage1)
7271 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
7272 (ada.stagefeedback): Adjust.
7273 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
7274 Use ada output of gnatbind.
7275 (b_gnatm.adb): Ditto.
7276 (b_gnatl.o, b_gnatm.o): New rules.
7277
7278 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7279
7280 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7281 for the padded type built to support a specified size or alignment.
7282
7283 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7284
7285 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
7286 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
7287 unconditionally to the end of the unit when the designated type is
7288 limited_with'ed.
7289 <all>: Rename local variable. Attempt to un-defer types only and do it
7290 for limited_with'ed types as well.
7291 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
7292 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
7293 consistently and remove redundant call to finalize_from_with_types.
7294
7295 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
7296
7297 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
7298 subprograms without a previous spec declared in the same unit.
7299 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
7300 subprograms at the end of the unit instead of at the beginning.
7301 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
7302 isn't public for the special handling of non-inline functions nested
7303 inside inline external functions.
7304
7305 2011-03-25 Jeff Law <law@redhat.com>
7306
7307 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
7308
7309 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7310
7311 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
7312 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
7313 to compute Set_Size_Depends_On_Discriminant.
7314 (Layout_Type): Call it on array types in back-end layout mode.
7315 * sem_util.adb (Requires_Transient_Scope): Return true for array
7316 types only if the size depends on the value of discriminants.
7317 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
7318 type if the RHS is a call to a function that returns an unconstrained
7319 type with default discriminant.
7320
7321 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
7322
7323 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
7324 non-conversion to the nominal result type at the end.
7325
7326 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7327
7328 * gcc-interface/trans.c (create_temporary): New function taken from...
7329 (create_init_temporary): ...here. Call it.
7330 (call_to_gnu): Create the temporary for the return value early, if any.
7331 Create it for a function with copy-in/copy-out parameters if there is
7332 no target; in other cases of copy-in/copy-out, use another temporary.
7333 Push the new binding level lazily. Add and rename local variables.
7334
7335 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7336
7337 * gcc-interface/decl.c (validate_size): Improve comments and tweak
7338 error message.
7339 (set_rm_size): Likewise.
7340
7341 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7342
7343 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7344 for the padded type built in order to support a specified alignment.
7345 Fix incorrect formatting.
7346
7347 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7348
7349 PR bootstrap/48216
7350 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
7351
7352 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7353
7354 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
7355 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
7356 to the end of the list. Adjust recursive call. Rename local variable.
7357 If REORDER is true, reorder components of the record type.
7358 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
7359 components_to_record and adjust the parameter list.
7360
7361 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7362
7363 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
7364 disabled, use the variable for bounds of loop iteration scheme.
7365
7366 2011-03-21 Kai Tietz <ktietz@redhat.com>
7367
7368 PR target/12171
7369 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
7370
7371 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7372
7373 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
7374 out whether the expression is read-only. Short-circuit placeholder
7375 case and rename a couple of local variables.
7376
7377 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7378
7379 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
7380 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
7381 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
7382 (convert): Deal with conversions from a smaller form type specially.
7383
7384 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
7385
7386 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
7387 its argument, except for the special -I- switch.
7388
7389 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
7390
7391 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
7392 "Ada Issues".
7393
7394 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
7395
7396 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7397
7398 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
7399
7400 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7401 GNAT_FORMAL.
7402 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7403 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
7404 instead of GNAT_FORMAL. Protect the expression against multiple uses.
7405 Do not generate the check directly, instead instantiate the template
7406 check present in the descriptor.
7407 (make_descriptor_field): Move around.
7408 (build_vms_descriptor32): Build a template check in the POINTER field.
7409 (build_vms_descriptor): Remove useless suffixes.
7410 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7411
7412 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
7413
7414 PR bootstrap/47467
7415 * targext.c: Include target files if IN_RTS is defined.
7416
7417 2011-01-26 Richard Guenther <rguenther@suse.de>
7418
7419 PR bootstrap/47467
7420 * targext.c: Include config.h.
7421 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7422 dependency.
7423
7424 2011-01-04 Pascal Obry <obry@adacore.com>
7425 Eric Botcazou <ebotcazou@adacore.com>
7426
7427 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7428
7429 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7430
7431 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7432 end-of-case on the end label and its associated gotos, if any.
7433
7434 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7435
7436 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7437 expressions of the parameter cache within the statement group of
7438 the CICO mechanism.
7439
7440 2011-01-04 Olivier Hainque <hainque@adacore.com>
7441 Eric Botcazou <ebotcazou@adacore.com>
7442
7443 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7444 (set_end_locus_from_node): New function.
7445 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7446 make and the function end_locus.
7447 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7448 for the elaboration subprogram.
7449 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7450 set the end_locus of the expression as well.
7451
7452 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7453
7454 PR ada/47131
7455 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7456 variables that are referenced in exception handlers volatile.
7457
7458
7459 \f
7460 Copyright (C) 2011 Free Software Foundation, Inc.
7461
7462 Copying and distribution of this file, with or without modification,
7463 are permitted in any medium without royalty provided the copyright
7464 notice and this notice are preserved.
7465
7466 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7467 - fix bugs in the description of Source_Trace;
7468 - get rid of UNIT_NAME;
7469
7470 2011-08-02 Javier Miranda <miranda@adacore.com>
7471
7472 * exp_ch9.adb
7473 (Build_Dispatching_Requeue): Adding support for VM targets
7474 since we cannot directly reference the Tag entity.
7475 * exp_sel.adb (Build_K): Adding support for VM targets.
7476 (Build_S_Assignment): Adding support for VM targets.
7477 * exp_disp.adb
7478 (Default_Prim_Op_Position): In VM targets do not restrict availability
7479 of predefined interface primitives to compiling in Ada 2005 mode.
7480 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7481 restricted to compiling in Ada 2005 mode.
7482 (Make_VM_TSD): Generate code that declares and initializes the OSD
7483 record. Needed to support dispatching calls through synchronized
7484 interfaces.
7485 * exp_ch3.adb
7486 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7487 primitives associated with synchronized interfaces.
7488 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7489 primitives associated with synchronized interfaces.
7490
7491 2011-08-02 Yannick Moy <moy@adacore.com>
7492
7493 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7494 statements hidden in SPARK if preceded by the HIDE directive
7495 (Parse_Exception_Handlers): mark each exception handler in a sequence of
7496 exception handlers as hidden in SPARK if preceded by the HIDE directive
7497 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7498 if starting with the HIDE directive
7499 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7500 starting with the HIDE directive; mark the declarations in a private
7501 part as hidden in SPARK if the private part starts with the HIDE
7502 directive
7503 * restrict.adb, restrict.ads
7504 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7505 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7506 argument node belongs to a part which is hidden in SPARK
7507 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7508 parts in SPARK; protect the possibly costly call to
7509 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7510 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7511 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7512 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7513 Tok_SPARK_Hide.
7514 (Scan): recognize special comment starting with '#' and followed by
7515 SPARK keyword "hide" as a HIDE directive.
7516
7517 2011-08-02 Yannick Moy <moy@adacore.com>
7518
7519 * types.ads, erroutc.ads: Minor reformatting.
7520
7521 2011-08-02 Vincent Celier <celier@adacore.com>
7522
7523 * link.c: Add response file support for cross platforms.
7524
7525 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7526
7527 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7528 in an association, set parent field of copy before partial analysis.
7529 * sem_res.adb (Resolve_Slice): create reference to itype only when
7530 expansion is enabled.
7531
7532 2011-08-02 Yannick Moy <moy@adacore.com>
7533
7534 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7535 for new flag denoting which subprogram bodies are in ALFA
7536 * restrict.adb, sem_ch7.adb: Update comment
7537 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7538 sem_ch9.adb, sem_res.adb: Add calls to
7539 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7540 * sem_ch6.adb (Analyze_Function_Return): add calls to
7541 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7542 middle of the body, and extended return.
7543 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7544 False when missing return.
7545 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7546 to True for subprograms whose spec is in ALFA. Remove later on the flag
7547 on the entity used for a subprogram body when there exists a separate
7548 declaration.
7549 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7550 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7551 False, otherwise do nothing.
7552
7553 2011-08-02 Robert Dewar <dewar@adacore.com>
7554
7555 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7556
7557 2011-08-02 Yannick Moy <moy@adacore.com>
7558
7559 * sem_ch4.ads: minor formatting.
7560
7561 2011-08-02 Yannick Moy <moy@adacore.com>
7562
7563 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7564 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7565 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7566 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7567 opt.ads: cleanup of SPARK mode
7568
7569 2011-08-02 Yannick Moy <moy@adacore.com>
7570
7571 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7572 types.
7573 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7574 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7575 * sem_ch3.adb
7576 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7577 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7578 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7579 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7580 types.
7581 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7582 non-static range.
7583 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7584 functions whose return type is not in ALFA.
7585 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7586 specifications.
7587 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7588 parameter's type is not in ALFA.
7589 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7590 types are in ALFA.
7591
7592 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7593
7594 * sem_ch6 (Analyze_Expression_Function): treat the function as
7595 Inline_Always, and introduce a subprogram declaration for it when it is
7596 not a completion.
7597 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7598 expression functions, so that the back-end can determine whether they
7599 can in fact be inlined.
7600 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7601 a function body comes from an expression function.
7602
7603 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7604
7605 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7606 null exclusions to test Can_Never_Be_Null on the anonymous access types
7607 of the formals rather than testing the formals themselves. Exclude this
7608 check in cases where the Old_Formal is marked as a controlling formal,
7609 to avoid issuing spurious errors for bodies completing dispatching
7610 operations (due to the flag not getting set on controlling access
7611 formals in body specs).
7612 (Find_Corresponding_Spec): When checking full and subtype conformance of
7613 subprogram bodies in instances, pass Designated and E in that order, for
7614 consistency with the expected order of the formals (New_Id followed by
7615 Old_Id).
7616
7617 2011-08-02 Robert Dewar <dewar@adacore.com>
7618
7619 * sem_ch8.adb: Minor reformatting.
7620
7621 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7622
7623 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7624 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7625 primitive operations of class-wide actuals.
7626
7627 2011-08-02 Javier Miranda <miranda@adacore.com>
7628
7629 * exp_atag.ads, exp_atag.adb
7630 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7631 since its value is implicitly passed in argument Typ.
7632 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7633 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7634 Build_Common_Dispatching_Select_Statements.
7635
7636 2011-08-02 Robert Dewar <dewar@adacore.com>
7637
7638 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7639 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7640 Minor reformatting.
7641
7642 2011-08-02 Robert Dewar <dewar@adacore.com>
7643
7644 * sem_res.adb: Minor reformatting.
7645 * sem_prag.adb: Minor reformatting.
7646
7647 2011-08-02 Javier Miranda <miranda@adacore.com>
7648
7649 * exp_atag.adb, exp_atags.ads
7650 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7651 by the tagged type Entity. Required to use this routine in the VM
7652 targets since we do not have available the Tag entity in the VM
7653 platforms.
7654 * exp_ch6.adb
7655 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7656 Ada.Tags has not been previously loaded.
7657 * exp_ch7.adb
7658 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7659 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7660 * sem_aux.adb
7661 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7662 view of enclosing scopes. Required to handle enclosing scopes that
7663 are synchronized types whose full view is a task type.
7664 * exp_disp.adb
7665 (Build_VM_TSDs): Minor code improvement to avoid generating and
7666 analyzing lists with empty nodes.
7667 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7668 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7669 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7670 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7671 (Make_Select_Specific_Data_Table): Add support for VM targets.
7672 (Make_VM_TSD): Generate code to initialize the SSD structure of
7673 the TSD.
7674
7675 2011-08-02 Yannick Moy <moy@adacore.com>
7676
7677 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7678 cross-references section in ALI.
7679 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7680 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7681 Sub).
7682 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7683 subprogram or package entity of a node
7684 (Is_Local_Reference_Type): new function returns True for references
7685 selected in local cross-references.
7686 (Lt): function extracted from Lt in Output_References
7687 (Write_Entity_Name): function extracted from Output_References
7688 (Generate_Definition): generate reference with type 'D' for definition
7689 of objects (object declaration and parameter specification), with
7690 appropriate locations and units, for use in local cross-references.
7691 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7692 references of type 'I' for initialization in object definition.
7693 (Output_References): move part of function Lt and procedure
7694 Write_Entity_Name outside of the body. Ignore references of types 'D'
7695 and 'I' introduced for local cross-references.
7696 (Output_Local_References): new procedure to output the local
7697 cross-references sections.
7698 (Lref_Entity_Status): new array defining whether an entity is a local
7699 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7700 with 'I' type when initialization expression is present.
7701 * get_scos.adb, get_scos.ads: Correct comments and typos
7702
7703 2011-08-02 Javier Miranda <miranda@adacore.com>
7704
7705 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7706 the JVM target.
7707 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7708 the JVM target.
7709 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7710 TSD support.
7711
7712 2011-08-02 Vincent Celier <celier@adacore.com>
7713
7714 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7715 (No_Space_Img): New function
7716 (Find_Excluded_Sources): When reading from a file, record the file name
7717 and the line number for each excluded source.
7718 (Mark_Excluded_Sources): When reporting an error, if the excluded
7719 sources were read from a file, include file name and line number in
7720 the error message.
7721
7722 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7723
7724 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7725
7726 2011-08-02 Robert Dewar <dewar@adacore.com>
7727
7728 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7729
7730 2011-08-02 Javier Miranda <miranda@adacore.com>
7731
7732 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7733 generation of TSDs to the DOTNET compiler.
7734 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7735 generation of TSDs to the DOTNET compiler.
7736
7737 2011-08-02 Javier Miranda <miranda@adacore.com>
7738
7739 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7740 record of all the tagged types declared inside library level package
7741 declarations, library level package bodies or library level subprograms.
7742 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7743 associated with a given tagged type.
7744 (Build_VM_TSDs): New subprogram.
7745 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7746 compilation units that are subprograms.
7747 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7748 compilation units that are package bodies.
7749 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7750 units that are a package declaration or a package instantiation.
7751 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7752 reorganization to improve the error generated by the frontend when the
7753 function Ada.Tags.Secondary_Tag is not available.
7754 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7755 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7756
7757 2011-08-02 Javier Miranda <miranda@adacore.com>
7758
7759 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7760
7761 2011-08-02 Robert Dewar <dewar@adacore.com>
7762
7763 * s-imenne.ads: Minor reformatting.
7764
7765 2011-08-02 Robert Dewar <dewar@adacore.com>
7766
7767 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7768 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7769 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7770
7771 2011-08-02 Robert Dewar <dewar@adacore.com>
7772
7773 * einfo.ads (Materialize_Entity): Document this is only for renamings
7774 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7775 required debug information in the case where we transform the object
7776 declaration into a renaming declaration.
7777 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7778 object
7779 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7780 Materialize_Entity.
7781
7782 2011-08-02 Robert Dewar <dewar@adacore.com>
7783
7784 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7785 Suppress_Init_Procs.
7786 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7787 Suppress_Initialization/Initialization_Suppressed.
7788 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7789 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7790 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7791 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7792
7793 2011-08-02 Robert Dewar <dewar@adacore.com>
7794
7795 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7796 Minor reformatting.
7797
7798 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7799
7800 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7801 only have inheritable classwide pre/postconditions.
7802
7803 2011-08-02 Javier Miranda <miranda@adacore.com>
7804
7805 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7806 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7807 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7808 checks if the external tag of a type is the same as the external tag
7809 of some other declaration.
7810
7811 2011-08-02 Thomas Quinot <quinot@adacore.com>
7812
7813 * s-taskin.ads: Minor reformatting.
7814
7815 2011-08-02 Emmanuel Briot <briot@adacore.com>
7816
7817 * g-comlin.adb (Display_Help): swap the order in which it prints the
7818 short help and the general usage.
7819
7820 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7821
7822 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7823 the aspect declarations and attach them to the generic copy for
7824 subsequent analysis.
7825 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7826 declarations of the generic tree to the new subprogram declarations.
7827 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7828 conditions that apply to a subprogram instance.
7829
7830 2011-08-02 Robert Dewar <dewar@adacore.com>
7831
7832 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7833
7834 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7835
7836 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7837 private type with a tagged full view is not derived in the immediate
7838 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7839
7840 2011-08-02 Robert Dewar <dewar@adacore.com>
7841
7842 * exp_ch4.adb: Minor reformatting.
7843
7844 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7845
7846 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7847 Ada2012 iterator, the loop will be rewritten during expansion into a
7848 while loop with a cursor and an element declaration. Do not analyze the
7849 body in this case, because if the container is for indefinite types the
7850 actual subtype of the elements will only be determined when the cursor
7851 declaration is analyzed.
7852
7853 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7854
7855 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7856 size/alignment related attributes in CodePeer_Mode.
7857
7858 2011-08-02 Gary Dismukes <dismukes@adacore.com>
7859
7860 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7861 Prepend_Element, since this can result in the operation getting the
7862 wrong slot in the full type's dispatch table if the full type has
7863 inherited operations. The incomplete type's operation will get added
7864 to the proper position in the full type's primitives
7865 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7866 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7867 dispatching operations, since there are cases where nonprimitive
7868 subprograms can get added to the list of incomplete dependents (such
7869 as subprograms in nested packages).
7870 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7871 private part when determining whether to add a primitive with a
7872 parameter of a tagged incomplete type to the Private_Dependents list.
7873 Such primitives can also occur in the visible part, and should not have
7874 been excluded from being private dependents.
7875 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7876 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7877 list of a Taft-amendment incomplete type is a primitive before issuing
7878 an error that the full type must appear in the same unit. There are
7879 cases where nonprimitives can be in the list (such as subprograms in
7880 nested packages).
7881 * sem_disp.adb (Derives_From): Use correct condition for checking that
7882 a formal's type is derived from the type of the corresponding formal in
7883 the parent subprogram (the condition was completely wrong). Add
7884 checking that was missing for controlling result types being derived
7885 from the result type of the parent operation.
7886
7887 2011-08-02 Yannick Moy <moy@adacore.com>
7888
7889 * errout.adb (First_Node): minor renaming
7890 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7891 first node.
7892
7893 2011-08-02 Yannick Moy <moy@adacore.com>
7894
7895 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7896 before accessing operands.
7897 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7898 decide whether an initialization expression respects SPARK rules, as
7899 the plain node is the expanded one. This allows for more valid warnings
7900 to be issued.
7901 * gnat_rm.texi: Minor update.
7902
7903 2011-08-02 Arnaud Charlet <charlet@adacore.com>
7904
7905 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7906 previous change.
7907
7908 2011-08-02 Robert Dewar <dewar@adacore.com>
7909
7910 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7911
7912 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7913
7914 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7915 loop statements and the element renaming declaration with a block when
7916 the element type is controlled.
7917
7918 2011-08-02 Yannick Moy <moy@adacore.com>
7919
7920 * sinfo.ads: Minor formatting.
7921
7922 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7923
7924 * sem_aggr.adb (Add_Association): if the association has a box and no
7925 expression, use the Sloc of the aggregate itself for the new
7926 association.
7927 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7928 the Original_Node.
7929
7930 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7931
7932 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7933 When a container is provided via a function call, generate a renaming
7934 of the function result. This avoids the creation of a transient scope
7935 and the premature finalization of the container.
7936 * exp_ch7.adb (Is_Container_Cursor): Removed.
7937 (Wrap_Transient_Declaration): Remove the supression of the finalization
7938 of the list controller when the declaration denotes a container cursor,
7939 it is not needed.
7940
7941 2011-08-02 Yannick Moy <moy@adacore.com>
7942
7943 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7944 node is from source, instead of the original node being from source.
7945 * sem_aggr.adb
7946 (Resolve_Array_Aggregate): refine the check for a static expression, to
7947 recognize also static ranges
7948 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7949 Array_Type_Declaration): postpone the test for the type being a subtype
7950 mark after the type has been resolved, so that component-selection and
7951 expanded-name are discriminated.
7952 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7953 to distinguish the case of an iteration scheme, so that an error is
7954 issed on a non-static range in SPARK except in an iteration scheme.
7955 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7956 In_Iter_Schm = True.
7957 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7958 user-defined operators so that they are allowed in renaming
7959 * sem_ch8.adb
7960 (Find_Selected_Component): refine the check for prefixing of operators
7961 so that they are allowed in renaming. Move the checks for restrictions
7962 on selector name after analysis discriminated between
7963 component-selection and expanded-name.
7964 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7965 concatenation argument of string type if it is static.
7966 * sem_util.adb, sem_util.ads
7967 (Check_Later_Vs_Basic_Declarations): add a new function
7968 Is_Later_Declarative_Item to decice which declarations are allowed as
7969 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7970 mode, add that renamings are considered as later items.
7971 (Enclosing_Package): new function to return the enclosing package
7972 (Enter_Name): correct the rule for homonyms in SPARK
7973 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7974 from source (result of expansion) to avoid issuing wrong warnings.
7975
7976 2011-08-02 Ed Schonberg <schonberg@adacore.com>
7977
7978 * errout.adb: On anything but an expression First_Node returns its
7979 argument.
7980
7981 2011-08-02 Pascal Obry <obry@adacore.com>
7982
7983 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7984
7985 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7986
7987 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7988 Set the associated loop as the related expression of internally
7989 generated cursors.
7990 * exp_ch7.adb (Is_Container_Cursor): New routine.
7991 (Wrap_Transient_Declaration): Supress the finalization of the list
7992 controller when the declaration denotes a container cursor.
7993
7994 2011-08-02 Yannick Moy <moy@adacore.com>
7995
7996 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7997 command line now.
7998 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7999 expression is a simple expression. This check cannot be performed in
8000 the semantics, so just drop it.
8001 (P_Index_Or_Discriminant_Constraint): move check that the index or
8002 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
8003 semantics. Other cases were previously checked in the semantics.
8004 * par-ch4.adb (P_Name): move checks that a selector name is not
8005 character literal or an operator symbol to Find_Selected_Component in
8006 the semantics
8007 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
8008 declarations are not placed after later declarations in a separate
8009 procedure in Sem_Util (possibly not the best choice?), to be used both
8010 during parsing, for Ada 83 mode, and during semantic analysis, for
8011 SPARK mode.
8012 * par-endh.adb (Check_End): move check that end label is not missing
8013 to Process_End_Label in the semantics
8014 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
8015 the special case for SPARK restriction
8016 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
8017 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
8018 parameter Force to issue the error message even on internal node (used
8019 for generated end label). Call Check_Restriction to check when an error
8020 must be issued. In SPARK mode, issue an error message even if the
8021 restriction is not set.
8022 (Check_Restriction): new procedure with an additional out parameter to
8023 inform the caller that a message has been issued
8024 * sem_aggr.adb: Minor modification of message
8025 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
8026 instead of issuing an error message directly
8027 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
8028 declarations are not placed after later declarations, by calling
8029 Check_Later_Vs_Basic_Declarations
8030 (Analyze_Subtype_Declaration): move here the check that an index or
8031 discriminant constraint must be a subtype mark. Change the check that
8032 a subtype of String must start at one so that it works on subtype marks.
8033 * sem_ch4.adb (Analyze_Call): move here the check that a named
8034 association cannot follow a positional one in a call
8035 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
8036 instead of issuing an error message directly
8037 * sem_ch8.adb (Find_Selected_Component): move here the check that a
8038 selector name is not a character literal or an operator symbol. Move
8039 here the check that the prefix of an expanded name cannot be a
8040 subprogram or a loop statement.
8041 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
8042 procedure called from parsing and semantics to check that basic
8043 declarations are not placed after later declarations
8044 (Process_End_Label): move here the check that end label is not missing
8045
8046 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8047
8048 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
8049 representation clause in codepeer mode, since it confuses CodePeer and
8050 does not bring useful info.
8051
8052 2011-08-02 Ed Falis <falis@adacore.com>
8053
8054 * init.c: initialize fp hw on MILS.
8055
8056 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8057
8058 * errout.adb (First_Node): for bodies, return the node itself (small
8059 optimization). For other nodes, do not check source_unit if the node
8060 comes from Standard.
8061
8062 2011-08-02 Robert Dewar <dewar@adacore.com>
8063
8064 * exp_ch3.adb: Minor comment additions.
8065 * sem_ch13.adb: Minor reformatting.
8066
8067 2011-08-02 Pascal Obry <obry@adacore.com>
8068
8069 * make.adb, makeutl.adb: Removes some superfluous directory separator.
8070
8071 2011-08-02 Robert Dewar <dewar@adacore.com>
8072
8073 * sem_attr.adb: Minor reformatting.
8074
8075 2011-08-02 Robert Dewar <dewar@adacore.com>
8076
8077 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
8078 (Has_Default_Component_Value): Removed
8079 * einfo.ads Comment updates
8080 (Has_Default_Aspect): Replaces Has_Default_Value
8081 (Has_Default_Component_Value): Removed
8082 * exp_ch13.adb
8083 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
8084 * exp_ch3.adb
8085 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
8086 (Get_Simple_Init_Val): Handle Default_Value aspect
8087 (Needs_Simple_Initialization): Handle Default_Value aspect
8088 * exp_ch3.ads: Needs_Simple_Initialization
8089 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
8090 * par-prag.adb (Pragma_Default[_Component]Value) Removed
8091 * sem_ch13.adb
8092 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
8093 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
8094 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
8095
8096 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8097
8098 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
8099 package containing iteration primitives.
8100 exp_ch5.adb (Expand_Iterator_Loop): ditto.
8101
8102 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8103
8104 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
8105 "of", pre-analyze expression in case it is a function call with
8106 finalization actions that must be placed ahead of the loop.
8107 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
8108 on an Ada2012 iterator, insert them ahead of the rewritten loop.
8109
8110 2011-08-02 Geert Bosch <bosch@adacore.com>
8111
8112 * cstand.adb (Create_Float_Types): Only consider C's long double for
8113 Long_Long_Float, in addition to double.
8114
8115 2011-08-02 Robert Dewar <dewar@adacore.com>
8116
8117 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
8118 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
8119 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
8120 Minor reformatting.
8121
8122 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8123
8124 * sem_attr.adb: handle properly 'Result when it is a prefix of an
8125 indexed component.
8126
8127 2011-08-02 Javier Miranda <miranda@adacore.com>
8128
8129 * einfo.ads, einfo.adb
8130 (Original_Access_Type): Move this attribute to Node26 since there was
8131 an undocumented use of Node21 in E_Access_Subprogram_Type entities
8132 which causes conflicts and breaks the generation of the .NET compiler.
8133 (Interface_Name): Add missing documentation on JGNAT only uses of
8134 this attribute.
8135
8136 2011-08-02 Geert Bosch <bosch@adacore.com>
8137
8138 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
8139 (Find_Back_End_Float_Type): Likewise
8140 (Create_Back_End_Float_Types): Likewise
8141 (Create_Float_Types): Likewise
8142 (Register_Float_Type): Likewise
8143 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
8144 Nlist and split out type selection in new local Find_Base_Type function.
8145 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
8146 Nlist
8147 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
8148
8149 2011-08-02 Robert Dewar <dewar@adacore.com>
8150
8151 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
8152 alpha order).
8153 * opt.ads: Minor comment change.
8154 * sem_ch12.adb: Minor code reorganization.
8155
8156 2011-08-02 Gary Dismukes <dismukes@adacore.com>
8157
8158 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
8159 subtype's list of rep items to the list on the full subtype in the case
8160 where the lists are the same.
8161
8162 2011-08-02 Geert Bosch <bosch@adacore.com>
8163
8164 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
8165 using the one from System.Strings, which also deallocates all strings.
8166
8167 2011-08-02 Geert Bosch <bosch@adacore.com>
8168
8169 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
8170 function.
8171 * gcc-interface/Make-lang.in: Update dependencies.
8172
8173 2011-08-02 Olivier Hainque <hainque@adacore.com>
8174
8175 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
8176 end_locus.
8177
8178 2011-08-02 Javier Miranda <miranda@adacore.com>
8179
8180 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
8181 associated with anonymous access to subprograms.
8182
8183 2011-08-02 Geert Bosch <bosch@adacore.com>
8184
8185 * opt.ads
8186 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
8187 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
8188 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
8189 (Add_Symbol_Definition): Move to switch-c.adb
8190 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
8191 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
8192 (Add_Symbol_Definition): Move to switch-c.adb.
8193 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
8194 * sem_warn.adb
8195 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8196 Move to warnsw.adb.
8197 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
8198 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
8199 Move to warnsw.adb.
8200 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
8201 (Add_Symbol_Definition): Moved from Prepcomp.
8202 * switch-c.ads: Update copyright notice. Use String_List instead of
8203 Argument_List, removing dependency on System.OS_Lib.
8204
8205 2011-08-02 Yannick Moy <moy@adacore.com>
8206
8207 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
8208 mode on initialization expression which does not respect SPARK
8209 restrictions.
8210 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
8211 if the tree referenced by its argument represents an initialization
8212 expression in SPARK, suitable for initializing an object in an object
8213 declaration.
8214
8215 2011-08-02 Javier Miranda <miranda@adacore.com>
8216
8217 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
8218 internally generated access to subprogram with its associated protected
8219 subprogram type.
8220 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
8221
8222 2011-08-02 Geert Bosch <bosch@adacore.com>
8223
8224 * cstand.adb (Register_Float_Type): Print information about type to
8225 register, if the Debug_Flag_Dot_B is set.
8226 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
8227 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
8228 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
8229 with a requested precision of more than Max_Digits digits and no more
8230 than Max_Base_Digits digits, if a range specification is present and the
8231 Predefined_Float_Types list has a suitable type to derive from.
8232 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
8233 case of type completion with pragma Import
8234 * sem_prag.adb
8235 (Process_Import_Predefined_Type): Processing to complete a type
8236 with pragma Import. Currently supports floating point types only.
8237 (Set_Convention_From_Pragma): Do nothing without underlying type.
8238 (Process_Convention): Guard against absence of underlying type,
8239 which may happen when importing incomplete types.
8240 (Process_Import_Or_Interface): Handle case of importing predefined
8241 types. Tweak error message.
8242
8243 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8244
8245 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
8246 functions to previous change. Reorganize code slightly.
8247
8248 2011-08-02 Geert Bosch <bosch@adacore.com>
8249
8250 * back_end.ads (Register_Type_Proc): New call back procedure type for
8251 allowing the back end to provide information about available types.
8252 (Register_Back_End_Types): New procedure to register back end types.
8253 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
8254 available types.
8255 * cstand.adb (Back_End_Float_Types): New list for floating point types
8256 supported by the back end.
8257 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
8258 (Copy_Float_Type): New procedure to make new copies of predefined types.
8259 (Register_Float_Type): New call back procedure to populate the BEFT list
8260 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
8261 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
8262 (Create_Float_Types): New procedure to create entities for floating
8263 point types predefined in Standard, and put these and any remaining
8264 BEFTs on the Predefined_Float_Types list.
8265 * stand.ads (Predefined_Float_Types): New list for predefined floating
8266 point types that do not have declarations in package Standard.
8267
8268 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8269
8270 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
8271 entity node for the unit containing the parameter.
8272 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
8273 (Add_Inlined_Subprogram): Likewise.
8274 * gcc-interface/Make-lang.in: Update dependencies.
8275
8276 2011-08-02 Thomas Quinot <quinot@adacore.com>
8277
8278 * s-stusta.adb (Print): Make sure Pos is always initialized to a
8279 suitable value.
8280
8281 2011-08-02 Geert Bosch <bosch@adacore.com>
8282
8283 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
8284
8285 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8286
8287 * sem_type.adb (Covers): Move trivial case to the top and reuse the
8288 computed value of Base_Type.
8289
8290 2011-08-02 Yannick Moy <moy@adacore.com>
8291
8292 * restrict.adb (Check_Restriction): issue an error for any use of
8293 class-wide, even if the No_Dispatch restriction is not set.
8294 * sem_aggr.adb: Correct typos in comments and messages in formal mode
8295 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
8296 when completing a private extension, the type named in the private part
8297 is not the same as that named in the visible part.
8298 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
8299 of an inherited primitive operations of a tagged type or type extension
8300 that returns the tagged type.
8301 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
8302 function which returns True for an implicit operation inherited by the
8303 derived type declaration for the argument type.
8304 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
8305 order.
8306
8307 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8308
8309 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
8310 Process_Bounds, to perform analysis with expansion of a range or an
8311 expression that is the iteration scheme for a loop.
8312 (Analyze_Iterator_Specification): If domain of iteration is given by a
8313 function call with a controlled result, as is the case if call returns
8314 a predefined container, ensure that finalization actions are properly
8315 generated.
8316 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
8317
8318 2011-08-02 Javier Miranda <miranda@adacore.com>
8319
8320 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
8321 * gcc-interface/Make-lang.in: Update dependencies.
8322
8323 2011-08-02 Javier Miranda <miranda@adacore.com>
8324
8325 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
8326 determine if the analysis is performed using N or Original_Node (N).
8327 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
8328 functionality of routine Is_Variable avoids code duplication.
8329 * checks.adb (Determine_Range): Handle temporaries generated by
8330 Remove_Side_Effects.
8331
8332 2011-08-02 Javier Miranda <miranda@adacore.com>
8333
8334 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
8335 expansion of the condition. Required since the previous analysis was
8336 done with expansion disabled (see Resolve_Quantified_Expression) and
8337 hence checks were not inserted and record comparisons have not been
8338 expanded.
8339
8340 2011-08-02 Ed Falis <falis@adacore.com>
8341
8342 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8343 Update header.
8344
8345 2011-08-02 Bob Duff <duff@adacore.com>
8346
8347 * opt.ads: Minor comment fix.
8348
8349 2011-08-02 Bob Duff <duff@adacore.com>
8350
8351 * sem_ch12.adb (Analyze_Package_Instantiation,
8352 Analyze_Subprogram_Instantiation): Turn off style checking while
8353 analyzing an instance. Whatever style checks that apply to the generic
8354 unit should apply, so it makes no sense to apply them in an instance.
8355 This was causing trouble when compiling an instance of a runtime
8356 unit that violates the -gnatyO switch.
8357 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8358 one of the two case statements, causing spurious errors.
8359
8360 2011-08-02 Robert Dewar <dewar@adacore.com>
8361
8362 * uname.adb: Minor reformatting.
8363 * gnatcmd.adb: Minor reformatting.
8364 * exp_attr.adb: Minor reformatting.
8365
8366 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8367
8368 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8369 No_Dispatching_Calls, do not look for the Assign primitive, because
8370 predefined primitives are not created in this case.
8371
8372 2011-08-02 Bob Duff <duff@adacore.com>
8373
8374 * stylesw.ads: Minor comment fixes.
8375
8376 2011-08-02 Robert Dewar <dewar@adacore.com>
8377
8378 * freeze.adb (Add_To_Result): New procedure.
8379
8380 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8381
8382 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8383 time, if the specific run-time routines for handling streams of strings
8384 are not available, use the default mechanism.
8385
8386 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8387
8388 * s-regpat.ads: Fix typo.
8389
8390 2011-08-02 Vincent Celier <celier@adacore.com>
8391
8392 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8393 not null, call it to create the in memory config project file without
8394 parsing an existing default config project file.
8395
8396 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8397
8398 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8399
8400 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8401
8402 * sem_elim.adb: an abstract subprogram does not need an eliminate
8403 pragma for its descendant to be eliminable.
8404
8405 2011-08-02 Ed Falis <falis@adacore.com>
8406
8407 * init.c: revert to handling before previous checkin for VxWorks
8408 * s-intman-vxworks.adb: delete unnecessary declarations related to
8409 using Ada interrupt facilities for handling signals.
8410 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8411 * s-intman-vxworks.ads: Import __gnat_install_handler as
8412 Initialize_Interrupts.
8413 * s-taprop-vxworks.adb: Delete Signal_Mask.
8414 (Abort_Handler): change construction of mask to unblock exception
8415 signals.
8416
8417 2011-08-02 Jerome Guitton <guitton@adacore.com>
8418
8419 * a-except-2005.adb (Raise_From_Signal_Handler): Call
8420 Debug_Raise_Exception before propagation starts.
8421
8422 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8423
8424 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8425 to Restriction_Check_Required.
8426 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8427 * sem_res.adb (Resolve_Call): Likewise.
8428 * sem_attr.adb (Check_Stream_Attribute): Likewise.
8429
8430 2011-08-02 Bob Duff <duff@adacore.com>
8431
8432 * stylesw.ads: Update comment.
8433 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8434 * errout.ads: Remove obsolete comment.
8435
8436 2011-08-02 Javier Miranda <miranda@adacore.com>
8437
8438 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8439 (Set_Is_Safe_To_Reevaluate): new procedure.
8440 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8441 assignment is allowed on safe-to-reevaluate variables.
8442 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8443 temporary created to remove side effects in expressions that use
8444 the secondary stack as safe-to-reevaluate.
8445 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8446 variables that are not true constants.
8447
8448 2011-08-02 Robert Dewar <dewar@adacore.com>
8449
8450 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8451 sem_res.adb, sem_ch6.adb: Minor reformatting.
8452
8453 2011-08-02 Jerome Guitton <guitton@adacore.com>
8454
8455 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8456
8457 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8458
8459 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8460 not set Overridden_Operation if subprogram is an initialization
8461 procedure.
8462
8463 2011-08-02 Yannick Moy <moy@adacore.com>
8464
8465 * par-ch6.adb: Correct obsolete name in comments
8466 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8467 which takes two message arguments (existing function takes one), with
8468 second message used for continuation.
8469 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8470 block statements that originate from a source block statement, not
8471 generated block statements
8472 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8473 symmetry with procedure case
8474 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8475 function to issue an error in formal mode if a package specification
8476 contains more than one tagged type or type extension.
8477 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8478 parameters matching formals of tagged types are objects (or ancestor
8479 type conversions of objects), not general expressions. Issue an error
8480 on view conversions that are not involving ancestor conversion of an
8481 extended type.
8482 (Resolve_Type_Conversion): in formal mode, issue an error on the
8483 operand of an ancestor type conversion which is not an object
8484 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8485 procedure so that it works also for actuals of function calls
8486 (Is_Actual_Tagged_Parameter): new function which determines if its
8487 argument is an actual parameter of a formal of tagged type in a
8488 subprogram call
8489 (Is_SPARK_Object_Reference): new function which determines if the tree
8490 referenced by its argument represents an object in SPARK
8491
8492 2011-08-02 Robert Dewar <dewar@adacore.com>
8493
8494 * sem_ch3.adb: Minor reformatting
8495 Minor comment addition
8496 Minor error msg text change
8497
8498 2011-08-02 Javier Miranda <miranda@adacore.com>
8499
8500 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8501 function. Used to be more precise when we generate a variable plus one
8502 assignment to remove side effects in the evaluation of the Bound
8503 expressions.
8504 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8505 of the bound expression to force its re-analysis and thus expand the
8506 associated transient scope (if required). Code cleanup replacing the
8507 previous code that declared the constant entity by an invocation to
8508 routine Force_Evaluation which centralizes this work in the frontend.
8509
8510 2011-08-02 Robert Dewar <dewar@adacore.com>
8511
8512 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8513 (Base_Type): Now uses improved Is_Base_Type function
8514 * einfo.ads (Base_Type): Inline this function
8515
8516 2011-08-02 Robert Dewar <dewar@adacore.com>
8517
8518 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8519 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8520
8521 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8522
8523 * gcc-interface/Make-lang.in: Update dependencies.
8524 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8525 targets.
8526
8527 2011-08-02 Yannick Moy <moy@adacore.com>
8528
8529 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8530 non-simple expression used in delta constraint
8531 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8532 index constraint which is not a subtype mark
8533 * par.adb: With and use Restrict
8534 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8535 mode on component type which is not a subtype mark and default
8536 expression on component
8537 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8538 of string which does not have a lower index bound equal to 1
8539 (Array_Type_Declaration): issue an error in formal mode on index or
8540 component type which is not a subtype mark, and on aliased keyword on
8541 component
8542 (Derived_Type_Declaration): issue an error in formal mode on interface,
8543 limited or abstract type
8544 (Record_Type_Declaration): issue an error in formal mode on interface
8545 (Record_Type_Definition): issue an error in formal mode on tagged types
8546 and type extensions not declared in the specification of a library unit
8547 package; on null non-tagged record; on variant part
8548
8549 2011-08-02 Vincent Celier <celier@adacore.com>
8550
8551 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8552 not declared for qualified library project when Library_Name is not
8553 declared, but Library_Dir is.
8554
8555 2011-08-02 Robert Dewar <dewar@adacore.com>
8556
8557 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8558 pragmas (affects aspects [Component_]Default_Value
8559 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8560 component type for the resolution
8561
8562 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8563
8564 * einfo.adb (Base_Type): Tune implementation for speed.
8565
8566 2011-08-02 Robert Dewar <dewar@adacore.com>
8567
8568 * freeze.adb: Minor reformatting.
8569
8570 2011-08-02 Thomas Quinot <quinot@adacore.com>
8571
8572 * scos.ads: Update comments.
8573
8574 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8575
8576 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8577 base type, because the parent may be a subtype of a private type whose
8578 convention is established in a private part.
8579
8580 2011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8581
8582 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8583 statement in a block when the expansion of the return expression has
8584 created a finalization chain.
8585 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8586 with the parent node.
8587 Add N_Extended_Return_Statement to handle the case where a transient
8588 object declaration appears in the Return_Object_Declarations list of
8589 an extended return statement.
8590
8591 2011-08-02 Matthew Gingell <gingell@adacore.com>
8592
8593 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8594 unused parameter 'name'.
8595
8596 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8597
8598 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8599 inherited operation, check whether its alias, which is the source
8600 operastion that it renames, has been marked eliminated.
8601
8602 2011-08-02 Javier Miranda <miranda@adacore.com>
8603
8604 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8605 in-mode parameter whose type is an access type since it can be used to
8606 modify its designated object. Enforce code that handles as safe an
8607 access type that is not access-to-constant but it is the result of a
8608 previous removal of side-effects.
8609 (Remove_Side_Effects): Minor code reorganization of cases which require
8610 no action. Done to incorporate documentation on new cases uncovered
8611 working in this ticket: no action needed if this routine was invoked
8612 too early and the nodes are not yet decorated.
8613 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8614 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8615 were issued with actuals that are implicitly provided by
8616 Force_Evaluation.
8617
8618 2011-08-02 Robert Dewar <dewar@adacore.com>
8619
8620 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8621
8622 2011-08-02 Yannick Moy <moy@adacore.com>
8623
8624 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8625 to issue an error in formal mode on attribute not supported in this mode
8626 (Analyze_Attribute): issue errors on standard attributes not supported
8627 in formal mode.
8628 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8629 comment, and issue error in formal mode on modulus which is not a power
8630 of 2.
8631 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8632 range.
8633 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8634 subtype mark.
8635 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8636 operator on modular type (except 'not').
8637
8638 2011-08-02 Robert Dewar <dewar@adacore.com>
8639
8640 * gnat_rm.texi: Minor reformatting.
8641
8642 2011-08-02 Arnaud Charlet <charlet@adacore.com>
8643
8644 * s-osinte-linux.ads: Minor comment update and reformatting.
8645 * i-cexten.ads: Make this unit pure, as for its parent.
8646 Will allow its usage in more contexts if needed.
8647
8648 2011-08-02 Robert Dewar <dewar@adacore.com>
8649
8650 * s-utf_32.ads: Minor comment fix.
8651
8652 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8653
8654 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8655 operation of a tagged synchronized type, handle the case where the
8656 controlling argument is overloaded.
8657
8658 2011-08-02 Yannick Moy <moy@adacore.com>
8659
8660 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8661 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8662 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8663 SPARK mode and formal verification mode on processing SPARK restriction
8664 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8665 requiring consistency checking.
8666
8667 2011-08-02 Robert Dewar <dewar@adacore.com>
8668
8669 * sem_res.adb: Minor reformatting.
8670
8671 2011-08-02 Robert Dewar <dewar@adacore.com>
8672
8673 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8674 a-cforse.ads: Remove unneeded with of Ada.Containers
8675 Remove commented out pragma Inline's
8676 Move specifications of new subprograms to the actual specs
8677
8678 2011-08-02 Yannick Moy <moy@adacore.com>
8679
8680 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8681 a-cforse.ads: Update comments.
8682
8683 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8684
8685 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8686
8687 2011-08-02 Robert Dewar <dewar@adacore.com>
8688
8689 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8690 a-cforse.ads, a-cofove.ads: Minor reformatting.
8691
8692 2011-08-02 Claire Dross <dross@adacore.com>
8693
8694 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8695 a-cofove.ads: Add comments.
8696
8697 2011-08-02 Yannick Moy <moy@adacore.com>
8698
8699 * gnat_rm.texi: Document formal containers.
8700
8701 2011-08-02 Emmanuel Briot <briot@adacore.com>
8702
8703 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8704 are empty sections.
8705
8706 2011-08-02 Robert Dewar <dewar@adacore.com>
8707
8708 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8709 reformatting.
8710
8711 2011-08-02 Robert Dewar <dewar@adacore.com>
8712
8713 * aspects.adb: New aspects Default_Value and Default_Component_Value
8714 New format of Aspect_Names table checks for omitted entries
8715 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8716 handling of boolean aspects for derived types.
8717 New aspects Default_Value and Default_Component_Value
8718 New format of Aspect_Names table checks for omitted entries
8719 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8720 (Has_Default_Value): New flag
8721 (Has_Default_Component_Value): New flag
8722 (Has_Default_Value): New flag
8723 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8724 table.
8725 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8726 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8727 Default_Value and Default_Component_Value
8728 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8729 New aspects Default_Value and Default_Component_Value
8730 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8731 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8732
8733 2011-08-02 Vincent Celier <celier@adacore.com>
8734
8735 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8736 inherit library kind.
8737
8738 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8739
8740 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8741 Minor reformatting.
8742
8743 2011-08-02 Robert Dewar <dewar@adacore.com>
8744
8745 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8746
8747 2011-08-02 Yannick Moy <moy@adacore.com>
8748
8749 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8750
8751 2011-08-02 Robert Dewar <dewar@adacore.com>
8752
8753 * impunit.adb: Add comment.
8754
8755 2011-08-02 Yannick Moy <moy@adacore.com>
8756
8757 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8758 qualification of aggregates in formal mode
8759 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8760 another aggregate
8761 (Resolve_Aggregate): complete the test that an aggregate is adequately
8762 qualified in formal mode
8763
8764 2011-08-02 Pascal Obry <obry@adacore.com>
8765
8766 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8767 * mlib-prj.adb: Supress warning when compiling binder generated file.
8768 (Build_Library): Supress all warnings when compiling the binder
8769 generated file.
8770
8771 2011-08-02 Yannick Moy <moy@adacore.com>
8772
8773 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8774 from here...
8775 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8776 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8777 Add with/use clauses to make Check_Formal_Restriction visible
8778
8779 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8780
8781 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8782 in-parameters when type of the generic formal is private in the generic
8783 spec and non-private in the body.
8784
8785 2011-08-02 Claire Dross <dross@adacore.com>
8786
8787 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8788 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8789 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8790 * impunit.adb, Makefile.rtl: Take new files into account.
8791
8792 2011-08-02 Robert Dewar <dewar@adacore.com>
8793
8794 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8795 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8796
8797 2011-08-02 Yannick Moy <moy@adacore.com>
8798
8799 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8800 formal mode
8801 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8802 matching static array bounds, taking into account the special case of
8803 string literals
8804 * sem_ch3.adb: Typo in comment.
8805
8806 2011-08-02 Yannick Moy <moy@adacore.com>
8807
8808 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8809 which issues an error in formal mode if its argument node is originally
8810 from source
8811 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8812 has a discriminant specification so that it does not include the case
8813 of derived types
8814 (Derived_Type_Declaration): move here the test that a derived type has a
8815 discriminant specification
8816 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8817 first element of a component association before accessing its choices
8818 (presence of component association is not enough)
8819 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8820 declaration is a library item before accessing the next element in a
8821 list, as library items are not member of lists
8822 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8823 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8824 Check_Formal_Restriction whenever possible.
8825
8826 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8827
8828 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8829 reference when needed.
8830
8831 2011-08-02 Bob Duff <duff@adacore.com>
8832
8833 * gnat_ugn.texi: Fix typo.
8834
8835 2011-08-02 Vincent Celier <celier@adacore.com>
8836
8837 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8838 archive file name. Do not use the full path name of archives for Open
8839 VMS.
8840
8841 2011-08-02 Robert Dewar <dewar@adacore.com>
8842
8843 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8844 Analyze_Aspect_Specifications
8845 * sem_ch13.adb
8846 (Analyze_Aspect_Specifications): New handling for boolean aspects
8847 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8848 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8849 sequence for Analyze_Aspect_Specifications
8850 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8851 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8852
8853 2011-08-02 Robert Dewar <dewar@adacore.com>
8854
8855 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8856 aspects, since these no longer exist.
8857
8858 2011-08-02 Robert Dewar <dewar@adacore.com>
8859
8860 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8861 semicolon, do not try to see if there are aspects following it.
8862 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8863 aspect spec.
8864
8865 2011-08-02 Robert Dewar <dewar@adacore.com>
8866
8867 * sem_ch8.adb, aspects.ads: Minor reformatting.
8868
8869 2011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8870
8871 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8872 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8873 extracted from...
8874 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8875
8876 2011-08-02 Yannick Moy <moy@adacore.com>
8877
8878 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8879 mode on subprogram declaration outside of package specification, unless
8880 it is followed by a pragma Import
8881 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8882 Access_Type_Declaration): issue error in formal mode on access type
8883 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8884 incomplete type
8885 (Analyze_Object_Declaration): issue error in formal mode on object
8886 declaration which does not respect SPARK restrictions
8887 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8888 declaration which does not respect SPARK restrictions
8889 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8890 error in formal mode on digits or delta constraint
8891 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8892 decimal fixed point type
8893 (Derived_Type_Declaration): issue error in formal mode on derived type
8894 other than type extensions of tagged record types
8895 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8896 with check on access definition
8897 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8898 mode on protected definition.
8899 (Analyze_Task_Definition): issue error in formal mode on task definition
8900
8901 2011-08-02 Robert Dewar <dewar@adacore.com>
8902
8903 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8904
8905 2011-08-02 Javier Miranda <miranda@adacore.com>
8906
8907 * sem_ch6.adb (Can_Override_Operator): New function.
8908 (Verify_Overriding_Indicator): Add missing code to check overriding
8909 indicator in operators. Fixes regression.
8910 (Check_Overriding_Indicator): Minor reformating after replacing the
8911 code that evaluates if the subprogram can override an operator by
8912 invocations to the above new function.
8913 * einfo.adb
8914 (Write_Field26_Name): Add missing code to ensure that, following
8915 the documentation in einfo.ads, this field is not shown as attribute
8916 "Static_Initialization" on non-dispatching functions.
8917
8918 2011-08-02 Jose Ruiz <ruiz@adacore.com>
8919
8920 * sem_res.adb (Resolve_Call): A call to
8921 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8922 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8923 i.e., when the second parameter is of type Time_Span.
8924
8925 2011-08-02 Vincent Celier <celier@adacore.com>
8926
8927 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8928 with an archive instead of -L<library dir> -l<library name>.
8929
8930 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8931
8932 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8933 mark the base types In_Use in addition to making the operations
8934 use_visible.
8935
8936 2011-08-02 Ed Falis <falis@adacore.com>
8937
8938 * init.c: add and setup __gnat_signal_mask for the exception signals
8939 * s-inmaop-vxworks.adb: new file.
8940 * s-intman-vxworks.adb: remove unnecessary initializations and
8941 simplify remaining
8942 * s-intman-vxworks.ads: remove unnecessary variable
8943 * s-taprop-vxworks.adb: simplify signal initialization
8944
8945 2011-08-02 Robert Dewar <dewar@adacore.com>
8946
8947 * sem_ch8.adb: Minor code reorganization, comment updates.
8948
8949 2011-08-02 Robert Dewar <dewar@adacore.com>
8950
8951 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8952 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8953 here from Sem_Res.
8954 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8955 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8956
8957 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8958
8959 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8960 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8961 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8962 use_type_clauses, to handle more efficiently use_type and use_all_type
8963 constructs.
8964 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8965 Ada2012 Use_All_Type clause.
8966 (Use_Class_Wide_Operations): new procedure.
8967
8968 2011-08-02 Robert Dewar <dewar@adacore.com>
8969
8970 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8971 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8972 expression to expression function.
8973
8974 2011-08-02 Ed Schonberg <schonberg@adacore.com>
8975
8976 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8977 if types are compatible.
8978
8979 2011-08-02 Yannick Moy <moy@adacore.com>
8980
8981 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8982 returns True if its argument array types have same dimension and same
8983 static bounds at each index.
8984 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8985 OUT or IN OUT paramaters which are not view conversions in SPARK.
8986 (Resolve_Arithmetic_Op): issue an error in formal mode on
8987 multiplication or division with operands of fixed point types which are
8988 not qualified or explicitly converted.
8989 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8990 Boolean or array type (except String) operands.
8991 (Resolve_Equality_Op): issue an error in formal mode on equality
8992 operators for array types other than String with non-matching static
8993 bounds.
8994 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8995 for array types with non-matching static bounds. Factorize the code in
8996 Matching_Static_Array_Bounds.
8997 (Resolve_Qualified_Expression): issue an error in formal mode on
8998 qualified expressions for array types with non-matching static bounds.
8999 (Resolve_Type_Conversion): issue an error in formal mode on type
9000 conversion for array types with non-matching static bounds
9001
9002 2011-08-02 Robert Dewar <dewar@adacore.com>
9003
9004 * par-ch10.adb: Minor code reorganization (use Nkind_In).
9005
9006 2011-08-02 Ed Schonberg <schonberg@adacore.com>
9007
9008 * par-ch9.adb: save location of entry for proper error message.
9009
9010 2011-08-02 Javier Miranda <miranda@adacore.com>
9011
9012 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
9013 (Use_Full_View) which permits this routine to climb through the
9014 ancestors using the full-view of private parents.
9015 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
9016 Use_Full_View to true in calls to Is_Ancestor.
9017 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
9018 true in call to Is_Ancestor.
9019 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
9020 Use_Full_View to true in call to Is_Ancestor.
9021 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
9022 call to Is_Ancestor.
9023 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
9024 Use_Full_View to true in calls to Is_Ancestor.
9025 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
9026 Make_Select_Specific_Data_Table, Register_Primitive,
9027 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
9028 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
9029 to true in call to Is_Ancestor.
9030 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
9031 Use_Full_View to true in calls to Is_Ancestor.
9032 * exp_cg.adb
9033 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
9034 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
9035
9036 2011-08-02 Robert Dewar <dewar@adacore.com>
9037
9038 * gnat_rm.texi: Minor reformatting.
9039 * sem_prag.adb: Minor reformatting.
9040
9041 2011-08-02 Tristan Gingold <gingold@adacore.com>
9042
9043 * vms_data.ads: Add VMS qualifier for -gnateP.
9044
9045 2011-08-02 Robert Dewar <dewar@adacore.com>
9046
9047 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
9048 * par-ch7.adb (P_Package): Proper placement of aspects for package
9049 decl/instantiation.
9050 * par-endh.adb (Check_End): Ad Is_Sloc parameter
9051 (End_Statements): Add Is_Sloc parameterr
9052 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
9053 (Check_End): Ad Is_Sloc parameter
9054 (End_Statements): Add Is_Sloc parameterr
9055
9056 2011-08-02 Vincent Celier <celier@adacore.com>
9057
9058 * ug_words: Add VMS qualifier equivalent to -gnateP:
9059 /SYMBOL_PREPROCESSING.
9060
9061 2011-08-02 Jose Ruiz <ruiz@adacore.com>
9062
9063 * gnat-style.texi: For hexadecimal numeric literals the typical
9064 grouping of digits is 4 to represent 2 bytes.
9065 A procedure spec which is split into several lines is indented two
9066 characters.
9067
9068 2011-08-02 Yannick Moy <moy@adacore.com>
9069
9070 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
9071 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
9072 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
9073 properly qualified
9074 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
9075 choice in array aggregate
9076 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
9077 mark as ancestor
9078 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
9079 positional and named aggregate for record, or others in record
9080 aggregate, or multiple choice in record aggregate
9081 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
9082 array operands to logical operations AND, OR and XOR do not have the
9083 same static lower and higher bounds
9084 * sem_ch5.adb, sinfo.ads: Correct typos in comments
9085
9086 2011-08-01 Robert Dewar <dewar@adacore.com>
9087
9088 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
9089 Replaces Last_Source_Node_In_Sequence.
9090 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
9091 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
9092 parens and blank in string (this was inconsistently implemented).
9093 * errout.ads
9094 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
9095 blank in string (this was inconsistently implemented).
9096 * gnat1drv.adb
9097 (Set_Global_Switches): Set formal mode switches appropriately
9098 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
9099 * par-prag.adb
9100 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
9101 call Set_Error_Msg_Lang to set "spark" as language name.
9102 * par.adb: Remove unnecessary call to set formal language for errout
9103 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
9104 appropriately and call Set_Error_Msg_Lang to set "spark" as language
9105 name.
9106 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
9107 calls to it, moved after resolution so that types are known
9108 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
9109 result of concatenation is not of type String
9110 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
9111 concatenation is not properly restricted
9112 * gnat_rm.texi: Add doc on pragma Spark_95.
9113 * gcc-interface/Makefile.in: Remove obsolete target pairs for
9114 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
9115 * gcc-interface/Make-lang.in: Update dependencies.
9116
9117 2011-08-01 Javier Miranda <miranda@adacore.com>
9118
9119 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
9120 condition that detects if the overridden operation must replace an
9121 existing entity.
9122
9123 2011-08-01 Javier Miranda <miranda@adacore.com>
9124
9125 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
9126 code declarations inserted by Insert_Actions in each alternative of the
9127 N_Case_Expression node.
9128
9129 2011-08-01 Robert Dewar <dewar@adacore.com>
9130
9131 * sem_ch6.adb: Minor code reorganization.
9132 * sem_util.adb: Minor reformatting.
9133
9134 2011-08-01 Pascal Obry <obry@adacore.com>
9135
9136 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
9137 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
9138
9139 2011-08-01 Yannick Moy <moy@adacore.com>
9140
9141 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
9142 literal or operator symbol which is prefixed
9143 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
9144 mode on access attributes.
9145 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
9146 that concatenation operands are properly restricted in formal mode
9147 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
9148 Analyze_Concatenation_Operand. Issue an error in formal mode if the
9149 result of the concatenation has a type different from String.
9150 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
9151 Analyze_Quantified_Expression, Analyze_Slice,
9152 Analyze_Null): issue an error in formal mode on unsupported constructs
9153 * sem_ch5.adb
9154 (Analyze_Block_Statement): only issue error on source block statement
9155 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
9156 function which returns the last node in a list of nodes for which
9157 Comes_From_Source returns True, if any
9158 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
9159 Last_Source_Node_In_Sequence
9160 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
9161 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
9162 mode on unsupported constructs
9163 * sem_ch9.adb Do not return after issuing error in formal mode, as the
9164 rest of the actions may be needed later on since the error is marked as
9165 not serious.
9166 * sinfo.ads: Typos in comments.
9167
9168 2011-08-01 Pascal Obry <obry@adacore.com>
9169
9170 * projects.texi: Minor editing.
9171
9172 2011-08-01 Yannick Moy <moy@adacore.com>
9173
9174 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
9175 insertion character ~~
9176 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
9177 (Set_Error_Msg_Lang): new procedure which fixes the language for use
9178 with insertion character ~~
9179 (Set_Msg_Text): treat insertion character ~~
9180 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
9181 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
9182 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
9183 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
9184 errors related to the formal language restriction not serious
9185 (insertion character |).
9186 * par.adb (Par): set formal language for error messages if needed
9187 * sem_ch6.adb (Check_Missing_Return): take into account possible
9188 generated statements at the end of the function
9189 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
9190 enumeration value to define a new pragma SPARK_95
9191 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
9192 SPARK_Version): new type and variables to store the SPARK version
9193 (none by default).
9194 (SPARK_Mode): return True when SPARK_Version is set
9195 * par-prag.adb: Correct indentation
9196 (Prag): take Pragma_SPARK_95 into account
9197 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
9198 into account.
9199
9200 2011-08-01 Robert Dewar <dewar@adacore.com>
9201
9202 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
9203 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
9204 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
9205
9206 2011-08-01 Pascal Obry <obry@adacore.com>
9207
9208 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
9209 Target_Name to Get_Path call.
9210 (Parse_Single_Project): Likewise.
9211 (Post_Parse_Context_Clause): Likewise.
9212 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
9213 Call Initialise_Project_Path with the proper Target_Name.
9214 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
9215 search path.
9216 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
9217 with the proper Target_Name.
9218 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
9219 Part.Parse routine.
9220 (Parse_Project_And_Apply_Config): Likewise.
9221 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
9222 This is fine as this part of the code is supporting only native
9223 compilation.
9224 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
9225 is fine as this part of the code is supporting only native compilation.
9226
9227 2011-08-01 Yannick Moy <moy@adacore.com>
9228
9229 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
9230 of homonym, unless the homonym is one of the cases allowed in SPARK
9231 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
9232 package declaration occurring after a body.
9233
9234 2011-08-01 Robert Dewar <dewar@adacore.com>
9235
9236 * checks.adb, exp_ch4.adb: Minor reformatting.
9237
9238 2011-08-01 Javier Miranda <miranda@adacore.com>
9239
9240 * einfo.ads (Access_Disp_Table): Fix documentation.
9241 (Dispatch_Table_Wrappers): Fix documentation.
9242
9243 2011-08-01 Pascal Obry <obry@adacore.com>
9244
9245 * prj-env.adb, prj-env.ads: Minor reformatting.
9246
9247 2011-08-01 Yannick Moy <moy@adacore.com>
9248
9249 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
9250 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9251 procedures out of these packages.
9252 * errout.ads, errout.adb
9253 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
9254 procedures in of this package
9255 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
9256 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
9257 on misplaced later vs initial declarations, like in Ada 83
9258 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
9259 formal mode on attribute of private type whose full type declaration
9260 is not visible
9261 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
9262 package declaration inside a package specification
9263 (Analyze_Full_Type_Declaration): issue error in formal mode on
9264 controlled type or discriminant type
9265 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
9266 user-defined operator means that it should come from the source
9267 (New_Overloaded_Entity): issue error in formal mode on overloaded
9268 entity.
9269 * sem_ch6.ads, sem_ch13.ads: typos in comments.
9270
9271 2011-08-01 Thomas Quinot <quinot@adacore.com>
9272
9273 * atree.adb: Minor reformatting.
9274 * checks.adb: Minor reformatting.
9275
9276 2011-08-01 Vincent Celier <celier@adacore.com>
9277
9278 * s-parame-vms-ia64.ads: Fix typo in comment
9279 Minor reformatting
9280 * s-parame-vms-restrict.ads: Removed, unused.
9281
9282 2011-08-01 Javier Miranda <miranda@adacore.com>
9283
9284 * exp_ch3.adb
9285 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
9286 * sem_ch3.adb
9287 (Constrain_Index): Remove side effects in the evaluation of the bounds.
9288 * sem_ch3.ads, sem_ch3.adb
9289 (Is_Constant_Bound): New extended version of the subprogram that was
9290 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
9291 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
9292 * sem_aux.ads (Constant_Value): Fix typo in comment.
9293 * checks.adb (Generate_Index_Checks): New implementation which, for
9294 array objects with constant bounds, generates the runtime check
9295 referencing the bounds of the array type. For other cases this routine
9296 provides its previous behavior obtaining such values from the array
9297 object.
9298 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
9299 parent type.
9300 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
9301 we cannot have semantic interpretations of the new node.
9302
9303 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9304
9305 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
9306 expressions.
9307
9308 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9309
9310 * sem_ch8.adb: Minor code editing.
9311 * s-vxwext.adb: Remove trailing space.
9312 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
9313 consistency with other files.
9314
9315 2011-08-01 Thomas Quinot <quinot@adacore.com>
9316
9317 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
9318
9319 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9320
9321 * par-ch10.adb: reject parameterized expressions as compilation unit.
9322 * sem_ch4.adb: handle properly conditional expression with overloaded
9323 then_clause and no else_clause.
9324
9325 2011-08-01 Tristan Gingold <gingold@adacore.com>
9326
9327 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
9328 like done by System.Aux_DEC.
9329 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
9330
9331 2011-08-01 Yannick Moy <moy@adacore.com>
9332
9333 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
9334 missing label at end of declaration (subprogram or package)
9335 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
9336 of positional and named parameter association
9337 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9338 Error_Msg_SP which adds a prefix to the error message giving the name
9339 of the formal language analyzed
9340 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9341 access result type in subprogram, unconstrained array as result type,.
9342 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9343 procedure
9344 * sem_ch8.adb: Code clean up.
9345
9346 2011-08-01 Javier Miranda <miranda@adacore.com>
9347
9348 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9349 * einfo.ads (Access_Disp_Table): Fix documentation.
9350 (Dispatch_Table_Wrappers): Fix documentation.
9351 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9352 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9353 to enforce the documentation of this attribute.
9354 (Set_Is_Interface): Cleanup the assertion.
9355 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9356 the Underlying_Type entity before reading attribute Access_Disp_Table.
9357 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9358 Locate the Underlying_Type before reading attribute Access_Disp_Table.
9359 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9360 the Underlying_Type entity before reading attribute Access_Disp_Table.
9361 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9362 Locate the Underlying_Type entity before reading attribute
9363 Access_Disp_Table.
9364
9365 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9366
9367 * s-poosiz.ads: Additional overriding indicators.
9368
9369 2011-08-01 Yannick Moy <moy@adacore.com>
9370
9371 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9372 formal mode.
9373 (Analyze_Iteration_Scheme): issue error in formal mode when loop
9374 parameter specification does not include a subtype mark.
9375 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9376 formal mode on abstract subprogram.
9377 (Analyze_Subprogram_Specification): issue error in formal mode on
9378 user-defined operator.
9379 (Process_Formals): issue error in formal mode on access parameter and
9380 default expression.
9381 * sem_ch9.adb (Analyze_Abort_Statement,
9382 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9383 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9384 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9385 Analyze_Requeue, Analyze_Selective_Accept,
9386 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9387 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9388 issue error in formal mode on user-defined raise statement.
9389
9390 2011-08-01 Thomas Quinot <quinot@adacore.com>
9391
9392 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9393 declaration being hidden when overriding an implicit inherited
9394 subprogram.
9395 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9396 (-gnats), do not complain about a source file that contains only a
9397 pragma No_Body.
9398
9399 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9400
9401 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9402 variable if already set.
9403
9404 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9405
9406 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9407 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9408 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9409 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9410 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9411 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9412 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9413 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9414 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9415 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9416 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9417 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9418 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9419 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9420 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9421 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9422 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9423 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9424 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9425 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9426 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9427 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9428 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9429 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9430 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9431 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9432 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9433 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9434 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9435 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9436 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9437 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9438 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9439 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9440 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9441 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9442 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9443 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9444 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9445 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9446 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9447 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9448 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9449 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9450 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9451 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9452 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9453 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9454 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9455 Use GNAT instead of GNARL.
9456
9457 2011-08-01 Bob Duff <duff@adacore.com>
9458
9459 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9460 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9461 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9462 reformatting.
9463
9464 2011-08-01 Yannick Moy <moy@adacore.com>
9465
9466 * debug.adb (d.D) reverve flag for the SPARK mode
9467 (d.E) reverve flag for SPARK generation mode
9468 (d.F) reverve flag for Why generation mode
9469 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
9470 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9471 functions which return True when the corresponding modes are set
9472 (Formal_Language): return "spark" or "alfa" when in formal verification
9473 mode.
9474 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9475 Error_Msg to prefix the error message with a tag giving the formal
9476 language
9477 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9478 message with a tag giving the formal language
9479 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9480 block statement
9481 (Analyze_Case_Statement): issue error in formal mode on case statement
9482 with a single "others" case alternative
9483 (Analyze_Exit_Statement): issue errors in formal mode on exit
9484 statements which do not respect SPARK restrictions
9485 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9486 (Check_Unreachable_Code): always issue an error (not a warning) in
9487 formal mode on unreachable code (concerns both code after an infinite
9488 loop and after an unconditional jump, both not allowed in SPARK)
9489 * sem_ch6.adb (Analyze_Return_Statement): add call to
9490 Set_Return_Present for a procedure containing a return statement
9491 (already done for functions in Analyze_Function_Return)
9492 (Analyze_Function_Return): issue error in formal mode on extended
9493 return or if return is not last statement in function
9494 (Check_Missing_Return): issue error in formal mode if function does
9495 not end with return or if procedure contains a return
9496 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9497 function to detect if there is an inner scope of its parameter S which
9498 is a loop.
9499
9500 2011-08-01 Thomas Quinot <quinot@adacore.com>
9501
9502 * sem_ch6.ads: Minor reformatting.
9503
9504 2011-08-01 Javier Miranda <miranda@adacore.com>
9505
9506 * sem_util.adb (Abstract_Interface_List): Complete condition when
9507 processing private type declarations to avoid reading unavailable
9508 attribute.
9509 (Is_Synchronized_Tagged_Type): Complete condition when processing
9510 private extension declaration nodes to avoid reading unavailable
9511 attribute.
9512
9513 2011-08-01 Thomas Quinot <quinot@adacore.com>
9514
9515 * sem_ch3.adb: Minor reformatting.
9516
9517 2011-08-01 Thomas Quinot <quinot@adacore.com>
9518
9519 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9520 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9521 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9522 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9523 for VMS, instead parametrize the common implementation with
9524 System.Parameters declarations.
9525
9526 2011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9527
9528 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9529
9530 2011-08-01 Tristan Gingold <gingold@adacore.com>
9531
9532 * seh_init.c: Fix SEH handler installation on win64.
9533
9534 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9535
9536 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9537 double analysis of an anonymous access to subprogram, because it can
9538 lead to improper sharing of profiles and a back-end crash.
9539
9540 2011-08-01 Robert Dewar <dewar@adacore.com>
9541
9542 * make.adb, sem_ch4.adb: Minor reformatting.
9543 * gcc-interface/Make-lang.in: Update dependencies.
9544 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9545
9546 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9547
9548 * gnat_rm.texi: Fix definition of Long_Integer.
9549
9550 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9551
9552 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9553 to prevent storage exhaustion.
9554 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9555 finalized is a function body, insert the cleanup code before the final
9556 return statement, to prevent spurious warnings.
9557 * s-pooglo.ads: add overriding indicator.
9558
9559 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9560
9561 * sem_ch4.adb (Operator_Check): improve error message when both a
9562 with_clause and a use_clause are needed to make operator usage legal.
9563 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9564 determine whether a compilation unit is visible within an other,
9565 either through a with_clause in the current unit, or a with_clause in
9566 its library unit or one one of its parents.
9567
9568 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9569
9570 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9571 over an arbitrary expression of an array or container type.
9572 * lib-xref.adb: clarify comment.
9573
9574 2011-08-01 Bob Duff <duff@adacore.com>
9575
9576 * einfo.ads: Minor reformatting.
9577 * debug.adb: Minor comment improvement.
9578
9579 2011-08-01 Javier Miranda <miranda@adacore.com>
9580
9581 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9582 consider hidden subprograms as valid candidates.
9583
9584 2011-08-01 Arnaud Charlet <charlet@adacore.com>
9585
9586 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9587
9588 2011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9589
9590 * gnat_ugn.texi: Fix typo.
9591
9592 2011-08-01 Robert Dewar <dewar@adacore.com>
9593
9594 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9595 lib-xref.adb: Minor reformatting
9596
9597 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9598
9599 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9600 when to generate a call to Move_Final_List.
9601 (Has_Controlled_Parts): Remove this function.
9602
9603 2011-08-01 Geert Bosch <bosch@adacore.com>
9604
9605 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9606 "," in choice list.
9607
9608 2011-08-01 Thomas Quinot <quinot@adacore.com>
9609
9610 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9611 explicit raise of a predefined exception as Comes_From_Source if the
9612 original N_Raise_Statement comes from source.
9613
9614 2011-08-01 Robert Dewar <dewar@adacore.com>
9615
9616 * sinfo.ads: Add comment.
9617 * sem_ch6.adb: Minor reformatting.
9618
9619 2011-08-01 Robert Dewar <dewar@adacore.com>
9620
9621 * freeze.adb (Freeze_Entity): Refine check for bad component size
9622 clause to avoid rejecting confirming clause when atomic/aliased present.
9623
9624 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9625
9626 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9627 better determine whether an entity reference is a write.
9628 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9629 subcomponent.
9630 * lib-xref.adb (Output_References): Do no suppress a read reference at
9631 the same location as an immediately preceeding modify-reference, to
9632 handle properly in-out actuals.
9633
9634 2011-08-01 Tristan Gingold <gingold@adacore.com>
9635
9636 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9637
9638 2011-08-01 Quentin Ochem <ochem@adacore.com>
9639
9640 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9641 heap to compute the result.
9642
9643 2011-08-01 Robert Dewar <dewar@adacore.com>
9644
9645 * atree.ads: Minor reformatting.
9646
9647 2011-08-01 Emmanuel Briot <briot@adacore.com>
9648
9649 * g-expect.adb (Get_Command_Output): Fix memory leak.
9650
9651 2011-08-01 Geert Bosch <bosch@adacore.com>
9652
9653 * cstand.adb (P_Float_Type): New procedure to print the definition of
9654 predefined fpt types.
9655 (P_Mixed_Name): New procedure to print a name using mixed case
9656 (Print_Standard): Use P_Float_Type for printing floating point types
9657 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9658 precision IEEE float.
9659
9660 2011-08-01 Thomas Quinot <quinot@adacore.com>
9661
9662 * sem_ch3.adb: Minor reformatting.
9663
9664 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9665
9666 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9667 the completion of a generic function, insert the new body rather than
9668 rewriting the original.
9669
9670 2011-08-01 Yannick Moy <moy@adacore.com>
9671
9672 * sinfo.ads, errout.ads: Typos in comments.
9673
9674 2011-08-01 Robert Dewar <dewar@adacore.com>
9675
9676 * par-endh.adb: Minor reformatting.
9677
9678 2011-08-01 Robert Dewar <dewar@adacore.com>
9679
9680 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9681 (Pre_Post_Aspects): New subtype.
9682 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9683 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9684 * par-ch7.adb (P_Package): Remove Decl parameter
9685 (P_Package): Handle new syntax for aspects (before IS)
9686 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9687 new aspect syntax
9688 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9689 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9690 (P_Package): Remove Decl parameter
9691 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9692 aspects
9693 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9694 specs
9695 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9696 * sinfo.ads: Document new syntax for aspects in packages etc.
9697 * sprint.adb: Handle new syntax of aspects before IS in package
9698
9699 2011-08-01 Thomas Quinot <quinot@adacore.com>
9700
9701 * atree.ads: Minor reformatting.
9702 * sem_prag.adb: Minor reformatting.
9703
9704 2011-08-01 Robert Dewar <dewar@adacore.com>
9705
9706 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9707 case expr alternative.
9708
9709 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9710
9711 * sem_ch12.adb: Fix typo.
9712
9713 2011-08-01 Geert Bosch <bosch@adacore.com>
9714
9715 * sem_prag.adb (Check_No_Link_Name): New procedure.
9716 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9717 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9718 instead of Standard_Long_Long_Float_Size global. Preparation for
9719 eventual removal of per type constants.
9720 * exp_util.ads (Get_Stream_Size): New function returning the stream
9721 size value of subtype E.
9722 * exp_util.adb (Get_Stream_Size): Implement new function.
9723 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9724 function.
9725 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9726 * einfo.adb:
9727 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9728
9729 2011-08-01 Geert Bosch <bosch@adacore.com>
9730
9731 * cstand.adb: Fix comments.
9732 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9733 count of arguments.
9734
9735 2011-08-01 Robert Dewar <dewar@adacore.com>
9736
9737 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9738
9739 2011-08-01 Geert Bosch <bosch@adacore.com>
9740
9741 * atree.ads: Fix comment.
9742
9743 2011-08-01 Robert Dewar <dewar@adacore.com>
9744
9745 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9746 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9747 * par.adb: Add with for Namet.Sp.
9748 * par-tchk.adb: Minor reformatting.
9749
9750 2011-08-01 Vincent Celier <celier@adacore.com>
9751
9752 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9753 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9754 of the init procedure of a SAL.
9755 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9756 New procedure.
9757
9758 2011-08-01 Thomas Quinot <quinot@adacore.com>
9759
9760 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9761 reformatting.
9762
9763 2011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9764
9765 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9766
9767 2011-08-01 Thomas Quinot <quinot@adacore.com>
9768
9769 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9770 conformant with its spec (return True only for types that have
9771 an overriding Initialize primitive operation that prevents them from
9772 having preelaborable initialization).
9773 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9774 initialization for controlled types in Ada 2005 or later mode.
9775
9776 2011-08-01 Robert Dewar <dewar@adacore.com>
9777
9778 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9779 Postcondition.
9780 (Same_Aspect): New function.
9781 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9782 Type_Invariant, Precondition, Postcondition.
9783 * snames.ads-tmpl: Add Name_Type_Invariant.
9784
9785 2011-08-01 Robert Dewar <dewar@adacore.com>
9786
9787 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9788 here.
9789 (Freeze_All_Ent): Fix error in handling inherited aspects.
9790 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9791 already analyzed, but don't skip entire processing of a declaration,
9792 that's wrong in some cases of declarations being rewritten.
9793 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9794 Don't delay for integer, string literals
9795 Treat predicates in usual manner for delay, remove special case code,
9796 not needed.
9797 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9798 (Build_Predicate_Function): Update saved expression in aspect
9799 (Build_Invariant_Procedure): Update saved expression in aspect
9800 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9801 of replacement of discriminant references if the reference is simple.
9802
9803 2011-08-01 Robert Dewar <dewar@adacore.com>
9804
9805 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9806 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9807 Static_Predicate and Dynamic_Predicate.
9808 (Build_Predicate_Function): Add processing for Static_Predicate
9809 and Dynamic_Predicate.
9810 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9811 (From_Static_Predicate): New flag
9812 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9813
9814 2011-08-01 Robert Dewar <dewar@adacore.com>
9815
9816 * usage.adb: Documentation cleanup for Ada version modes in usage.
9817 * expander.adb: Minor reformatting.
9818
9819 2011-08-01 Robert Dewar <dewar@adacore.com>
9820
9821 * atree.ads: Minor comment fix.
9822 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9823 a-witeio.ads, sem_prag.adb: Minor reformatting.
9824
9825 2011-08-01 Doug Rupp <rupp@adacore.com>
9826
9827 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9828 pointers. Use descrip.h header file for convenience. Add some
9829 comments.
9830
9831 2011-08-01 Robert Dewar <dewar@adacore.com>
9832
9833 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9834 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9835 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9836 New procedure.
9837 (Check_Aspect_At_End_Of_Declarations): New procedure
9838 (Analye_Aspect_Specification): Minor changes for above procedures
9839 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9840 specification node as well.
9841
9842 2011-08-01 Pascal Obry <obry@adacore.com>
9843
9844 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9845 Windows files. Use GetFilesAttributes() in this case to check for file
9846 existence instead of returning with an error code.
9847
9848 2011-08-01 Vincent Celier <celier@adacore.com>
9849
9850 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9851 High is above Source length.
9852
9853 2011-08-01 Robert Dewar <dewar@adacore.com>
9854
9855 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9856
9857 2011-08-01 Robert Dewar <dewar@adacore.com>
9858
9859 * aspects.ads (Boolean_Aspects): New subtype.
9860 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9861 for derived types in cases where the parent type and derived type have
9862 aspects.
9863 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9864 with aspects when parent type also has aspects.
9865 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9866 boolean expression at this point).
9867 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9868 accordance with final decision on the Ada 2012 feature.
9869 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9870
9871 2011-08-01 Matthew Heaney <heaney@adacore.com>
9872
9873 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9874
9875 2011-08-01 Pascal Obry <obry@adacore.com>
9876
9877 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9878 Fix Replace_Slice when High is above current string size.
9879 (Replace_Slice): Fix DL computation when High is above current
9880 string length.
9881
9882 2011-08-01 Gary Dismukes <dismukes@adacore.com>
9883
9884 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9885
9886 2011-08-01 Matthew Heaney <heaney@adacore.com>
9887
9888 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9889 of node.
9890
9891 2011-08-01 Pascal Obry <obry@adacore.com>
9892
9893 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9894 reformatting.
9895
9896 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9897
9898 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9899 access to protected subprograms in generic bodies.
9900 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9901 protected type, indicate that the convention of the subprogram is
9902 Convention_Protected, because it may be used in subsequent declarations
9903 within the protected declaration.
9904
9905 2011-08-01 Vincent Celier <celier@adacore.com>
9906
9907 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9908 and "final" procedures when the name of the library is "ada", to avoid
9909 duplicate symbols "adainit" and "adafinal" in executables.
9910
9911 2011-08-01 Ed Schonberg <schonberg@adacore.com>
9912
9913 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9914 quantified expression that appears within a postcondition and uses the
9915 Ada2012 'Result attribute.
9916
9917 2011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9918
9919 * init.c (__gnat_error_handler): Cast reason to int.
9920 (__gnat_install_handler): Explain sa_sigaction use.
9921
9922 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9923
9924 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9925 subprogram has copy-in copy-out parameters, try to promote the mode of
9926 the return type if it is passed in registers.
9927
9928 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9929
9930 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9931 left operand as addressable.
9932
9933 2011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9934
9935 * gcc-interface/gigi.h (build_function_stub): Remove.
9936 (build_return_expr): Likewise.
9937 (convert_vms_descriptor): Declare.
9938 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9939 (build_function_stub): Move to...
9940 * gcc-interface/utils2.c (build_return_expr): Move to...
9941 * gcc-interface/trans.c (build_function_stub): ...here.
9942 (build_return_expr): ...here.
9943 (Subprogram_Body_to_gnu): Add local variable for language_function.
9944 Disconnect the parameter attributes cache, if any, once done with it.
9945 Call end_subprog_body only after setting the end_locus.
9946 Build the stub associated with the function, if any, at the very end.
9947 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9948 variables and streamline control flow.
9949
9950 2011-07-23 Arnaud Charlet <charlet@adacore.com>
9951
9952 PR ada/49819
9953 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9954 g-trasym-dwarf.adb.
9955
9956 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9957
9958 PR bootstrap/49794
9959 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9960 Assign to act.sa_sigaction.
9961 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9962 current->return_address to char * before arithmetic.
9963
9964 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9965
9966 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9967 Correct argument types.
9968 Extract code from reason.
9969 (__gnat_install_handler): Assign to act.sa_sigaction.
9970
9971 2011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9972
9973 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9974 (GNAT1_OBJS): ...here.
9975
9976 2011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9977
9978 PR ada/48711
9979 * g-socthi-mingw.adb (Fill): Fix formatting.
9980
9981 * gcc-interface/gigi.h: Move around comment.
9982
9983 2011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9984
9985 PR ada/46350
9986 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9987
9988 2011-07-14 Florian Weimer <fw@deneb.enyo.de>
9989
9990 PR ada/48711
9991 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9992
9993 2011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9994
9995 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9996 range comparison if Pmode is SImode.
9997
9998 2011-07-12 Laurent GUERBY <laurent@guerby.net>
9999 Eric Botcazou <ebotcazou@adacore.com>
10000
10001 * adadecode.c: Wrap up in extern "C" block.
10002 * adadecode.h: Likewise.
10003 * adaint.c: Likewise. Remove 'const' keyword.
10004 * adaint.h: Likewise.
10005 * argv.c: Likewise.
10006 * atree.h: Likewise.
10007 * cio.c: Likewise.
10008 * cstreams.c: Likewise.
10009 * env.c: Likewise.
10010 * exit.c: Likewise.
10011 * fe.h: Likewise.
10012 * final.c: Likewise.
10013 * init.c: Likewise.
10014 * initialize.c: Likewise.
10015 * link.c: Likewise.
10016 * namet.h: Likewise.
10017 * nlists.h: Likewise.
10018 * raise.c: Likewise.
10019 * raise.h: Likewise.
10020 * repinfo.h: Likewise.
10021 * seh_init.c: Likewise.
10022 * targext.c: Likewise.
10023 * tracebak.c: Likewise.
10024 * uintp.h: Likewise.
10025 * urealp.h: Likewise.
10026 * xeinfo.adb: Wrap up generated C code in extern "C" block.
10027 * xsinfo.adb: Likewise.
10028 * xsnamest.adb: Likewise.
10029 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
10030 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
10031 * gcc-interface/misc.c: Likewise.
10032 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
10033 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
10034 ada/targext.o here...
10035 (GNAT_ADA_OBJS): ...and not here.
10036 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
10037 (GNATBIND_OBJS): Reorder.
10038
10039 2011-07-07 Richard Henderson <rth@redhat.com>
10040
10041 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
10042 dwarf2out_frame_init.
10043
10044 2011-07-07 Eric Botcazou <ebotcazou@adacore.com>
10045
10046 * gcc-interface/misc.c (gnat_init): Tweak previous change.
10047
10048 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10049
10050 PR target/39150
10051 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
10052
10053 2011-07-06 Richard Guenther <rguenther@suse.de>
10054
10055 * gcc-interface/misc.c (gnat_init): Merge calls to
10056 build_common_tree_nodes and build_common_tree_nodes_2.
10057 Re-initialize boolean_false_node.
10058
10059 2011-07-02 Eric Botcazou <ebotcazou@adacore.com>
10060 Olivier Hainque <hainque@adacore.com>
10061 Nicolas Setton <setton@adacore.com>
10062
10063 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
10064 the type according to the ARTIFICIAL_P parameter.
10065 (create_type_decl): Likewise.
10066 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
10067
10068 2011-07-01 Eric Botcazou <ebotcazou@adacore.com>
10069
10070 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
10071 (gnatbind): Likewise.
10072
10073 2011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10074
10075 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
10076
10077 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10078
10079 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
10080 local variable throughout. Remove useless call to Base_Type.
10081 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
10082 Take it also into account for the volatileness of the field. Set the
10083 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
10084
10085 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10086
10087 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
10088 on a dereference built for a by-ref object if it has an address clause.
10089
10090 2011-06-18 Eric Botcazou <ebotcazou@adacore.com>
10091
10092 * einfo.ads (Address_Taken): Document use for the second argument of
10093 Asm_Input and Asm_Output attributes.
10094 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
10095 argument is an entity name, then set Address_Taken on it.
10096 <Attribute_Asm_Output>: Likewise.
10097 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
10098 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
10099 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
10100 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
10101
10102 2011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
10103
10104 PR middle-end/46500
10105 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
10106
10107 2011-06-14 Joseph Myers <joseph@codesourcery.com>
10108
10109 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
10110 (ada/utils.o): Update dependencies.
10111 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
10112 ../../../libcpp/libcpp.a.
10113 * gcc-interface/utils.c: Include common/common-target.h.
10114 (process_attributes): Use targetm_common.have_named_sections.
10115
10116 2011-06-07 Richard Guenther <rguenther@suse.de>
10117
10118 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
10119 set_sizetype.
10120
10121 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10122
10123 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
10124 TREE_THIS_NOTRAP flag.
10125
10126 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10127
10128 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
10129 Fix thinko.
10130
10131 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10132
10133 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
10134 constants whose full view has discriminants specially.
10135
10136 2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
10137
10138 * gcc-interface/utils.c: Include diagnostic.h.
10139 (gnat_write_global_declarations): Output debug information for all
10140 global type declarations before finalizing the compilation unit.
10141 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
10142
10143 2011-05-25 Jakub Jelinek <jakub@redhat.com>
10144
10145 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
10146
10147 2011-05-25 Kai Tietz <ktietz@redhat.com>
10148
10149 * adaint.c (__gnat_to_canonical_file_list_next): Use array
10150 initialization instead of const/none-const pointer assignment.
10151
10152 2011-05-24 Joseph Myers <joseph@codesourcery.com>
10153
10154 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
10155 $(EXTRA_GNAT1_OBJS).
10156 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
10157 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
10158 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
10159 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
10160 libcommon-target.a instead of prefix.o.
10161
10162 2011-05-21 Joseph Myers <joseph@codesourcery.com>
10163
10164 PR ada/49097
10165 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
10166
10167 2011-05-20 Joseph Myers <joseph@codesourcery.com>
10168
10169 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
10170 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
10171 instead of version.o.
10172
10173 2011-05-18 Kai Tietz <ktietz@redhat.com>
10174
10175 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
10176 boolean_false_node instead of integer_zero_node.
10177 (convert_with_check): Likewise.
10178 * gcc-interface/decl.c (choices_to_gnu): Likewise.
10179
10180 2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
10181
10182 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
10183 type of the parameter is an unconstrained array, convert the actual to
10184 the type of the formal in the In Out and Out cases as well.
10185
10186 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10187
10188 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
10189 call build_function_type_array or build_varargs_function_type_array
10190 instead.
10191 (create_subprog_type): Don't call build_function_type; call
10192 build_function_type_vec instead.
10193
10194 2011-05-11 Nathan Froyd <froydnj@codesourcery.com>
10195
10196 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
10197 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
10198 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
10199
10200 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
10201
10202 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
10203
10204 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
10205 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
10206
10207 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10208
10209 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
10210
10211 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
10212
10213 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
10214 instead of accessing TYPE_ARG_TYPES directly.
10215 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
10216
10217 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10218
10219 PR ada/48844
10220 * gcc-interface/gigi.h (get_variant_part): Declare.
10221 * gcc-interface/decl.c (get_variant_part): Make global.
10222 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
10223 types have the same constant size, are record types and T1 has a
10224 variant part while T2 doesn't.
10225
10226 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
10227
10228 * gcc-interface/utils.c (begin_subprog_body): Do not call
10229 get_pending_sizes.
10230 (end_subprog_body): Likewise.
10231
10232 2011-05-04 Richard Guenther <rguenther@suse.de>
10233
10234 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
10235 int_const_binop.
10236 (pos_to_constructor): Likewise.
10237
10238 2011-05-03 Nathan Froyd <froydnj@codesourcery.com>
10239 Eric Botcazou <ebotcazou@adacore.com>
10240
10241 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
10242 of build_function_type. Adjust calls to...
10243 (build_raise_check): ...this. Do not take a void_tree parameter.
10244 Call build_function_type_list instead of build_function_type.
10245 Fix head comment and swap couple of conditional blocks.
10246
10247 2011-04-30 Eric Botcazou <ebotcazou@adacore.com>
10248
10249 * gnatvsn.ads (Library_Version): Bump to 4.7.
10250 (Current_Year): Bump to 2011.
10251
10252 2011-04-29 Michael Matz <matz@suse.de>
10253
10254 * gcc-interface/misc.c (gnat_handle_option): Set
10255 warn_maybe_uninitialized.
10256
10257 2011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
10258
10259 * gnat_ugn.texi (Complexity Metrics Control): Update link to
10260 the Watson/McCabe paper.
10261
10262 2011-04-23 Jim Meyering <meyering@redhat.com>
10263
10264 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
10265
10266 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10267
10268 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
10269 onto the new type.
10270
10271 2011-04-22 Eric Botcazou <ebotcazou@adacore.com>
10272
10273 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
10274 parameter.
10275 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
10276 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
10277 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
10278 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
10279 <all>: Do not set flags on the reused DECL node coming from an alias.
10280 Set DECL_IGNORED_P on the DECL node built for subprograms if they
10281 don't need debug info here...
10282 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
10283 (gigi): Adjust calls to create_subprog_decl.
10284 (build_raise_check): Likewise.
10285 (establish_gnat_vms_condition_handler): Likewise.
10286 (Compilation_Unit_to_gnu): Likewise.
10287 (gnat_to_gnu): Likewise.
10288
10289 2011-04-21 Eric Botcazou <ebotcazou@adacore.com>
10290
10291 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
10292 (NO_REORDER_ADAFLAGS): New variable.
10293 (EXTRA_GNATTOOLS): Always define.
10294 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
10295 Clean up and adjust list of files compiled with special options.
10296 * gcc-interface/Make-lang.in: Likewise.
10297 (ada/decl.o): Cosmetical change.
10298 (ada/misc.o): Remove dependency on $(PLUGIN_H).
10299
10300 2011-04-20 Jim Meyering <meyering@redhat.com>
10301
10302 * initialize.c (__gnat_initialize): Remove useless if-before-free.
10303
10304 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10305
10306 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
10307 $(CFLAGS) on the link line.
10308
10309 2011-04-17 Eric Botcazou <ebotcazou@adacore.com>
10310
10311 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
10312 padded type built for the return type if it is unconstrained.
10313
10314 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
10315
10316 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
10317
10318 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
10319
10320 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
10321 before calling TREE_CHAIN.
10322 * gcc-interface/misc.c (gnat_init_ts): New function.
10323 (LANG_HOOKS_INIT_TS): Define.
10324
10325 2011-04-12 Martin Jambor <mjambor@suse.cz>
10326
10327 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
10328 instead of cgraph_node.
10329
10330 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10331
10332 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
10333 alignment on fields of the RETURN type built for the Copy-In Copy-Out
10334 mechanism.
10335
10336 2011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10337
10338 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10339 of aggregate types that contain a placeholder.
10340
10341 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10342
10343 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
10344 TYPE_ARG_TYPES.
10345 (handle_type_generic_attribute): Likewise.
10346
10347 2011-04-04 Eric Botcazou <ebotcazou@adacore.com>
10348
10349 PR ada/47163
10350 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10351
10352 2011-04-04 Kai Tietz <ktietz@redhat.com>
10353
10354 PR ada/47163
10355 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10356 to flag value.
10357
10358 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10359
10360 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10361 type case, do not strip a padding type around the array type.
10362
10363 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10364
10365 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10366 types.
10367
10368 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10369
10370 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10371 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
10372 code for -feliminate-unused-debug-types.
10373 (gnat_post_options): Likewise.
10374
10375 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10376
10377 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10378 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10379 distinct copy.
10380
10381 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10382
10383 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10384 DECL_ARTIFICIAL flag on enumeration types.
10385
10386 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10387
10388 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10389 fat pointer types artificial unconditionally.
10390 <E_Array_Subtype>: Attach the base array type as a parallel type if it
10391 isn't artificial.
10392
10393 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10394
10395 * gcc-interface/gigi.h (get_dummy_type): Declare.
10396 (build_dummy_unc_pointer_types): Likewise.
10397 (finish_fat_pointer_type): Likewise.
10398 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10399 fat pointer type has been built, complete it in place.
10400 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10401 and thin pointers. Remove useless variable.
10402 (finish_fat_pointer_type): Make global and move to...
10403 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10404 (get_dummy_type): New function.
10405 (build_dummy_unc_pointer_types): Likewise.
10406 (gnat_pushdecl): Propage the name to the anonymous variants only.
10407 (update_pointer_to): Only adjust the pointer types in the unconstrained
10408 array case.
10409
10410 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10411
10412 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10413 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10414 if this is a Taft amendment type and the full declaration is available.
10415 * gcc-interface/trans.c (process_type): Likewise.
10416 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10417 (process_freeze_entity): Likewise.
10418 * gcc-interface/utils.c (dummy_global): New static variable.
10419 (gnat_write_global_declarations): If there are types declared as used
10420 at the global level, insert them in the global hash table.
10421
10422 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10423
10424 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10425 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10426 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10427 copy.
10428 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
10429 flag of the type accordingly.
10430 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10431
10432 2011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10433
10434 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10435 finalizing types when updating the pointers to the designated type.
10436 <all>: Finalize the deferred types even if we didn't defer processing
10437 of incomplete types in this invocation.
10438
10439 2011-04-01 Olivier Hainque <hainque@adacore.com>
10440 Nicolas Setton <setton@adacore.com>
10441 Eric Botcazou <ebotcazou@adacore.com>
10442
10443 * gcc-interface/misc.c (gnat_descriptive_type): New function.
10444 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10445
10446 2011-03-28 Kai Tietz <ktietz@redhat.com>
10447
10448 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
10449 Windows targets.
10450 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10451 * system-mingw.ads (System): Change ZCX_By_Default default to True.
10452
10453 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
10454
10455 2011-03-28 Tristan Gingold <gingold@adacore.com>
10456
10457 PR ada/44431
10458 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10459 Use ada output of gnatbind.
10460 (ada/b_gnatb.adb): Ditto.
10461 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10462 (ada.mostlyclean, ada.stage1)
10463 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10464 (ada.stagefeedback): Adjust.
10465 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
10466 Use ada output of gnatbind.
10467 (b_gnatm.adb): Ditto.
10468 (b_gnatl.o, b_gnatm.o): New rules.
10469
10470 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10471
10472 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10473 for the padded type built to support a specified size or alignment.
10474
10475 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10476
10477 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10478 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10479 unconditionally to the end of the unit when the designated type is
10480 limited_with'ed.
10481 <all>: Rename local variable. Attempt to un-defer types only and do it
10482 for limited_with'ed types as well.
10483 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10484 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10485 consistently and remove redundant call to finalize_from_with_types.
10486
10487 2011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10488
10489 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10490 subprograms without a previous spec declared in the same unit.
10491 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10492 subprograms at the end of the unit instead of at the beginning.
10493 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10494 isn't public for the special handling of non-inline functions nested
10495 inside inline external functions.
10496
10497 2011-03-25 Jeff Law <law@redhat.com>
10498
10499 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
10500
10501 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10502
10503 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10504 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10505 to compute Set_Size_Depends_On_Discriminant.
10506 (Layout_Type): Call it on array types in back-end layout mode.
10507 * sem_util.adb (Requires_Transient_Scope): Return true for array
10508 types only if the size depends on the value of discriminants.
10509 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10510 type if the RHS is a call to a function that returns an unconstrained
10511 type with default discriminant.
10512
10513 2011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10514
10515 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10516 non-conversion to the nominal result type at the end.
10517
10518 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10519
10520 * gcc-interface/trans.c (create_temporary): New function taken from...
10521 (create_init_temporary): ...here. Call it.
10522 (call_to_gnu): Create the temporary for the return value early, if any.
10523 Create it for a function with copy-in/copy-out parameters if there is
10524 no target; in other cases of copy-in/copy-out, use another temporary.
10525 Push the new binding level lazily. Add and rename local variables.
10526
10527 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10528
10529 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10530 error message.
10531 (set_rm_size): Likewise.
10532
10533 2011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10534
10535 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10536 for the padded type built in order to support a specified alignment.
10537 Fix incorrect formatting.
10538
10539 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10540
10541 PR bootstrap/48216
10542 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10543
10544 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10545
10546 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10547 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10548 to the end of the list. Adjust recursive call. Rename local variable.
10549 If REORDER is true, reorder components of the record type.
10550 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10551 components_to_record and adjust the parameter list.
10552
10553 2011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10554
10555 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10556 disabled, use the variable for bounds of loop iteration scheme.
10557
10558 2011-03-21 Kai Tietz <ktietz@redhat.com>
10559
10560 PR target/12171
10561 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
10562
10563 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10564
10565 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10566 out whether the expression is read-only. Short-circuit placeholder
10567 case and rename a couple of local variables.
10568
10569 2011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10570
10571 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10572 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10573 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10574 (convert): Deal with conversions from a smaller form type specially.
10575
10576 2011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10577
10578 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10579 its argument, except for the special -I- switch.
10580
10581 2011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10582
10583 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10584 "Ada Issues".
10585
10586 2011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10587
10588 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10589
10590 2011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10591
10592 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10593 GNAT_FORMAL.
10594 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10595 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10596 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10597 Do not generate the check directly, instead instantiate the template
10598 check present in the descriptor.
10599 (make_descriptor_field): Move around.
10600 (build_vms_descriptor32): Build a template check in the POINTER field.
10601 (build_vms_descriptor): Remove useless suffixes.
10602 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10603
10604 2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10605
10606 PR bootstrap/47467
10607 * targext.c: Include target files if IN_RTS is defined.
10608
10609 2011-01-26 Richard Guenther <rguenther@suse.de>
10610
10611 PR bootstrap/47467
10612 * targext.c: Include config.h.
10613 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10614 dependency.
10615
10616 2011-01-04 Pascal Obry <obry@adacore.com>
10617 Eric Botcazou <ebotcazou@adacore.com>
10618
10619 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10620
10621 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10622
10623 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10624 end-of-case on the end label and its associated gotos, if any.
10625
10626 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10627
10628 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10629 expressions of the parameter cache within the statement group of
10630 the CICO mechanism.
10631
10632 2011-01-04 Olivier Hainque <hainque@adacore.com>
10633 Eric Botcazou <ebotcazou@adacore.com>
10634
10635 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10636 (set_end_locus_from_node): New function.
10637 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10638 make and the function end_locus.
10639 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10640 for the elaboration subprogram.
10641 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10642 set the end_locus of the expression as well.
10643
10644 2011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10645
10646 PR ada/47131
10647 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10648 variables that are referenced in exception handlers volatile.
10649
10650
10651 \f
10652 Copyright (C) 2011 Free Software Foundation, Inc.
10653
10654 Copying and distribution of this file, with or without modification,
10655 are permitted in any medium without royalty provided the copyright
10656 notice and this notice are preserved.