]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
c5bc3df6
JM
12011-08-24 Joseph Myers <joseph@codesourcery.com>
2
3 * gcc-interface/Make-lang.in (CFLAGS-ada/tracebak.o)
4 (CFLAGS-ada/targext.o, CFLAGS-ada/cio.o, CFLAGS-ada/init.o)
5 (CFLAGS-ada/initialize.o, CFLAGS-ada/raise.o): New.
6 (ada/tracebak.o, ada/targext.o, ada/cio.o, ada/init.o)
7 (ada/initialize.o, ada/raise.o): Remove explicit compilation rules.
8
e3aa9eba
RO
92011-08-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10
11 * gcc-interface/Makefile.in (PICFLAG_FOR_TARGET): New.
12 (GNATLIBCFLAGS_FOR_C): Replace
13 TARGET_LIBGCC2_CFLAGS by PICFLAG_FOR_TARGET.
14 (gnatlib-shared-default, gnatlib-shared-dual-win32)
15 (gnatlib-shared-win32, gnatlib-shared-darwin, gnatlib-shared)
16 (gnatlib-sjlj, gnatlib-zcx): Likewise.
17
f446d60e
EB
182011-08-07 Eric Botcazou <ebotcazou@adacore.com>
19
20 * gcc-interface/Makefile.in (raise-gcc.o): Fix previous change.
21
588c8f48
EB
22 * gcc-interface/gigi.h (enumerate_modes): Fix formatting.
23
24 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Revert latest change.
25
28d711bf
NR
262011-08-05 Nicolas Roche <roche@adacore.com>
27
28 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
29 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
30 canadian cross.
31 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
32
993f8920
AC
332011-08-05 Matthew Heaney <heaney@adacore.com>
34
35 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
36 subprogram bodies declared out-of-order.
37
382011-08-05 Yannick Moy <moy@adacore.com>
39
40 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
41 entities directly in package Standard, otherwise skip the standard
42 prefix.
43
9b3956dd
RD
442011-08-05 Robert Dewar <dewar@adacore.com>
45
46 * a-cbmutr.adb: Minor reformatting
47 (Allocate_Node): refactor node allocation algorithm
48
492011-08-05 Robert Dewar <dewar@adacore.com>
50
51 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
52 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
53 mode.
54 (Analyze_Pragma, case Check_Policy): Ditto.
55 * sem_prag.ads (Check_Disabled): New function
56 * snames.ads-tmpl: Add Name_Disable.
57
582011-08-05 Robert Dewar <dewar@adacore.com>
59
60 * gnat_rm.texi: Document implementation-defined policy DISABLE for
61 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
62
79e705d6
AC
632011-08-05 Ed Schonberg <schonberg@adacore.com>
64
65 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
66 that appears in a generic formal part and applies to a formal
67 subprogram.
68
692011-08-05 Robert Dewar <dewar@adacore.com>
70
71 * a-cbmutr.ads: Minor reformatting.
72
23b6deca
AC
732011-08-05 Matthew Heaney <heaney@adacore.com>
74
75 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
76 to check count, check sign of value instead.
77 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
78 (Copy_Subtree): allocate copy of source element
79 (Equal_Subtree): compare elements, not access objects
80
812011-08-05 Vincent Celier <celier@adacore.com>
82
83 * gnat_ugn.texi: Fix VMS alternative.
84
a2773bd3
AC
852011-08-05 Thomas Quinot <quinot@adacore.com>
86
87 * sem_ch11.adb: Add comment.
88
892011-08-05 Robert Dewar <dewar@adacore.com>
90
91 * exp_util.adb: Minor comment fix.
92
932011-08-05 Robert Dewar <dewar@adacore.com>
94
95 * scng.adb (Error_Unterminated_String): Improve flag position when
96 comma present.
97
982011-08-05 Matthew Heaney <heaney@adacore.com>
99
100 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
101 tree containers).
102 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
103 multiway tree containers.
104
1052011-08-05 Robert Dewar <dewar@adacore.com>
106
107 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
108 * stylesw.adb: Implement -gnatyC to control comment spacing
109 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
110 -gnatyc/C).
111 * usage.adb: Add line for -gnatyC.
112
1132011-08-05 Robert Dewar <dewar@adacore.com>
114
f446d60e 115 * gnat_ugn.texi: Document -gnatyC.
a2773bd3
AC
116 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
117 synonym for COMMENTS2).
118
dedac3eb
RD
1192011-08-05 Robert Dewar <dewar@adacore.com>
120
121 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
122 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
123 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
124 a-comutr.ads, lib-xref.adb: Minor reformatting.
125
1262011-08-05 Robert Dewar <dewar@adacore.com>
127
128 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
129 warning if there is an exception handler present.
130
7c62a85a
AC
1312011-08-05 Pascal Obry <obry@adacore.com>
132
133 * a-iteint.ads: Fix copyright year.
134
1352011-08-05 Thomas Quinot <quinot@adacore.com>
136
137 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
138 statement SCO for a USE clause or a representation clause.
139
1402011-08-05 Yannick Moy <moy@adacore.com>
141
142 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
143 between body and spec for stub.
144 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
145 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
146 pragma precondition or postcondition, for which the enclosing
147 subprogram or package in the AST is not the desired one, return empty.
148
e49208a9
AC
1492011-08-05 Thomas Quinot <quinot@adacore.com>
150
151 * g-expect.adb: Minor reformatting.
152
1532011-08-05 Bob Duff <duff@adacore.com>
154
155 * a-fihema.adb: Comment out OS_Lib.
156
1572011-08-05 Matthew Heaney <heaney@adacore.com>
158
159 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
160 (unbounded multiway tree containers) and a-iteint.ads.
161 * a-comutr.ads, a-comutr.adb:
162 This is the new Ada 2012 unit for unbounded multiway tree containers
163 * a-cimutr.ads, a-cimutr.adb
164 This is the new Ada 2012 unit for indefinite multiway tree containers
165 * a-iteint.ads: New file.
166
201cdb74
RO
1672011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
168
f446d60e 169 * gcc-interface/Makefile.in (raise-gcc.o): Search $(srcdir)/../libgcc.
201cdb74 170
d50f4827
AC
1712011-08-05 Bob Duff <duff@adacore.com>
172
173 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
174 subpools.
175 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
176
1772011-08-05 Ed Schonberg <schonberg@adacore.com>
178
179 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
180 general indexing aspects of Ada2012. Called when analyzing indexed
181 components when other interpretations fail.
182 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
183 in an expression context where overloading is meaningful. This excludes
184 the occurrence in an aspect specification (efficiency only).
185 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
186 related to iterators can be set by an attribute specification, but
187 cannot be queried.
188 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
189 Constant_Indexing and Variable_Indexing.
190 (Check_Indexing_Functions): New procedure to perform legality checks.
191 Additional semantic checks at end of declarations.
192
efe05dfc
AC
1932011-08-05 Sergey Rybin <rybin@adacore.com>
194
195 * tree_io.ads: Update ASIS_Version_Number because of the change of the
196 order of calling Tree_Write/Tree_Read routines made for aspects.
197
1982011-08-05 Bob Duff <duff@adacore.com>
199
200 * a-fihema.adb (Finalize): Fix race condition.
201
5f9cdefe
AC
2022011-08-05 Yannick Moy <moy@adacore.com>
203
204 * sem_ch12.adb (Analyze_Package_Instantiation,
205 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
206 mode.
207
2082011-08-05 Ed Schonberg <schonberg@adacore.com>
209
210 * sem_type.adb (Specific_Type): in an instance, the type-specific
211 operand of an equality check that involves null may have a private
212 type. Use full view to determine legality of construct.
213
822868aa
AC
2142011-08-05 Vincent Celier <celier@adacore.com>
215
216 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
217 delete or close the file when the call to gnatmake was successful.
218
2192011-08-05 Yannick Moy <moy@adacore.com>
220
221 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
222 Global_Discard_Names.
223
2242011-08-05 Ed Schonberg <schonberg@adacore.com>
225
226 * sinfo.ads: comments on use of entity field for aspect specifications.
227
2282011-08-05 Ed Schonberg <schonberg@adacore.com>
229
230 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
231 node is not itself an entity but a selected component, it is a
232 rewritten parameterless call to an en enclosing synchronized operation,
233 and this expansion will be performed again in the instance, so there is
234 no global information to preserve.
235
44a10091
AC
2362011-08-05 Javier Miranda <miranda@adacore.com>
237
238 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
239 for renamings of predefined primitives.
240 (In_Predef_Prims_DT): New subprogram.
241
2422011-08-05 Ed Schonberg <schonberg@adacore.com>
243
244 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
245 possible interpretation of name is a reference type, add an
246 interpretation that is the designated type of the reference
247 discriminant of that type.
248 * sem_res.adb (resolve): If the interpretation imposed by context is an
249 implicit dereference, rewrite the node as the deference of the
250 reference discriminant.
251 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
252 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
253 parent type or base type.
254 * sem_ch4.adb (Process_Indexed_Component,
255 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
256 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
257 Check for implicit dereference.
258 (List_Operand_Interps): Indicate when an implicit dereference is
259 ambiguous.
260 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
261
2622011-08-05 Thomas Quinot <quinot@adacore.com>
263
264 * scos.ads: Update documentation of SCO table. Pragma statements can now
265 be marked as disabled (using 'p' instead of 'P' as the statement kind).
266 * par_sco.ads, par_sco.adb: Implement the above change.
267 (Process_Decisions_Defer): Generate a P decision for the first parameter
268 of a dyadic pragma Debug.
269 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
270 necessary.
271 * put_scos.adb: Code simplification based on above change.
272
bb3c784c
AC
2732011-08-05 Robert Dewar <dewar@adacore.com>
274
275 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
276 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
277 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
278 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
279
2802011-08-05 Bob Duff <duff@adacore.com>
281
282 * a-stunau.ads, g-spipat.adb: Update comments.
283
36f686f9
BD
2842011-08-05 Bob Duff <duff@adacore.com>
285
286 * a-fihema.ads: Minor comment fix.
287 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
288 correct.
289 (Attach, Detach): Remove some unnecessary code.
290 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
291
7882673f
BD
2922011-08-05 Bob Duff <duff@adacore.com>
293
294 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
295 allocation for Objects component. This simplifies the code somewhat. It
296 is also a little more efficient in the not-so-unusual case where there
297 are no controlled objects allocated.
298 Make Finalization_Started flag atomic.
299 (Finalize): Avoid unnecessary detachment of items from the list.
300 (pcol): Minor cleanup.
301
d34cd274
AC
3022011-08-05 Ed Schonberg <schonberg@adacore.com>
303
304 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
305 package whose name is the same as that of the generic unit, or its
306 ultimate prefix.
307
3082011-08-05 Bob Duff <duff@adacore.com>
309
310 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
311 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
312 Minor comment fixes.
313
00332244
AC
3142011-08-05 Arnaud Charlet <charlet@adacore.com>
315
316 * make.adb (Linking_Phase): No longer need to set source search path
317 before calling gnatlink in CodePeer mode.
318 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
319 gcc in CodePeer mode, since the binder generated file no longer has a
320 'with Main'.
321 * switch.ads, switch.adb (Is_Language_Switch): Removed.
322 * switch-c.adb: Update comment.
323
3242011-08-05 Thomas Quinot <quinot@adacore.com>
325
326 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
327
3282011-08-05 Nicolas Roche <roche@adacore.com>
329
330 * gnat_ugn.texi: Fix minor syntax error issue.
331
3322011-08-05 Vincent Celier <celier@adacore.com>
333
334 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
335 delete or close the file when the call to gnatmake returns a non
336 successful return code.
337
3382011-08-05 Ed Schonberg <schonberg@adacore.com>
339
340 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
341 check, indicate that the copy of the original node does not come from
342 source, to prevent an infinite recursion of the expansion.
343
3442011-08-05 Johannes Kanig <kanig@adacore.com>
345
346 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
347 VC generation for subprogram bodies.
348
3492011-08-05 Yannick Moy <moy@adacore.com>
350
351 * einfo.ads: Typo.
352 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
353 the base type with the smallest allowed base type.
354
3552011-08-05 Sergey Rybin <rybin@adacore.com>
356
357 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
358 aspects.
359
3602011-08-05 Ed Schonberg <schonberg@adacore.com>
361
362 * sem_ch12.ads: minor comment updates.
363
3642011-08-05 Ed Schonberg <schonberg@adacore.com>
365
366 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
367 instantiation and a formal package the compiler generates a package
368 renaming declaration so that the generic name within the declaration
369 is interpreted as a renaming of the instance. At the end of a formal
370 package declaration, this renaming must become invisible.
371
0da80d7d
AC
3722011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
373
374 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
375 comparison and rely on concrete entities instead.
376
3772011-08-05 Ed Schonberg <schonberg@adacore.com>
378
379 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
380 and discriminants, to indicate that the type has an access discriminant
381 that supports implicit dereference.
382 * snames.ads-tmpl: Add names of aspects and attributes related to
383 Ada2012 iterators: constant_indexing, default_iterator,
384 iterator_element, implicit_dereference, variable_indexing.
385 * aspects.ads, aspects.adb: entries for iterator-related aspects.
386 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
387 iterator-related aspects.
388 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
389
3902011-08-05 Sergey Rybin <rybin@adacore.com>
391
392 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
393 metrics in gnatmetric to cover new kinds of coupling mentrics.
394
3952011-08-05 Steve Baird <baird@adacore.com>
396
397 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
2c7f9cc0 398 of calling the user-defined main subprogram.
0da80d7d
AC
399 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
400 is set) Call_Main_Subprogram ahead of, as opposed to
401 inside of, Main.
402 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
403 generation of a "with" of the user-defined main subprogram.
404 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
405 (which is now called from Gen_Main instead).
406
73242473
AC
4072011-08-05 Emmanuel Briot <briot@adacore.com>
408
409 * projects.texi: Added reference to the Makefile package.
410
4112011-08-05 Thomas Quinot <quinot@adacore.com>
412
413 * exp_ch7.adb: Minor comment rewording.
414
4152011-08-05 Ed Falis <falis@adacore.com>
416
417 * env.c: Fix comment.
418
4192011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
420
421 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
422 character comparison and rely on concrete entities instead.
423
97ed5872
AC
4242011-08-05 Ed Schonberg <schonberg@adacore.com>
425
426 * sem_ch3.adb: (Check_Private_Overriding): better error message,
427 suggested by AI95-0068.
428
4292011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
430
431 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
432 the two potential initialization calls. This accounts for any
433 access-before-elaboration checks which may precede the initialization
434 calls.
435 (Next_Suitable_Statement): New routine. Returns the next real statement
436 after the input node while skipping generated checks.
437 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
438 with comment on usage.
439 Do not generate Elaborate_All when the trigger is a finalization call
440 coming from a type init proc.
441 (Check_Elab_Call): Propagate the initialization procedure context to
442 subsequent calls to Check_A_Call.
443 (Check_Internal_Call_Continue): Propagate the initialization procedure
444 context to subsequent calls to Check_Elab_Call.
445 (Is_Finalization_Procedure): New routine. Returns True if the input
446 entity denotes a [Deep_]Finalize routine.
447 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
448 along with comment on usage.
449
4502011-08-05 Vadim Godunko <godunko@adacore.com>
451
452 * s-atocou.ads: Add list of supported platforms.
453
4542011-08-05 Yannick Moy <moy@adacore.com>
455
456 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
457
458 * opt.ads (Disable_ALI_File): new Boolean flag
459 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
460
4612011-08-05 Ed Falis <falis@adacore.com>
462
463 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
464 environ is properly defined.
465
4662011-08-05 Vincent Celier <celier@adacore.com>
467
468 * make.adb (Compilation_Phase): Exit immediately when all objects have
469 been found up to date, to avoid multiple exit messages.
470 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
471 same project for languages with no compiler.
472 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
473 -eI.
9aff36e9
RD
4742011-08-05 Robert Dewar <dewar@adacore.com>
475
476 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
477 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
478 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
479 s-atocou-builtin.adb: Minor reformatting.
480
406935b6
AC
4812011-08-05 Yannick Moy <moy@adacore.com>
482
483 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
484 if the node to wrap is a pragma check, this node and enclosed
485 expression are not expanded, so do not apply any transformations here.
486 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
487 introducing transient scopes.
488
4892011-08-05 Jose Ruiz <ruiz@adacore.com>
490
491 * adaint.c (__gnat_set_writable, __gnat_set_readable,
492 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
493 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
494 routine is available, so we use the default implementation of these
495 functions.
496 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
497 support for copying attributes on VxWorks 6.
498
4992011-08-05 Yannick Moy <moy@adacore.com>
500
501 * debug.adb: Remove use of -gnatd.D.
502 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
503 * opt.ads: Simplify variables for ALFA mode, to keep one only
504 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
505 to ALFA mode.
506
5072011-08-05 Vincent Celier <celier@adacore.com>
508
509 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
510 Builder'Default_Switches.
511
5122011-08-05 Vincent Celier <celier@adacore.com>
513
514 * makeusg.adb: Add lines for --create-map-file switches.
515
5162011-08-05 Ed Schonberg <schonberg@adacore.com>
517
518 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
519 profile is incomplete and the full view is available, replace it with
520 the full view.
521 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
522 incomplete, freezing the subprogram is delayed until the full view is
523 frozen.
524 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
525 fixed-point multiplication operator and the predefined operator is
526 resolved in favor of the user-defined one.
527
96c891b3
RO
5282011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
529
530 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
531 CONST_CAST.
532
276e7ed0
AC
5332011-08-04 Ed Schonberg <schonberg@adacore.com>
534
535 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
536 whether a type lacks user-defined Read or Write operations, or has a
537 component that lacks them.
538 * sem_attr.adb (Check_Stream_Attribute): if restriction
539 No_Default_Stream_Attributes is active, verify that all subcomponent
540 types of the target have user-defined stream operations, and report
541 error otherwise.
542 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
543 * exp_strm.adb: Build_Elementary_Input_Call,
544 Build_Elementary_Write_Call): remove checks for restriction
545 No_Default_Stream_Attributes, now checked in semantics.
546
5472011-08-04 Vincent Celier <celier@adacore.com>
548
549 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
550 switches on the command line, look for all valid --RTS switches in the
551 Builder switches and for each language use the first runtime name found
552 to invoke gprconfig.
553 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
554 command line and there is no auto-configuration.
555 (Runtime_Name_Set_For): New function.
556
5572011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
558
559 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
560 elaborate initialization expression for variable Abort when processing
561 a package body or a declaration.
562 (Create_Finalizer): Propagate the package context when creating the
563 exception-related variables.
564 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
565 For_Package along with usage comment.
566
19172ae9
AC
5672011-08-04 Arnaud Charlet <charlet@adacore.com>
568
569 * gcc-interface/Makefile.in: Clean up targets.
570 Enable new package for atomic counters and copy-on-write implementation
571 of unbounded strings on x86 platforms.
572 * gcc-interface/Make-lang.in: Update dependencies.
573
0319cacc
AC
5742011-08-04 Robert Dewar <dewar@adacore.com>
575
576 * exp_ch7.adb: Minor reformatting.
577
5782011-08-04 Robert Dewar <dewar@adacore.com>
579
580 * exp_strm.adb: Minor reformatting.
581
5822011-08-04 Vadim Godunko <godunko@adacore.com>
583
584 * s-atocou.adb: Replace by dummy version and use on targets where atomic
585 operations are not supported.
586 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
587 * s-atocou-x86.adb: New file.
588 * Makefile.rtl: Add s-atocou.o file
589
5902011-08-04 Arnaud Charlet <charlet@adacore.com>
591
592 * make.adb (Compile): Move setting of CodePeer_Mode to ...
593 (Compilation_Phase): ... here.
594 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
595
5962011-08-04 Thomas Quinot <quinot@adacore.com>
597
598 * Make-generated.in: Fix minor typo in comment.
599
26e7e1a0
AC
6002011-08-04 Thomas Quinot <quinot@adacore.com>
601
602 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
603 the project path.
604
6052011-08-04 Robert Dewar <dewar@adacore.com>
606
607 * a-coinho.adb: Minor reformatting.
608
6092011-08-04 Robert Dewar <dewar@adacore.com>
610
611 * a-coinho.ads: Minor reformatting.
612
6132011-08-04 Vadim Godunko <godunko@adacore.com>
614
615 * s-atocou.ads, s-atocou.adb: New files.
616 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
617 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
618 direct use of GCC's atomic builtins and replace them by use of new
619 atomic counter package.
620
6212011-08-04 Ed Schonberg <schonberg@adacore.com>
622
623 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
624
6252011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
626
627 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
628 with a call to Get_External_Tag.
629 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
630 subprogram usage. Remove the guard against package declarations and
631 bodies since Build_Cleanup_Statements is no longer invoked in that
632 context.
633 (Build_Components): Initialize Tagged_Type_Stmts when the context
634 contains at least one library-level tagged type.
635 (Build_Finalizer): New local variables Has_Tagged_Types and
636 Tagged_Type_Stmts along with associated comments on usage. Update the
637 logic to include tagged type processing.
638 (Create_Finalizer): Insert all library-level tagged type unregistration
639 code before the jump block circuitry.
640 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
641 (Expand_N_Package_Declaration): Remove the call to
642 Build_Cleanup_Statements.
643 (Process_Tagged_Type_Declaration): New routine. Generate a call to
644 unregister the external tag of a tagged type.
645 (Processing_Actions): Reimplemented to handle tagged types.
646 (Process_Declarations): Detect the declaration of a library-level
647 tagged type and carry out the appropriate actions.
648 (Unregister_Tagged_Types): Removed. The machinery has been directly
649 merged with Build_Finalizer.
650
7483c888
AC
6512011-08-04 Robert Dewar <dewar@adacore.com>
652
653 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
654 gnatls.adb, exp_ch3.adb: Minor reformatting.
655
6562011-08-04 Marc Sango <sango@adacore.com>
657
658 * sem_attr.adb (Analyze_Attribute): Replace the message
659 "invisible attribute of}" of the spark restriction violation in
660 attribute reference by the simple message "invisible attribute of type".
661 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
662 two insertion characters: '&' and '}'.
663
6642011-08-04 Vadim Godunko <godunko@adacore.com>
665
666 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
667 * a-coinho.ads, a-coinho.adb: New file.
668 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
669
5207696c
AC
6702011-08-04 Nicolas Roche <roche@adacore.com>
671
672 * alfa_test.adb: Not all ali files are containing alfa information even
673 if compiled with -gnatd.F. So suppress warning about missing ALFA
674 information.
675
6762011-08-04 Yannick Moy <moy@adacore.com>
677
678 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
679 scope.
680 * put_alfa.adb: Check that scope name is not empty.
681
6822011-08-04 Ed Schonberg <schonberg@adacore.com>
683
684 * exp_ch3.adb (Stream_Operation_Ok): new predicate
685 Needs_Elementary_Stream_Operation, to determine whether user-defined
686 Read and Write attributes are available for the elementary components
687 of the given type. If only the predefined attributes are available,
688 then when restriction No_Default_Stream_Attributes is active the
689 predefined stream attributes for the composite type cannot be created.
690
6912011-08-04 Robert Dewar <dewar@adacore.com>
692
693 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
694 Put routines in alpha order
695
2bd2d858
JR
6962011-08-04 Jose Ruiz <ruiz@adacore.com>
697
698 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
699 * gcc-interface/Make-lang.in: Update dependencies.
700
8fae6016
AC
7012011-08-04 Arnaud Charlet <charlet@adacore.com>
702
703 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
704 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
705 gnat1why).
706
a54d0eb4
AC
7072011-08-04 Robert Dewar <dewar@adacore.com>
708
709 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
710 lib-xref-alfa.adb: Minor reformatting.
711
7122011-08-04 Marc Sango <sango@adacore.com>
713
714 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
715 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
716 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
717 mode.
718
7192011-08-04 Tristan Gingold <gingold@adacore.com>
720
721 * bindgen.adb (Gen_Adainit_C): Remove.
722 (Gen_Adafinal_C): Ditto.
723 (Gen_Elab_Externals_C): Ditto.
724 (Gen_Elab_Calls_C): Ditto.
725 (Gen_Elab_Order_C): Ditto.
726 (Gen_Elab_Defs_C): Ditto.
727 (Gen_Finalize_Library_C): Ditto.
728 (Gen_Finalize_Library_Defs_C): Ditto.
729 (Gen_Main_C): Ditto.
730 (Gen_Output_File_C): Ditto.
731 (Gen_Restrictions_C): Ditto.
732 (Gen_Versions_C): Ditto.
733 (Write_Info_Ada_C): Ditto.
734 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
735 (Gen_Output_File): Do not force Ada_Bind_File anymore.
736 Always call Gen_Output_File_Ada.
737 * gnatlink.adb (Begin_Info): Now a constant.
738 (End_Info): Ditto.
739 (Ada_Bind_File): Remove
740 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
741 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
742 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
743 * opt.ads (Ada_Bind_File): Remove.
744
7452011-08-04 Thomas Quinot <quinot@adacore.com>
746
747 * projects.texi: Document target-specific directory in default project
748 path for gnatmake.
749
7502011-08-04 Thomas Quinot <quinot@adacore.com>
751
752 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
753 path in all cases .
754
24558db8
AC
7552011-08-04 Yannick Moy <moy@adacore.com>
756
757 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
758 opt.ads, lib-xref.ads: Code clean up.
759
7602011-08-04 Yannick Moy <moy@adacore.com>
761
762 * gnat_rm.texi: Update description of Test_Case
763 * gnat_ugn.texi: Typo.
764
7652011-08-04 Ed Falis <falis@adacore.com>
766
767 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
768
7692011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
770
771 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
772 it is of type Root_Controlled. This action eliminates fields Prev and
773 Next from type equality.
774
7752011-08-04 Yannick Moy <moy@adacore.com>
776
777 * lib-xref-alfa.adb: Correct typo.
778
7792011-08-04 Matthew Heaney <heaney@adacore.com>
780
781 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
782 component.
783
1f9939b5
AC
7842011-08-04 Yannick Moy <moy@adacore.com>
785
786 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
787 (Analyze_Pragma): allow static string expression for name of Test_Case,
788 instead of simply string literals.
789 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
790 expressions.
791
7922011-08-04 Vincent Celier <celier@adacore.com>
793
794 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
795 case suffixes to find truncated main sources.
796
7972011-08-04 Tristan Gingold <gingold@adacore.com>
798
799 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
800 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
801 (Compute_Current_Task): Ditto.
802
8032011-08-04 Tristan Gingold <gingold@adacore.com>
804
805 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
806
8072011-08-04 Yannick Moy <moy@adacore.com>
808
809 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
810 library-level constant.
811 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
812 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
813 used as selector of parameter association, in ALFA mode.
814
15d8a51d
AC
8152011-08-04 Robert Dewar <dewar@adacore.com>
816
817 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
818 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
819 reformatting.
820
8212011-08-04 Arnaud Charlet <charlet@adacore.com>
822
823 * make.adb (Linking_Phase): Set source search path before calling
824 gnatlink in CodePeer mode.
825
f46faa08
AC
8262011-08-04 Javier Miranda <miranda@adacore.com>
827
828 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
829 Remove code which takes care of building TSDs.
830 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
831 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
832 the accessibility check in VM targets.
833 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
834 (Building_Static_DT): Now returns false for VM targets.
835 (Build_VM_TSDs): Removed.
836 (Expand_Interface_Conversion): Generate missing runtime check for
837 conversions to interface types whose target type is unknown at compile
838 time.
839 (Make_VM_TSD): Add missing code to disable the generation of calls to
840 Check_TSD if the tagged type is not defined at library level, or not
841 has a representation clause specifying its external tag, or -gnatdQ is
842 active.
843 * exp_disp.ads (Build_VM_TSDs): Removed.
844 (Make_VM_TSDs): Spec relocated from exp_disp.adb
845 * sem_disp.adb (Check_Dispatching_Operation): No code required to
846 register primitives in the dispatch tables in VM targets.
847 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
848 initialization of class-wide interface objects in VM targets.
849 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
850 of Make_DT).
851
8522011-08-04 Jerome Lambourg <lambourg@adacore.com>
853
854 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
855 when dotnet-ld cannot be found.
856
8572011-08-04 Arnaud Charlet <charlet@adacore.com>
858
859 * bindgen.adb: Simplify significantly generation of binder body file in
860 CodePeer mode.
861 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
862 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
863 not expanded).
864
2ba7e31e
AC
8652011-08-04 Yannick Moy <moy@adacore.com>
866
867 * sem_prag.adb, sem.ads: Code cleanup.
868
8692011-08-04 Tristan Gingold <gingold@adacore.com>
870
871 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
872 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
873 results if possible.
874 * s-stusta.adb (Print): Adjust after changes in s-stausa.
875 * gnat_ugn.texi: Update dynamic stack usage section.
876
8772011-08-04 Steve Baird <baird@adacore.com>
878
879 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
880 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
881 contains only a call to the user-defined main subprogram.
882 (Gen_Main_Ada) - If CodePeer_Mode is set, then
883 call the "wrapper" subprogram instead of directly
884 calling the user-defined main subprogram.
885
8862011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
887
888 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
889 alternatives of a case statement for controlled objects. Rename local
890 variable A to Dead_Alt.
891 (Expand_N_If_Statement): Check the then and else statements of an if
892 statement for controlled objects. Check the then statements of all
893 elsif parts of an if statement for controlled objects.
894 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
895 objects.
896 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
897 detects a loop associated with the expansion of an array object.
898 Augment the processing of the loop statements to account for a possible
899 wrap done by Process_Statements_For_Controlled_Objects.
900 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
901 statements and abortable part of an asynchronous select for controlled
902 objects.
903 (Expand_N_Conditional_Entry_Call): Check the else statements of a
904 conditional entry call for controlled objects.
905 (Expand_N_Selective_Accept): Check the alternatives of a selective
906 accept for controlled objects.
907 (Expand_N_Timed_Entry_Call): Check the entry call and delay
908 alternatives of a timed entry call for controlled objects.
909 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
910 exception handler for controlled objects.
911 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
912 Add formal parameter Nested_Constructs along with its associated
913 comment.
914 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
915 Requires_Cleanup_Actions.
916 (Process_Statements_For_Controlled_Objects): New routine.
917 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
918 routine. Inspect a node which contains a non-handled sequence of
919 statements for controlled objects. If such an object is found, the
920 statements are wrapped in a block.
921
1bf773bb
AC
9222011-08-04 Bob Duff <duff@adacore.com>
923
924 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
925 need to compare with Class_Wide_Type (T2), in order to get at the
926 original class-wide type node.
927 * sem_type.ads (Covers): Improve the comment.
928 * einfo.ads (Class_Wide_Type): Improve the comment.
929 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
930 the type of the Deref.
931
9322011-08-04 Yannick Moy <moy@adacore.com>
933
934 * gnat_rm.texi: Document that Test_Case pragma can only appear on
935 separate declarations.
936 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
937 check identifier of pragma argument.
938 (Chain_TC): check that no other test case associated to the same entity
939 share the same name.
940 (Check_Test_Case): disallow test case inside subprogram body
941 (Analyze_Pragma): correct call to check identifier and not argument
942 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
943 function gets name from test case pragma.
944
dac3bede
YM
9452011-08-04 Yannick Moy <moy@adacore.com>
946
947 * gnat_rm.texi: Document new pragma and aspect.
948 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
949 (No_Duplicates_Allowed): new constant array defining whether duplicates
950 aspects of each kind can appear on the same declaration.
951 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
952 field, which points to a node holding the previous Spec_PPC_List.
953 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
954 through the indirection with Contract.
955 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
956 * par-prag.adb (Prag): do nothing on Test_Case pragma
957 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
958 be called directly.
959 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
960 component Ensures of Test_Case.
961 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
962 (Analyze_Generic_Subprogram_Declaration,
963 Analyze_Subprogram_Instantiation,
964 Analyze_Abstract_Subprogram_Declaration,
965 Analyze_Subprogram_Body_Helper,
966 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
967 insert contract in subprogram node at point of definition
968 * sem_ch13.adb
969 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
970 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
971 corresponding pragma
972 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
973 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
974 similar to the analysis of pre/post
975 (Derive_Subprogram): insert contract in subprogram node at point of
976 derivation.
977 * sem_prag.adb, sem_prag.ads
978 (Check_Arg_Is_String_Literal, Check_Identifier):
979 new checking procedures to be called in treatment of pragmas
980 (Check_Test_Case): new procedure to check that a Test_Case aspect or
981 pragma is well-formed. This does not check currently that 'Result is
982 used only in the Ensures component of a Test_Case.
983 (Analyze_Pragma): add case for Test_Case
984 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
985 components of a Test_Case.
986 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
987 expressions in the 3rd (and 4th if present) arguments of a Test_Case
988 pragma, treated as spec expressions.
989 (Sig_Flags): add value -1 for Test_Case.
990 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
991 Get_Requires_From_Test_Case_Pragma): getters for both expression
992 components of a Test_Case.
993 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
994 indirection between an entry or [generic] subprogram entity and its
995 pre/post + test-cases.
996 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
997 get/set for fields of an N_Contract node.
998 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
999 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
1000 names and pragma for Test_Case.
1001 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
1002
6a2e5d0f
AC
10032011-08-04 Vincent Celier <celier@adacore.com>
1004
1005 * gnat_ugn.texi: Improve documentation of gnatmake switch
1006 --source-info-file=.
1007
10082011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1009
1010 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
1011 type). Initialize Atyp to the appropriate type which is later checked
1012 for completion. Rewrite the assertion associated with private type
1013 completion.
1014
10152011-08-04 Ed Falis <falis@adacore.com>
1016
1017 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
1018 initialize the number of CPUs.
1019
10202011-08-04 Ed Schonberg <schonberg@adacore.com>
1021
1022 * sem_type.adb (Disambiguate): New subsidiary routine
1023 In_Same_Declaration_List, to implement AI05-0020: a user-defined
1024 equality on an anonymous access type whose designated type is private
1025 does not lead to an ambiguity with the universal access equality
1026 operator in the body or child units of the defining package. The same
1027 is true for a multiplication operator on a private type completed with
1028 a fixed-point-type.
1029
10302011-08-04 Javier Miranda <miranda@adacore.com>
1031
1032 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
1033 (Normalize_Scalars_Config): Removed.
1034 * opt.adb
1035 (Register_Opt_Config_Switches): Remove registering config values of
1036 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
1037 (Restore_Opt_Config_Switches): Remove code which restores the values of
1038 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1039 Init_Or_Norm_Scalars.
1040 (Save_Opt_Config_Switches): Remove code which saves values of
1041 Init_Or_Norm_Scalars and Normalize_Scalars.
1042 (Set_Opt_Config_Switches): Remove code which restores config values of
1043 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1044 Init_Or_Norm_Scalars.
1045
10462011-08-04 Yannick Moy <moy@adacore.com>
1047
1048 * frontend.adb (Frontend): remove previous patch to avoid full
1049 qualification in ALFA mode.
1050 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
1051 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
1052 unique name for an entity, which could be used to identify the entity
1053 across compilation units.
1054
10552011-08-04 Thomas Quinot <quinot@adacore.com>
1056
1057 * prj-env.adb
1058 (Initialize_Default_Project_Path): Add target specific directory
1059 ($prefix/$target/lib/gnat) in front of project path in all cases
1060 (making gnatmake's behaviour consistent with gprbuild).
1061 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
1062 Pass target name from Sdefault to project subsystem.
1063 * gnatls.adb: Show new target specific default project directory.
1064
10652011-08-04 Johannes Kanig <kanig@adacore.com>
1066
1067 * cstand.adb: Add Information to Identifier in Standard
1068 (Identifer_For): Set Entity to the corresponding entity
1069
483361a6
AC
10702011-08-04 Sergey Rybin <rybin@adacore.com>
1071
1072 * gnat_ugn.texi: Update doc on gnatcheck.
1073
10742011-08-04 Yannick Moy <moy@adacore.com>
1075
1076 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
1077 xrefs in a scope.
1078
10792011-08-04 Yannick Moy <moy@adacore.com>
1080
1081 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
1082 performing expansion.
1083 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
1084 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
1085 it is not called in ALFA mode.
1086
ef5569c6
AC
10872011-08-04 Emmanuel Briot <briot@adacore.com>
1088
1089 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
1090 after all, so removed.
1091
10922011-08-04 Sergey Rybin <rybin@adacore.com>
1093
1094 * vms_data.ads: Add missing VMS qualifiers.
1095
1ab4a286
EB
10962011-08-04 Emmanuel Briot <briot@adacore.com>
1097
1098 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
1099 the list of files on the command line after processing it through
1100 Complete_Mains.
1101
7ae0d98c
AC
11022011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1103
1104 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
1105 processing for .NET/JVM. These targets can now benefit from
1106 Raise_From_Controlled_Operation and they share the same processing with
1107 standard targets.
1108 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
1109 These targets need transient scopes in order to properly finalize short
1110 lived controlled objects.
1111 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
1112 NET/JVM. These targets can now benefit from
1113 Raise_From_Controlled_Operation and they share the same processing with
1114 standard targets.
1115
11162011-08-04 Geert Bosch <bosch@adacore.com>
1117
1118 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1119
11202011-08-04 Ed Schonberg <schonberg@adacore.com>
1121
1122 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1123 Expand_Record_Aggregate, to determine whether aggregate must be
1124 expanded into assignments. This is the case if the ancestor part is
1125 private, regarless of the setting of the flag Has_Private_Ancestor.
1126
11272011-08-04 Ed Falis <falis@adacore.com>
1128
1129 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
1130
11312011-08-04 Bob Duff <duff@adacore.com>
1132
1133 * sinfo.ads: Fix comment.
1134
11352011-08-04 Steve Baird <baird@adacore.com>
1136
1137 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
1138 choose a package name in much the same way as is
1139 done for JGNAT when VM_Target /= No_VM, except that
1140 a slightly more distinctive prefix string is used.
1141
11422011-08-04 Emmanuel Briot <briot@adacore.com>
1143
1144 * makeutl.adb (Complete_Mains): no longer accept unit names on the
1145 gnatmake command line.
1146 This behavior was never documented (and was supported only because of
1147 an early bug in the code). This case might lead to ambiguous cases
1148 (between unit names and truncated base names without suffixes).
1149
87729e5a
AC
11502011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1151
1152 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
1153 Remove the external tag of a tagged type from the internal hash table.
1154 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
1155 expanded usage of the routine. Strenghten the check for Is_Master. Add
1156 processing for tagged types.
1157 (Build_Finalizer): Create all the necessary lists used in finalizer
1158 creation when the processed context is a package that may contain
1159 tagged types.
1160 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
1161 Requires_Cleanup_Actions.
1162 (Expand_N_Package_Body): Package bodies may need clean up code
1163 depending on whether they contain tagged types.
1164 (Expand_N_Package_Declaration): Package declarations may need clean up
1165 code depending on whether they contain tagged types.
1166 (Unregister_Tagged_Types): New routine. Search through a list of
1167 declarations or statements, looking for non-abstract Ada tagged types.
1168 For each such type, generate code to unregister the external tag.
1169 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
1170 Requires_Cleanup_Actions.
1171 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
1172 through a list of declarations or statements looking for non-abstract
1173 Ada tagged types or controlled objects.
1174 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
1175 Requires_Cleanup_Actions.
1176 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
1177 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
1178 RE_Unit_Table.
1179
11802011-08-04 Vincent Celier <celier@adacore.com>
1181
1182 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
1183 has Ada sources, not project Project, because if the root project
1184 Project has no sources of its own, all projects will be deemed without
1185 sources.
1186
11872011-08-04 Gary Dismukes <dismukes@adacore.com>
1188
1189 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
1190 of the No_Param_Proc acc-to-subp type used for initialization of
1191 __gnat_finalize_library_objects so that it's declared at library level
1192 rather than nested inside of the adainit routine.
1193
11942011-08-04 Javier Miranda <miranda@adacore.com>
1195
1196 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
1197 if the tagged type has a representation clause which specifies its
1198 external tag.
1199
12002011-08-04 Ed Schonberg <schonberg@adacore.com>
1201
1202 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
1203 Remove previous procedure with that name.
1204 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
1205 when appropriate.
1206 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
1207 subtype mark, the ancestor cannot have unknown discriminants.
1208 (Resolve_Record_Aggregate): if the type has invisible components
1209 because of a private ancestor, the aggregate is illegal.
1210
12112011-08-04 Vincent Celier <celier@adacore.com>
1212
1213 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
1214 account switches -gnat2005, -gnat12 and -gnat2012.
1215
12162011-08-04 Bob Duff <duff@adacore.com>
1217
1218 * s-tasdeb.ads: Minor comment fix.
1219
12202011-08-04 Arnaud Charlet <charlet@adacore.com>
1221
1222 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
1223 CodePeer mode.
1224 * switch.ads, switch.adb (Is_Language_Switch): New function.
1225
12262011-08-04 Vincent Celier <celier@adacore.com>
1227
1228 * switch-c.adb: Minor comment addition.
1229
12302011-08-04 Vincent Celier <celier@adacore.com>
1231
1232 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
1233 ending with '=' is followed by a space (missing file name).
1234
12352011-08-04 Pascal Obry <obry@adacore.com>
1236
1237 * g-regist.ads: Fix size of HKEY on x86_64-windows.
1238
12392011-08-04 Ed Schonberg <schonberg@adacore.com>
1240
1241 * sem_ch12.adb (Analyze_Associations): New routine
1242 Check_Overloaded_Formal_Subprogram to reject a formal package when
1243 there is a named association or a box initialisation for an overloaded
1244 formal subprogram of the corresponding generic.
1245
12462011-08-04 Yannick Moy <moy@adacore.com>
1247
1248 * alfa.ads (ALFA_Xref_Record): add component for type of entity
1249 * get_alfa.adb, put_alfa.adb: Read and write new component of
1250 cross-reference.
1251 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
1252
88f47280
AC
12532011-08-04 Pascal Obry <obry@adacore.com>
1254
1255 * urealp.adb: Minor reformatting.
1256
12572011-08-04 Tristan Gingold <gingold@adacore.com>
1258
1259 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
1260 Handle the case when Cleanup_Protected_Object returns Empty.
1261
12622011-08-04 Yannick Moy <moy@adacore.com>
1263
1264 * frontend.adb (Frontend): only qualify names in non-ALFA mode
1265
12662011-08-04 Ed Schonberg <schonberg@adacore.com>
1267
1268 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
1269 call, ignore functions.
1270
05c53a69
GB
12712011-08-04 Geert Bosch <bosch@adacore.com>
1272
1273 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
1274 point.
1275
23cc1ace
EB
12762011-08-04 Emmanuel Briot <briot@adacore.com>
1277
1278 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
1279 as an index for Builder'Switches. This conforms to the documentation.
1280 * make.adb (Insert_Project_Sources): avoid duplicate code
1281
cef14201
AC
12822011-08-04 Emmanuel Briot <briot@adacore.com>
1283
1284 * makeutl.adb (Complete_Mains): if the user has passed a relative file
1285 name on the command line (for instance "../dummy"), never assume it can
1286 be a unit name.
1287
12882011-08-04 Tristan Gingold <gingold@adacore.com>
1289
1290 * bindgen.adb: Remove code the reference or create the
1291 Break_Start/__gnat_break_start procedure.
1292 * s-stalib.adb (Break_Start): Removed.
1293
e2fee30d
EB
12942011-08-04 Emmanuel Briot <briot@adacore.com>
1295
1296 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
1297 shared with gprbuild.
1298
2d395256
AC
12992011-08-04 Yannick Moy <moy@adacore.com>
1300
1301 * par-ch4.adb (P_Primary): preferentially issue an error message about
1302 a missing parenthesis arount a conditional or case expression in Ada
1303 2012 mode, if we detect that the alignment is not correct for a
1304 statement.
1305
13062011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1307
1308 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1309 tag-to-class-wide conversion as needing finalization actions.
1310 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1311 a tag-to-class-wide conversion as needing finalization actions.
1312 (Is_Finalizable_Transient): The result of a tag-to-class-wide
1313 conversion does not need finalization actions.
1314 (Is_Tag_To_CW_Conversion): New routine.
1315 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1316 whether an object is the result of a tag-to-class-wide conversion.
1317
13182011-08-04 Yannick Moy <moy@adacore.com>
1319
1320 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1321 the left-hand-side and right-hand-side of a conjunct are inserted when
1322 translating a pre- or postcondition
1323 * sem_ch6.adb: Correct typo in comment
1324
13252011-08-04 Ed Schonberg <schonberg@adacore.com>
1326
1327 * gnat_rm.texi: Ravenscar does not prohibit dependence on
1328 Unchecked_Conversion and Unchecked_Deallocation.
1329
13302011-08-04 Thomas Quinot <quinot@adacore.com>
1331
1332 * make.adb: Minor reformatting.
1333
767ab2fd
EB
13342011-08-04 Emmanuel Briot <briot@adacore.com>
1335
1336 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1337 sources in the project and its imported projects, but not in the whole
1338 tree.
1339
8fb3f5df
AC
13402011-08-04 Emmanuel Briot <briot@adacore.com>
1341
1342 * make.adb: Remove debug trace.
1343
13442011-08-04 Vincent Celier <celier@adacore.com>
1345
1346 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
1347 path in canonical form, to be able to compare path names on platforms
1348 such as Windows or Darwin.
1349
13502011-08-04 Thomas Quinot <quinot@adacore.com>
1351
1352 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
1353 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
1354 * scos.ads: Update documentation accordingly.
1355 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
1356 pragmas.
1357
9515740f
AC
13582011-08-04 Ed Schonberg <schonberg@adacore.com>
1359
1360 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
1361 attribute only if prefix type is scalar.
1362
13632011-08-04 Emmanuel Briot <briot@adacore.com>
1364
1365 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
1366 in gnatmake for specifying mains on the command line that do not belong
1367 to the main project. These mains must currently all belong to the same
1368 project, though.
1369 (Ultimate_Extension_Of): removed, since duplicated
1370 Ultimate_Extending_Project.
1371
92966893
AC
13722011-08-04 Arnaud Charlet <charlet@adacore.com>
1373
1374 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
1375 instead.
1376 (CodePeer_Mode_String): New.
1377 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
1378 CodePeer mode.
1379 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
1380 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
1381 mode, since no useful elaboration subprogram is needed by CodePeer.
1382 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
1383 In this mode, compile binder file with -gnatC and do stop after this
1384 step.
1385
13862011-08-04 Vincent Celier <celier@adacore.com>
1387
1388 * exp_ch7.adb: Minor comment fix.
1389
5969611f
RD
13902011-08-04 Robert Dewar <dewar@adacore.com>
1391
1392 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
1393 exp_ch4.adb, makeutl.adb: Minor reformatting.
1394
6367dd30
AC
13952011-08-04 Emmanuel Briot <briot@adacore.com>
1396
1397 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
1398 Create several new subprograms to move code out of Make. This makes the
1399 code more readable, removes code duplication, and is a preparation work
1400 for adding support for aggregate projects.
1401
14022011-08-04 Tristan Gingold <gingold@adacore.com>
1403
1404 * s-po32gl.ads, s-po32gl.adb: New files.
1405 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
1406 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
1407 (Build_Finalization_Collection): Use it.
1408 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
1409 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
1410 literals.
1411 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
1412 * gcc-interface/Make-lang.in: Update dependencies.
1413
cd8bfe35
EB
14142011-08-04 Emmanuel Briot <briot@adacore.com>
1415
1416 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
1417 the command line.
1418
7db29ea7
EB
14192011-08-04 Emmanuel Briot <briot@adacore.com>
1420
1421 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
1422 command line is not a file name, also check whether it could be a unit
1423 name.
1424
d9b056ea
AC
14252011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1426
1427 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
1428 the header of the finalization routine.
1429 If the unit has no finalizer but is a body whose spec has one, then
1430 generate the decrement of the elaboration entity only.
1431 If the unit has a finalizer and is a spec, then do not generate the
1432 decrement of the elaboration entity.
1433 (Gen_Finalize_Library_C): Likewise.
1434
14352011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1436
1437 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
1438 (Bounds_Size_Expression): Removed.
1439 (Double_Alignment_Of): New subsidiary routine.
1440 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
1441 for a hole in the dope vector of unconstrained arrays due to different
1442 index and element alignments.
1443
14442011-08-04 Ed Schonberg <schonberg@adacore.com>
1445
1446 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
1447 raise program_error because body has not been seen yet.
1448
14492011-08-04 Ed Schonberg <schonberg@adacore.com>
1450
1451 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
1452 an unresolved name.
1453
14542011-08-04 Vincent Celier <celier@adacore.com>
1455
1456 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
1457
14582011-08-04 Yannick Moy <moy@adacore.com>
1459
1460 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
1461 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
1462
14632011-08-04 Thomas Quinot <quinot@adacore.com>
1464
1465 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
1466 instantiation in RCI.
1467
14682011-08-04 Emmanuel Briot <briot@adacore.com>
1469
1470 * make.adb: Share more code with gprbuild
1471
f5fc5b9d
AC
14722011-08-04 Emmanuel Briot <briot@adacore.com>
1473
1474 * projects.texi: Added documentation for the IDE'Gnat project file
1475 attribute.
1476
14772011-08-04 Nicolas Roche <roche@adacore.com>
1478
1479 * gnat_rm.texi: Minor editing.
1480
14812011-08-04 Javier Miranda <miranda@adacore.com>
1482
1483 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
1484 and the library case for VM targets.
1485 (Gen_Adainit_Ada): Likewise.
1486
14872011-08-04 Robert Dewar <dewar@adacore.com>
1488
1489 * g-altive.ads: Minor comment updates.
1490 * prj-nmsc.adb: Minor reformatting.
1491
14922011-08-04 Javier Miranda <miranda@adacore.com>
1493
1494 * opt.ads
1495 (Normalize_Scalars_Config): Value of the configuration switch set by
1496 pragma Normalize_Scalars when it appears in the gnat.adc file.
1497 (Normalize_Scalars): New field for record Config_Switches_Type. Used
1498 to save and restore settings of this pragma.
1499 * opt.adb
1500 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
1501 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
1502
15032011-08-04 Vincent Celier <celier@adacore.com>
1504
1505 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
1506
0c4683cf
AC
15072011-08-04 Arnaud Charlet <charlet@adacore.com>
1508
1509 * makeutl.adb: Minor reformatting.
1510
15112011-08-04 Olivier Hainque <hainque@adacore.com>
1512
1513 * g-altive.ads: Update comments to reflect that only the soft
1514 binding is available today.
1515
2598ee6d
RD
15162011-08-04 Robert Dewar <dewar@adacore.com>
1517
1518 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
1519 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
1520 * gcc-interface/Make-lang.in: Update dependencies.
1521
c2db4b32
AC
15222011-08-04 Arnaud Charlet <charlet@adacore.com>
1523
1524 * prj-env.adb: Remove local debug traces.
1525
15262011-08-04 Yannick Moy <moy@adacore.com>
1527
1528 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
1529 was used instead of Hi_OK, which could cause a read of an uninitialized
1530 value later on. Detected while working on the new warning.
1531 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
1532 to local variable.
1533 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
1534 in more cases, in order to detect more unreferenced values.
1535 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
1536 object for expression, if any.
1537
15382011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1539
1540 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
1541 the operand types instead of the Esize.
1542
15432011-08-04 Steve Baird <baird@adacore.com>
1544
1545 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
1546 enable CodePeer_Mode.
1547 * bindusg.adb (Display): Add help message describing -P binder switch.
1548 * gnat_ugn.texi: Document -P binder switch.
1549 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
1550 user-defined main program directly.
1551 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
1552 user-defined main program in the context clause of the package body.
1553
ad05f2e9
AC
15542011-08-04 Yannick Moy <moy@adacore.com>
1555
1556 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
1557 duplicate of Defining_Entity
1558 (Get_Unique_Entity_For_Decl): rename function into
1559 Unique_Defining_Entity
1560 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
1561 (Formal_Proof_On): remove synthesized flag
1562 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1563 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
1564 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
1565 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
1566 Annotate (Formal_Proof)
1567
15682011-08-04 Emmanuel Briot <briot@adacore.com>
1569
1570 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
1571 source files with non-standard naming schemes, in imported projects
1572
756ef2a0
AC
15732011-08-04 Emmanuel Briot <briot@adacore.com>
1574
1575 * makeutl.adb (Complete_Mains): when a multi-unit source file is
1576 specified on the gprbuild command line, we need to compile all units
1577 within that file, not just the first one we find
1578 Fix error message for mains that are not found.
1579
15802011-08-04 Thomas Quinot <quinot@adacore.com>
1581
1582 * sem_ch6.adb: Update comment.
1583 * sem_ch12.adb: Minor reformatting.
1584
15852011-08-04 Bob Duff <duff@adacore.com>
1586
1587 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
1588 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
1589 race condition whose symptom is to fail to lock Parent. That, in turn,
1590 causes Parent.Awake_Count to be accessed without locking Parent, which
1591 causes another race condition whose symptom is that Parent.Awake_Count
1592 can be off by 1 (either too high or too low). The solution is to lock
1593 Parent unconditionally, and then lock Acceptor, before reading
1594 Acceptor.Terminate_Alternative.
1595
4fdebd93
AC
15962011-08-04 Arnaud Charlet <charlet@adacore.com>
1597
1598 * debug.adb: Update comment.
1599
16002011-08-04 Robert Dewar <dewar@adacore.com>
1601
1602 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
1603 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
1604 exp_ch6.adb: Minor reformatting.
1605
16062011-08-04 Gary Dismukes <dismukes@adacore.com>
1607
1608 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
1609 checks for -gnateE.
1610
16112011-08-04 Ed Schonberg <schonberg@adacore.com>
1612
1613 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
1614
16152011-08-04 Thomas Quinot <quinot@adacore.com>
1616
1617 * sinfo.ads: Minor reformatting.
1618
16192011-08-04 Emmanuel Briot <briot@adacore.com>
1620
1621 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
1622 even if there is no location.
1623
6aaa0587
ES
16242011-08-04 Ed Schonberg <schonberg@adacore.com>
1625
1626 * sem_res.adb, sem_ch4.adb: move check for restriction
1627 No_Task_Hierarchy to resolve_allocator.
1628
35a1c212
AC
16292011-08-04 Thomas Quinot <quinot@adacore.com>
1630
1631 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
1632 This flag of N_Pragma nodes is not used, remove it as well as all of
1633 the associated circuitry.
1634
16352011-08-04 Javier Miranda <miranda@adacore.com>
1636
1637 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
1638 runtime check on duplicated externa tags
1639 * debug.adb Document switch -gnatdQ.
1640
16412011-08-04 Gary Dismukes <dismukes@adacore.com>
1642
1643 * a-fihema.ads: Minor typo fix.
1644
16452011-08-04 Yannick Moy <moy@adacore.com>
1646
1647 * sem_ch10.adb: Minor comment update.
1648
16492011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1650
1651 * einfo.adb: Update the node field usage to reflect the renaming of
1652 Return_Flag to Return_ Flag_Or_Transient_Decl.
1653 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
1654 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
1655 (Write_Field15_Name): Change Return_Flag to
1656 Return_Flag_Or_Transient_Decl.
1657 * einfo.ads: Rename node field Return_Flag to
1658 Return_Flag_Or_Transient_Decl. Update the associated comment and all
1659 occurrences in entities.
1660 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
1661 associated Inline pragma.
1662 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
1663 associated Inline pragma.
1664 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
1665 routine.
1666 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
1667 Return_Flag and Set_Return_Flag.
1668 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
1669 objects generated for controlled transients declared inside an
1670 Exception_With_Actions. Update the calls to Return_Flag.
1671 (Process_Object_Declaration): Add code to add a null guard for hook
1672 objects generated for controlled transients declared inside an
1673 Exception_With_Actions. Update related comment.
1674 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
1675 objects generated for controlled transients declared inside an
1676 Exception_With_Actions. Update the calls to Return_Flag.
1677 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
1678
16792011-08-04 Ed Schonberg <schonberg@adacore.com>
1680
1681 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
1682 positional aggregate.
1683
16842011-08-04 Vincent Celier <celier@adacore.com>
1685
1686 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
1687 SLOC only for pragmas.
1688
16892011-08-04 Emmanuel Briot <briot@adacore.com>
1690
1691 * projects.texi: Minor typo fix.
1692
16932011-08-04 Emmanuel Briot <briot@adacore.com>
1694
1695 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
1696 on case-sensitive file systems.
1697
c2873f74
TQ
16982011-08-04 Thomas Quinot <quinot@adacore.com>
1699
1700 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
1701 nested in a disabled pragma.
1702 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
1703 enclosing pragma, if any, for X decisions.
1704
17052011-08-04 Thomas Quinot <quinot@adacore.com>
1706
1707 * sem_prag.adb: Minor reformatting.
1708
46414266
VC
17092011-08-04 Vincent Celier <celier@adacore.com>
1710
1711 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
1712 allowed in no run time mode.
1713
17142011-08-04 Vincent Celier <celier@adacore.com>
1715
1716 * make.adb (Check): When -gnatc is used, check for the source file
1717 inside the ALI file with a canonical case file name.
1718
afab164f
EB
17192011-08-04 Emmanuel Briot <briot@adacore.com>
1720
1721 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
1722 overriding the separator.
1723
fe0ec02f
AC
17242011-08-04 Robert Dewar <dewar@adacore.com>
1725
1726 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
1727 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
1728
17292011-08-04 Robert Dewar <dewar@adacore.com>
1730
1731 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
1732
17332011-08-04 Yannick Moy <moy@adacore.com>
1734
1735 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
1736 'Result only appears in postcondition of function.
1737
17382011-08-04 Thomas Quinot <quinot@adacore.com>
1739
1740 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
1741 external tag, include the value of the external tag in the exception
1742 message.
1743
0180fd26
AC
17442011-08-04 Yannick Moy <moy@adacore.com>
1745
1746 * sem_attr.adb (Result): modify error message for misplaced 'Result
1747
17482011-08-04 Sergey Rybin <rybin@adacore.com>
1749
1750 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
1751 clear that the second argument must be an identifier.
1752
17532011-08-04 Thomas Quinot <quinot@adacore.com>
1754
1755 * exp_ch9.adb (Build_Barrier_Function): When compiling with
1756 -fpreserve-control-flow, insert an IF statement on the barrier
1757 condition to ensure that a conditional branch instruction is generated.
1758
17592011-08-04 Emmanuel Briot <briot@adacore.com>
1760
1761 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
1762 (Processing_Flags.Ignore_Missing_With): new flag.
1763
17642011-08-04 Emmanuel Briot <briot@adacore.com>
1765
1766 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
1767 Source_List_File on case-insensitive systems where the file is actually
1768 on a case-sensitive file system (NFS,...).
1769
17702011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1771
1772 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
1773 function return contains a controlled [extension] aggregate and the
1774 return statement is not part of a handled sequence of statements, wrap
1775 the return in a block. This ensures that all controlled temporaries
1776 generated during aggregate resolution will be picked up by the
1777 finalization machinery.
1778
17792011-08-04 Ed Schonberg <schonberg@adacore.com>
1780
1781 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
1782 components, freeze type before resolution, to ensure that default
1783 initializations are present for all components.
1784 * sem_res.adb (Resolve_Actuals): the designated object of an
1785 accces-to-constant type is a legal actual in a call to an
1786 initialization procedure.
1787
17882011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1789
1790 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
1791 N_Unchecked_Type_Conversion to the possible containers of a renamed
1792 transient variable.
1793
78efd712
AC
17942011-08-04 Yannick Moy <moy@adacore.com>
1795
1796 * par-ch13.adb (Aspect_Specifications_Present): recognize
1797 "with Identifier'Class =>" as an aspect, so that a meaningful warning
1798 is issued in Strict mode.
1799 * par.adb: Fix typos in comments.
1800
18012011-08-04 Yannick Moy <moy@adacore.com>
1802
1803 * sem_attr.adb (Result): modify error message to take into account Post
1804 aspect when compiling Ada 2012 (or newer) code.
1805
18062011-08-04 Nicolas Roche <roche@adacore.com>
1807
1808 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2c7f9cc0 1809 remove need for GCC exceptions.
78efd712
AC
1810
18112011-08-04 Vincent Celier <celier@adacore.com>
1812
1813 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
1814 project, not the source file name.
1815 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
1816 excluded, continue looking. This excluded source will only be returned
1817 if there is no other source with the same base name that is not locally
1818 removed.
1819
18202011-08-04 Ed Schonberg <schonberg@adacore.com>
1821
1822 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
1823 private and one of the operands is a real literal, use a qualified
1824 expression rather than a conversion which is not meaningful to the
1825 back-end.
1826
0170a691
AC
18272011-08-04 Yannick Moy <moy@adacore.com>
1828
1829 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
1830 corresponding aspect X'Class are allowed, proceed with analysis of the
1831 aspect instead of skipping it.
1832
18332011-08-04 Tristan Gingold <gingold@adacore.com>
1834
1835 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
1836 This will allow to have an Ada implementation for the subprogram.
1837
deb4f5ba
ES
18382011-08-04 Ed Schonberg <schonberg@adacore.com>
1839
1840 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
1841 completion and aspects are present, apply them to the entity for the
1842 type which is currently the partial view, but which is the one that
1843 will be frozen.
1844 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
1845 applies to a partial view, indicate that the full view has predicates
1846 and delayed aspects.
1847 (Replace_Type_Reference): Handle properly predicates that apply to the
1848 full view of a private completion.
1849
fc893455
AC
18502011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1851
1852 * layout.adb (Layout_Type): For composite types, do not set Esize.
1853 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
1854 set Esize.
1855 (Size_Known): Look at the RM size of components instead of the Esize.
1856 (Freeze_Record_Type): Look at the RM size instead of the Esize to
1857 issue warning and activate Implicit_Packing.
1858 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
1859 if the Esize is not known.
1860 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
1861 for elementary types only.
1862 (Analyze_Record_Representation_Clause): Look at the RM size instead
1863 of the Esize to issue errors.
1864 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
1865 is not known.
1866 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
2c7f9cc0 1867 obsolete block.
fc893455
AC
1868 Look at the RM size instead of the Esize for types if the latter is
1869 not known.
1870 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
1871
18722011-08-04 Ed Schonberg <schonberg@adacore.com>
1873
1874 * sem_type.adb: proper handling of equality not involving anonymous
1875 access types.
1876
b37d5bc6
AC
18772011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1878
1879 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
1880 Vis_Decls. When creating a library-level finalizer for a package spec,
1881 both the declaration and body of the finalizer are inserted either in
1882 the visible or private declarations of the package spec.
1883
18842011-08-04 Javier Miranda <miranda@adacore.com>
1885
1886 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
1887 use of the full-view of a type when invoking Is_Ancestor.
1888 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
1889 the full-view of private parents is requested, then use also the
1890 full-view of the parent of the first derivation.
1891
7ab4d95a
AC
18922011-08-04 Tristan Gingold <gingold@adacore.com>
1893
1894 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
1895 instead of the locally imported procedure.
1896 * s-taprop-mingw.adb (Enter_Task): Ditto.
1897 * s-valrea.adb (Scan_Real): Ditto.
1898 * s-imgrea.adb (Set_Image_Real): Ditto.
1899 * s-flocon.ads: Make the package pure.
1900
19012011-08-04 Thomas Quinot <quinot@adacore.com>
1902
1903 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
1904 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
1905 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
1906 New subprogram, moved here from...
1907 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
1908 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
1909 rewriting of the last argument into a procedure call statement here...
1910 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
1911 instead.
1912
19132011-08-04 Thomas Quinot <quinot@adacore.com>
1914
1915 * par_sco.adb: Minor reformatting.
1916
51c400f5
AC
19172011-08-04 Robert Dewar <dewar@adacore.com>
1918
1919 * erroutc.adb: Minor reformatting.
1920
19212011-08-04 Thomas Quinot <quinot@adacore.com>
1922
1923 * par_sco.adb: Comment update.
1924
19252011-08-04 Tristan Gingold <gingold@adacore.com>
1926
1927 * s-flocon.ads: New file.
1928 * g-flocon.ads: Now a renaming of s-flocon.
1929 * Makefile.rtl: Add s-flocon.o
1930
6a49f110
AC
19312011-08-04 Javier Miranda <miranda@adacore.com>
1932
1933 * exp_strm.adb (Build_Array_Input_Function): if the array type is
1934 constrained, do not attempt to build a subtype of it.
1935
19362011-08-04 Yannick Moy <moy@adacore.com>
1937
1938 * errout.ads Change comments: remove 'R'M as an example where quotes
1939 are needed; add ALFA as another case where quotes are not needed
1940 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
1941 case where quotes are not needed.
1942 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1943 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
1944 Remove all occurrences of 'A'L'F'A
1945
19462011-08-04 Ed Schonberg <schonberg@adacore.com>
1947
1948 * sem_ch13.adb: check legality of invariant pragma.
1949
a4640a39
AC
19502011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1951
1952 * bindgen.adb: Add comments.
1953
19542011-08-04 Yannick Moy <moy@adacore.com>
1955
1956 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
1957 synthesized flag.
1958 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
1959 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
1960
19612011-08-04 Robert Dewar <dewar@adacore.com>
1962
1963 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
1964 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
1965 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
1966
39ade2f9
AC
19672011-08-04 Thomas Quinot <quinot@adacore.com>
1968
1969 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
1970
19712011-08-04 Thomas Quinot <quinot@adacore.com>
1972
1973 PR ada/47880
1974 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
1975 allocated object.
1976
19772011-08-04 Robert Dewar <dewar@adacore.com>
1978
1979 * einfo.ads, exp_ch4.adb: Minor reformatting.
1980
19812011-08-04 Jerome Lambourg <lambourg@adacore.com>
1982
1983 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
1984
7efc3f2d
AC
19852011-08-04 Ed Schonberg <schonberg@adacore.com>
1986
1987 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
1988 type in all cases to compute list of primitive operations, because full
1989 view may be an itype that is not attached to the list of declarations.
1990
19912011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1992
1993 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
1994 library has already been finalized.
1995 (Gen_Adafinal_C): Likewise.
1996 (Gen_Adainit_Ada): Generate an early return if the library has
1997 already been elaborated.
1998 (Gen_Adainit_C): Likewise.
1999 (Gen_Output_File_Ada): Generate an elaboration flag.
2000 (Gen_Output_File_C): Likewise.
2001
f65df609
HK
20022011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2003
2004 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
2005 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
2006 built in the first place.
2007 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
2008 for CodePeer because Finalize_Address was not built to begin with.
2009 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
2010
a0fb8fe8
AC
20112011-08-04 Pascal Obry <obry@adacore.com>
2012
2013 * adaint.c (__gnat_tmp_name): Use current process id to create temp
2014 filenames, this ensures unicity of filenames across processes.
2015
20162011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2017
2018 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
2019 Raise_Controlled to Raise_From_Controlled_Operation. Update the
2020 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
2021 Add False as the actual to From_Abort in the generated call to
2022 Raise_From_Controlled_Operation.
2023
20242011-08-04 Jerome Lambourg <lambourg@adacore.com>
2025
2026 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
2027 so that the ali file name can be retrieved from outside of this package.
2028 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
2029 doing nothing in the general case, but used to update the object file
2030 timestamp if directly generated by the backend.
2031 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
2032 to a later time than the ali file one.
2033
9534ab17
AC
20342011-08-04 Yannick Moy <moy@adacore.com>
2035
2036 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
2037 entities whose body contains an Annotate pragma which forces formal
2038 proof on this body.
2039 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2040 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
2041 Mark_Non_ALFA_Subprogram to pass in a message and node.
2042 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
2043 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
2044 surrounding subprogram.
2045 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
2046 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
2047 as not in ALFA is annotated with Formal_Proof being On, then an error
2048 is issued based on the additional parameters for message and node.
2049 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
2050 * gcc-interface/Make-lang.in: Update dependencies.
2051
20522011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2053
2054 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
2055 Finalize_Address when CodePeer is enabled.
2056
20572011-08-04 Pascal Obry <obry@adacore.com>
2058
2059 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
2060 the latter returns a pointer to a static buffer which is deallocated
2061 at the end of the routine.
2062
5c0e97dd
AC
20632011-08-04 Yannick Moy <moy@adacore.com>
2064
2065 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
2066 after index creation; mark unconstrained base array type generated as
2067 being in/not in ALFA as well
2068 (Make_Index): mark subtype created as in/not in ALFA
2069 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
2070 over a loop as in/not in ALFA, depending on its type and form of loop
2071 iteration.
2072
20732011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2074
2075 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
2076 directly to False on .NET and JVM.
2077
7a93c64b
YM
20782011-08-04 Yannick Moy <moy@adacore.com>
2079
2080 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
2081 constraint that subtype must come from source code to be in ALFA, so
2082 that anonymous subtypes can be in ALFA too.
2083
e9a1ed9b
YM
20842011-08-04 Yannick Moy <moy@adacore.com>
2085
2086 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
2087 reference for ALFA mode.
2088 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
2089 procedure public so as to use it from formal verification back-end.
2090
8e293fbd
AC
20912011-08-04 Jerome Lambourg <lambourg@adacore.com>
2092
2093 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
2094 invalid checks of the Parameter, making Remove_Switch not working
2095 correctly.
2096
20972011-08-04 Arnaud Charlet <charlet@adacore.com>
2098
2099 * targparm.ads: Update header: no run-time exception is needed on this
2100 file.
2101
21022011-08-04 Vincent Celier <celier@adacore.com>
2103
2104 * a-fihema.adb: Use System.IO instead of GNAT.IO
2105
21062011-08-04 Thomas Quinot <quinot@adacore.com>
2107
2108 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
2109 are forbidden in Compiler_Unit mode.
2110
cfae2bed
AC
21112011-08-04 Robert Dewar <dewar@adacore.com>
2112
2113 * sem_util.adb: Minor reformatting.
2114
21152011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2116
2117 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2118 library-level finalizers.
2119 (Gen_Finalize_Library_C): Update the import string for library-level
2120 finalizers.
2121 (Gen_Finalize_Library_Defs_C): Update the definition name of a
2122 library-level finalizer.
2123 * exp_ch7.adb: Remove with and use clauses for Stringt.
2124 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
2125 Spec_Decl. Add local variable Body_Id. The names of library-level
2126 finalizers are now manually fully qualified and are no longer external.
2127 A single name is now capable of servicing .NET, JVM and non-VM targets.
2128 Pragma Export is no longer required to provide visibility for the name.
2129 (Create_Finalizer_String): Removed.
2130 (New_Finalizer_Name): New routine which mimics New_..._Name.
2131
01f0729a
AC
21322011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2133
2134 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
2135 elaboration counter to Standard_Short_Integer.
2136 * sem_util.adb (Build_Elaboration_Entity): Likewise.
2137 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
2138 (Gen_Elab_Externals_C): Likewise.
2139
21402011-08-04 Ed Falis <falis@adacore.com>
2141
2142 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2143 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2144 system-vxworks-mips.ads, system-vxworks-x86.ads
2145 (Always_Compatible_Rep): set to False for all VxWorks targets.
2146
2c1b72d7
AC
21472011-08-04 Robert Dewar <dewar@adacore.com>
2148
2149 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
2150 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
2151 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
2152 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
2153 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
2154 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
2155 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
2156 Minor reformatting and code reorganization.
2157
21582011-08-04 Emmanuel Briot <briot@adacore.com>
2159
2160 * projects.texi: Added doc for aggregate projects.
2161
824e9320
AC
21622011-08-04 Emmanuel Briot <briot@adacore.com>
2163
2164 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
2165 Add support for overriding the Project_Path in aggregate projects.
2166
21672011-08-04 Robert Dewar <dewar@adacore.com>
2168
2169 * a-cofove.ads: Minor reformatting.
2170
21712011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2172
2173 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
2174 on the generated code.
2175 (Build_Finalize_Statements): Update the comment on the generated code.
2176 (Build_Initialize_Statements): Update the comment on the generated code.
2177 (Build_Object_Declarations): Add local variable Result. The object
2178 declarations are now built in sequence.
2179 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
2180 RE_Unit_Table.
2181
21822011-08-04 Robert Dewar <dewar@adacore.com>
2183
2184 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
2185
21862011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2187
2188 * einfo.ads (Elaboration_Entity): Document new definition and use.
2189 (Elaboration_Entity_Required): Adjust to above change.
2190 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
2191 * exp_ch12.adb: And with and use for Snames.
2192 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
2193 * exp_util.adb (Set_Elaboration_Flag): Likewise.
2194 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
2195 <Check_Unit_Name>: Deal with N_Expanded_Name.
2196 <Attribute_Elaborated>: Extend to all unit names.
2197 * sem_elab.adb: And with and use for Uintp.
2198 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
2199 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
2200 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
2201 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
2202 from Gen_Adainit_Ada.
2203 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
2204 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
2205 case, do not call System.Standard_Library.Adafinal; instead call
2206 finalize_library if needed.
2207 (Gen_Adafinal_C): Likewise.
2208 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
2209 non-main program case.
2210 (Gen_Adainit_C): Generate a couple of external declarations here.
2211 In the main program case, set SSL.Finalize_Library_Objects.
2212 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
2213 (Gen_Elab_Calls_C): Likewise.
2214 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
2215 (Gen_Finalize_Library_C): Likewise. Generate a full function.
2216 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
2217 objects here.
2218 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
2219 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
2220 Gen_Adafinal_Ada.
2221 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
2222 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2c7f9cc0 2223 of external declarations. Call Gen_Finalize_Library_C.
824e9320 2224
316d9d4f
EB
22252011-08-04 Emmanuel Briot <briot@adacore.com>
2226
2227 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
2228 Compute_Compilation_Phases): new subprogram.
2229 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
2230 The number of mains as well as the various compilation phases that
2231 need to be run are now project tree specific, since various
2232 aggregated trees might have different requirements. In particular,
2233 they do not all require bind or link phases.
2234
9434c32e
EB
22352011-08-04 Emmanuel Briot <briot@adacore.com>
2236
2237 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
2238 (Project_Tree_Appdata): New type.
2239 It is now possible to associate application-specific data to a project
2240 tree. In particular, this is used in the gprbuild builder to avoid a
2241 number of global tables and htables, especially now that there can be
2242 several project trees loaded at once because of aggregate projects.
2243 (Debug_Name): new procedure.
2244 * projects.texi: Clarify syntax of "**" for Source_Dirs
2245
41ba34db
EB
22462011-08-03 Emmanuel Briot <briot@adacore.com>
2247
2248 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
2249 the "roots" for a main.
2250 (Fill_From_Project): add support for aggregate projects. Main units
2251 in aggregated projects are now automatically added in the list of
2252 files to build (although this fails later on in gprbuild, because
2253 these files are not using the root proejct tree, so this needs
2254 further cleanup)
2255 * gcc-interface/Make-lang.in: Update dependencies.
2256
fccd42a9
AC
22572011-08-03 Yannick Moy <moy@adacore.com>
2258
2259 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
2260 conditional expression in ALFA.
2261 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
2262 expressions as not in ALFA.
2263
22642011-08-03 Robert Dewar <dewar@adacore.com>
2265
2266 * a-cofove.adb: Minor reformatting.
2267
22682011-08-03 Emmanuel Briot <briot@adacore.com>
2269
2270 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
2271 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
2272 gprbuild sources.
2273 These packages are more logically placed in the Queue package, since
2274 they manipulate the queue. It is also likely that they can be adapted
2275 for gnatmake, thus sharing more code.
2276 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
2277 that we could move the above.
2278
22792011-08-03 Emmanuel Briot <briot@adacore.com>
2280
2281 * errutil.adb (Finalize): clean up the list of error messages on exit.
2282 Calling this subprogram multiple times will no longer show duplicate
2283 error messages on stderr.
2284
22852011-08-03 Emmanuel Briot <briot@adacore.com>
2286
2287 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
2288 Getopt_Switches when we have already define a command line
2289 configuration.
2290
5e8c8e44
YM
22912011-08-03 Yannick Moy <moy@adacore.com>
2292
2293 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
2294 in ALFA. Instead, they are considered as assertions to prove.
2295 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
2296 nodes as not in ALFA. Instead, include conditional expressions in ALFA
2297 if they have no ELSE part, or if they occur in pre- and postconditions,
2298 where the Condition cannot have side-effects in ALFA
2299 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
2300 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2301 Instead, include type conversion between scalar types in ALFA.
2302 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2303 if-and-only-if its type is in ALFA.
2304
5ffe0bab
AC
23052011-08-03 Thomas Quinot <quinot@adacore.com>
2306
2307 * scos.adb, get_scos.adb, put_scos.adb
2308 New code letter for decisions: G (entry guard)
2309 * par_sco.adb
2310 (Traverse_Subprogram_Body): Rename to...
2311 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2312 (Traverse_Protected_Body): New subprogram
2313 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2314 protected bodies and entry bodies.
2315
23162011-08-03 Yannick Moy <moy@adacore.com>
2317
2318 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2319 entities with get/set subprograms, which is set on procedure entities
2320 generated by the compiler for a postcondition.
2321 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2322 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2323 entity for a declaration
2324 (Get_Unique_Entity_For_Decl): new function returning an entity which
2325 represents a declaration, so that matching spec and body have the same
2326 entity.
2327
23282011-08-03 Robert Dewar <dewar@adacore.com>
2329
2330 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2331 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2332
23332011-08-03 Yannick Moy <moy@adacore.com>
2334
2335 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2336 library-level because retriction No_Implicit_Dynamic_Code in the
2337 front-end prevents its definition as a local subprogram
2338 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2339 for reuse in other contexts
2340 (Traverse_Declarations_Or_Statements,
2341 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2342 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2343 procedures take a callback parameter to be called on all declarations
2344 * lib-xref.ads
2345 (Traverse_All_Compilation_Units): new generic function to traverse a
2346 compilation unit and call a callback parameter on all declarations
2347
f9ad6b62
AC
23482011-08-03 Javier Miranda <miranda@adacore.com>
2349
2350 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
2351 in Java since they are always enclosed in a namespace that
2352 differentiates them, and overloaded entities are supported by the VM.
2353
23542011-08-03 Ed Schonberg <schonberg@adacore.com>
2355
2356 * checks.adb (Determine_Range): If a computed bound of an operation is
2357 outside the range of the base type of the expression, and overflow
2358 checks are enabled, the result is unknown and cannot be used for any
2359 subsequent constant folding.
2360 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
2361 unknown, so is the result of the comparison.
2362
23632011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2364
2365 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
2366 From_Abort. When finalization was triggered by an abort, propagate
2367 Standard'Abort_Signal rather than Program_Error.
2368 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
2369 From_Abort.
2370 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
2371 From_Abort. When finalization was triggered by an abort, propagate
2372 Standard'Abort_Signal rather than Program_Error.
2373 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
2374 From_Abort.
2375 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
2376 Abort_Id. Update the calls to Build_Object_Declarations and
2377 Build_Raise_Statement to include Abort_Id.
2378 (Build_Adjust_Statements): New local variable Abort_Id. Update the
2379 calls to Build_Object_Declarations and Build_Raise_Statement to include
2380 Abort_Id.
2381 (Build_Finalize_Statements): New local variable Abort_Id. Update the
2382 calls to Build_Object_Declarations and Build_Raise_Statement to include
2383 Abort_Id.
2384 (Build_Components): Create an entity for Abort_Id when exceptions are
2385 allowed on the target.
2386 (Build_Finalizer): New local variable Abort_Id.
2387 (Build_Initialize_Statements): New local variable Abort_Id. Update the
2388 calls to Build_Object_Declarations and Build_Raise_Statement to include
2389 Abort_Id.
2390 (Build_Object_Declarations): Add new formal Abort_Id. Create the
2391 declaration of flag Abort_Id to preserve the original abort status
2392 before finalization code is executed.
2393 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
2394 runtime routine Raise_From_Controlled_Operation.
2395 (Create_Finalizer): Update the call to Build_Raise_Statement to include
2396 Abort_Id. Update the call to Build_Object_Declarations to include
2397 Abort_Id. Update the layout of the finalizer body.
2398 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
2399 (Process_Transient_Objects): New local variable Abort_Id. Remove the
2400 clunky code to create all flags and objects related to
2401 exception propagation and replace it with a call to
2402 Build_Object_Declarations. Update the call to Build_Raise_Statement to
2403 include Abort_Id.
2404 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
2405 Add new formal Abort_Id and associated comment on its use.
2406 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
2407 on its use.
2408 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
2409 Remove the clunky code to create all flags and objects related to
2410 exception propagation and replace it with a call to
2411 Build_Object_Declarations. Update the call to Build_Raise_Statement.
2412
24132011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2414
2415 * s-tassta.adb: Fix minor typos.
2416
24172011-08-03 Robert Dewar <dewar@adacore.com>
2418
2419 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
2420 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
2421
1cdfa9be
AC
24222011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2423
2424 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
2425 to packages. This ensures that the finalizer body will not end up
2426 inside the freeze node.
2427 (Process_Declarations): Add code to detect whether a freeze node has a
2428 nested finalization collection.
2429
24302011-08-03 Pascal Obry <obry@adacore.com>
2431
2432 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
2433 (Current_Session): Return a not null access to Session_Type.
2434 (Default_Session): Likewise.
2435
243cae0a
AC
24362011-08-03 Robert Dewar <dewar@adacore.com>
2437
2438 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
2439 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
2440
24412011-08-03 Pascal Obry <obry@adacore.com>
2442
2443 * g-awk.ads: Minor comment fix.
2444
24452011-08-03 Sergey Rybin <rybin@adacore.com>
2446
2447 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2448 the tree structure related to discriminant constraints.
2449 Original_Discriminant cannot be used any more for computing the
2450 defining name for the reference to a discriminant.
2451
24522011-08-03 Ed Schonberg <schonberg@adacore.com>
2453
2454 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
2455 function is not visibly tagged, this is not a dispatching call and
2456 therfore is not Tag_Indeterminate, even if the function is marked as
2457 dispatching on result.
2458
f553e7bc
AC
24592011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2460
2461 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
2462 (Expand_N_Free_Statement): Add a guard to protect against run-times
2463 which do not support controlled types.
2464 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
2465 against run-times which do not support controlled types.
2466 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
2467 against run-times which do not support controlled types.
2468 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
2469 against run-times which do not support controlled types.
2470 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
2471 protect against run-times which do not support controlled types.
2472
24732011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2474
2475 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
2476 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
2477
e4982b64
AC
24782011-08-03 Ed Schonberg <schonberg@adacore.com>
2479
2480 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
2481 modified in the source, to prevent spurious warnings when compiling
2482 with -gnatg.
2483
24842011-08-03 Thomas Quinot <quinot@adacore.com>
2485
2486 * a-except-2005.adb: Minor reformatting.
2487
24882011-08-03 Ed Schonberg <schonberg@adacore.com>
2489
2490 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
2491 is a renaming declaration in the private part of a package, do not emit
2492 a warning that the with_clause could be moved because the renaming may
2493 be used in the body or in a child unit.
2494
24952011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2496
2497 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2498 Propagate the Comes_From_Source attribute from the original return
2499 object to the renaming.
2500
25012011-08-03 Jose Ruiz <ruiz@adacore.com>
2502
2503 * exp_ch7.adb (Build_Raise_Statement): Do not call
2504 Raise_From_Controlled_Operation when this routine is not present in
2505 the run-time library.
2506 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
2507 libraries (Ravenscar), tasks are non-terminating, and protected objects
2508 and tasks can only appear at library level, so we do not want
2509 finalization of protected objects nor tasks.
2510 * exp_intr.adb: Minor clarification in comment.
2511 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
2512 Gen_Output_File_C): Remove references to finalization of library-level
2513 objects when using restricted run-time libraries.
2514
25152011-08-03 Ed Schonberg <schonberg@adacore.com>
2516
2517 * sem_ch3.adb (Build_Discriminant_Constraints): Set
2518 Original_Discriminant only if the parent type is a generic formal.
2519
deb8dacc
HK
25202011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2521
2522 * exp_ch13.adb: Add with and use clause for Targparm;
2523 (Expand_N_Free_Statement): Prevent the generation of a custom
2524 Deallocate on .NET/JVM targets since this requires pools and address
2525 arithmetic.
2526 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
2527 .NET/JVM targets, attach the newly allocated object to the access
2528 type's finalization collection. Do not generate a call to
2529 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
2530 exist in the runtime.
2531 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
2532 create a custom Allocate for object that do not require initialization.
2533 Attach a newly allocated object to the access type's finalization
2534 collection on .NET/JVM.
2535 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
2536 assignment of controlled types on .NET/JVM. The two hidden pointers
2537 Prev and Next and stored and later restored after the assignment takes
2538 place.
2539 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
2540 kludge for .NET/JVM to recognize a particular piece of code coming from
2541 Heap_Management and change the call to Finalize into Deep_Finalize.
2542 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
2543 finalization collections on .NET/JVM only for types derived from
2544 Controlled. Separate the association of storage pools with a collection
2545 and only allow it on non-.NET/JVM targets.
2546 (Make_Attach_Call): New routine.
2547 (Make_Detach_Call): New routine.
2548 (Process_Object_Declarations): Suppress the generation of
2549 build-in-place return object clean up code on .NET/JVM since it uses
2550 pools.
2551 * exp_ch7.ads (Make_Attach_Call): New routine.
2552 (Make_Detach_Call): New routine.
2553 * exp_intr.adb Add with and use clause for Targparm.
2554 (Expand_Unc_Deallocation): Detach a controlled object from a collection
2555 on .NET/JVM targets.
2556 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
2557 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
2558 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
2559 names used in finalization.
2560
25612011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2562
2563 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
2564 (Attach, Detach): Lock the current task when chaining an object onto a
2565 collection.
2566
df3e68b1
HK
25672011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2568
2569 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
2570 Rewritten to create the message strings when the exception is not
2571 raised by an abort during finalization.
2572 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
2573 Raise_From_Controlled_Operation and update its associated comment.
2574 * a-fihema.ads, a-fihema.adb: New GNAT unit.
2575 Ada.Finalization.Heap_Management provides key functionality
2576 associated with controlled objects on the heap, their creation,
2577 finalization and reclamation. Type Finalization_Collection is
2578 effectively a wrapper which sits ontop of a storage pool and performs
2579 all necessary bookkeeping for all the objects it contains. Each
2580 access-to-controlled or access-to-class-wide type receives a collection
2581 as part of its expansion. The compiler generates buffer code and
2582 invokes Allocate / Deallocate to create and destroy allocated
2583 controlled objects.
2584 * a-finali.adb ("="): Removed.
2585 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
2586 fields Prev and Next.
2587 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
2588 A library unit with at least one controlled object on the library level
2589 has a special finalizer which is invoked by the binder. To signal this,
2590 ali files carry field PF.
2591 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
2592 associated comment on field usage.
2593 * a-tags.adb (Get_RC_Offset): Removed.
2594 (Needs_Finalization): New routine.
2595 * a-tags.ads: Update the structure of the GNAT dispatch tables.
2596 Dispatch tables now carry field Needs_Finalization which provides
2597 runtime indication whether a type is controlled or has controlled
2598 components or both. Remove field RC_Offset.
2599 (Get_RC_Offset): Removed along with its associated pragma Export.
2600 Since tagged types with controlled components no longer carry hidden
2601 field _controller, the special mechanism to retrieve its location is no
2602 longer needed.
2603 (Needs_Finalization): New routine.
2604 * atree.ads, atree.adb (Elist24): New routine.
2605 (Set_Elist24): New routine.
2606 * atree.h: Add a define clause for Elist24.
2607 * bindgen.adb New library-level variable Lib_Final_Built.
2608 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
2609 presence of a VM target, the routine generates calls to the proper
2610 library finalization routine.
2611 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
2612 targets. Set the correct library finalization routine depending on
2613 whether the library has controlled objects or this is a VM compilation.
2614 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
2615 to library-level finalizers of compiled units in reverse order of
2616 elaboration. It also produces exception management code and reraises a
2617 potential exception after all units have been finalized.
2618 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
2619 library-level finalizers of compiled units in reverse order of
2620 elaboration.
2621 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
2622 definitions of all library-level finalizers available to the compilation
2623 (Gen_Main_Ada): Directly call Adafinal which now contails all target
2624 dependent code.
2625 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
2626 System.Standard_Library.Adafinal directly. If the library needs
2627 finalization actions, create the sequence of finalization calls.
2628 (Gen_Output_File_Ada): Alphabetize local variables and constants.
2629 Generate a with clause for System.Soft_Links when compiling for a VM.
2630 Remove the code which imports System.Standard_Library.Adafinal as
2631 Do_Finalize. Generate the library finalization routine.
2632 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
2633 If the library needs finalization actions, create all the definitions
2634 of library- level finalizers.
2635 (Has_Finalizer): New routine. Determines whether at least one compiled
2636 unit has a library-level finalizer.
2637 Add type Qualification_Mode.
2638 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
2639 * einfo.adb: New usage of field 15 as Return_Flag.
2640 Remove Finalization_Chain_Entity from the usages of field 19.
2641 Remove Associated_Final_Chain from the usages of field 23.
2642 New usage of field 23 as Associated_Collection.
2643 New usage of field 24 as Finalizer.
2644 New usage of flag 252 as Is_Processed_Transient.
2645 (Associated_Final_Chain): Removed.
2646 (Associated_Collection): New routine.
2647 (Finalization_Chain_Entity): Removed.
2648 (Finalizer): New routine.
2649 (Is_Finalizer): New routine.
2650 (Is_Processed_Transient): New routine.
2651 (Return_Flag): New routine.
2652 (Set_Associated_Final_Chain): Removed.
2653 (Set_Associated_Collection): New routine.
2654 (Set_Finalization_Chain_Entity): Removed.
2655 (Set_Finalizer): New routine.
2656 (Set_Is_Processed_Transient): New routine.
2657 (Set_Return_Flag): New routine.
2658 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
2659 displayed flags.
2660 (Write_Field8_Name): Alphabetize the output.
2661 (Write_Field11_Name): Alphabetize the output.
2662 (Write_Field12_Name): Alphabetize the output.
2663 (Write_Field13_Name): Alphabetize the output.
2664 (Write_Field14_Name): Alphabetize the output.
2665 (Write_Field15_Name): Alphabetize the output.
2666 (Write_Field16_Name): Alphabetize the output.
2667 (Write_Field17_Name): Alphabetize the output.
2668 (Write_Field18_Name): Alphabetize the output.
2669 (Write_Field19_Name): Alphabetize the output. Remove the output of
2670 Finalization_Chain_Entity.
2671 (Write_Field20_Name): Alphabetize the output.
2672 (Write_Field21_Name): Alphabetize the output.
2673 (Write_Field22_Name): Alphabetize the output.
2674 (Write_Field23_Name): Alphabetize the output. Remove the output of
2675 Associated_Final_Chain. Add output for Associated_Collection.
2676 (Write_Field24_Name): Alphabetize the output.
2677 (Write_Field25_Name): Add output for Finalizer.
2678 (Write_Field26_Name): Alphabetize the output.
2679 (Write_Field27_Name): Alphabetize the output.
2680 (Write_Field28_Name): Alphabetize the output.
2681 * einfo.ads: Add new field description for Associated_Collection and
2682 its uses in nodes.
2683 Remove Associated_Final_Chain and its uses in nodes.
2684 Remove Finalization_Chain_Entity and its uses in nodes.
2685 Add new field description for Finalizer and its uses in nodes.
2686 Add new synthesized attribute Is_Finalizer.
2687 Add new flag description for Is_Processed_Transient and its uses in
2688 nodes.
2689 Add new field description for Return_Flag and its uses in nodes.
2690 (Associated_Final_Chain): Removed along with its pragma Inline.
2691 (Associated_Collection): New routine and pragma Inline.
2692 (Finalization_Chain_Entity): Removed along with its pragma Inline.
2693 (Finalizer): New routine and pragma Inline.
2694 (Is_Finalizer): New routine and pragma Inline.
2695 (Is_Processed_Transient): New routine and pragma Inline.
2696 (Return_Flag): New routine and pragma Inline.
2697 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
2698 (Set_Associated_Collection): New routine and pragma Inline.
2699 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
2700 (Set_Finalizer): New routine and pragma Inline.
2701 (Set_Is_Processed_Transient): New routine and pragma Inline.
2702 (Set_Return_Flag): New routine and pragma Inline.
2703 * exp_aggr.adb: Alphabetize subprograms.
2704 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
2705 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
2706 associated comments. Remove local variables External_Final_List and
2707 Attach.
2708 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
2709 Ancestor. Remove the retrieval of finalization lists. Update the call to
2710 Make_Adjust_Call.
2711 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
2712 lists. Update the call to Late_Expansion.
2713 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
2714 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
2715 (Gen_Assign): Remove the retrieval of the finalization list used to
2716 build the assignment. Update the calls to Make_Init_Call and
2717 Make_Adjust_Call.
2718 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
2719 Remove the mechanism to determine attachment levels and finalization
2720 list retrieval. Remove the processing for coextensions.
2721 (Init_Controller): Removed. Controllers no longer exist.
2722 (Late_Expansion): Remove formals Flist and Obj along with their
2723 associated comments. Update the calls to Build_Record_Aggr_Code and
2724 Build_Array_Aggr_Code.
2725 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
2726 (Expand_N_Freeze_Entity): Add special processing for finalizers which
2727 appear in entry bodies, protected subprograms and task bodies.
2728 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
2729 * exp_ch3.adb (Add_Final_Chain): Removed.
2730 (Build_Array_Init_Proc): Alphabetize local variables.
2731 (Build_Assignment): Alphabetize local variables. Update the call to
2732 Maked_Adjust_Call.
2733 (Build_Class_Wide_Master): Rename local variables to better reflect
2734 their role.
2735 (Build_Discriminant_Assignments): Code reformatting.
2736 (Build_Init_Call_Thru): Code reformatting.
2737 (Build_Init_Procedure): Code reformatting. Generate a special version
2738 of Deep_Finalize which is capable of finalizing all initialized
2739 components and ignore the rest.
2740 (Build_Init_Statements): Rename local variables to better reflect their
2741 role.
2742 Reimplement the mechanism to include the creation and update of an index
2743 variable called a "counter". It is used as a bookmark for tracing
2744 initialized and non-initialized components.
2745 (Build_Initialization_Call): Remove local variable Controller_Typ.
2746 Alphabetize all local variables. Remove the initialization of the
2747 record controller and update the call to Make_Init_Call.
2748 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
2749 New local variable Counter.
2750 (Constrain_Array): Alphabetize.
2751 (Expand_Freeze_Array_Type): Create a collection instead of a
2752 finalization list.
2753 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
2754 Finalize_Address which is used in conjunction with allocated controlled
2755 objects.
2756 (Expand_N_Object_Declaration): Remove the creation of a finalization
2757 list for anonymous access types. Update the calls to Make_Init_Call and
2758 Make_Adjust_Call.
2759 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
2760 retrieval of finalization lists. Remove the expansion of the record
2761 controller. Create TSS primitive Finalize_Address used in conjunction
2762 with controlled objects on the heap. Create finalization collections
2763 for access-to-controlled record components.
2764 (Expand_Record_Controller): Removed.
2765 (Freeze_Type): Remove the freezing of record controllers. Freezing of
2766 class-wide types now requires additional processing. Create
2767 finalization collections for access-to-controlled types.
2768 (Increment_Counter): New routine.
2769 (Make_Counter): New routine.
2770 (Make_Eq_If): Remove the mention of Name_uController.
2771 (Make_Predefined_Primitive_Specs): There is no longer need to skip
2772 types coming from System.Finalization_Root.
2773 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
2774 (Predefined_Primitive_Bodies): There is no longer need to skip types
2775 coming from System.Finalization_Root.
2776 (Stream_Operation_OK): Do not generate stream routines for
2777 type Ada.Finalization.Heap_Management.Finalization_Collection.
2778 * exp_ch3.ads: Alphabetize subprograms.
2779 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
2780 Add with and use clause for Lib.
2781 (Complete_Coextension_Finalization): Removed.
2782 (Complete_Controlled_Allocation): New routine. Create a finalization
2783 collection for anonymous access-to-controlled types. Create a custom
2784 Allocate which interfaces with the back end and the machinery in
2785 Heap_Management.
2786 (Expand_Allocator_Expression): Add necessary calls to
2787 Complete_Controlled_Allocation. Remove the retrieval of finalization
2788 lists. Update the calls to Make_Adjust_Call. Generate a call to
2789 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2790 the associated collection.
2791 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
2792 Code clean up. Remove the retrieval of finalization lists and
2793 attachment levels.
2794 Update the call to Make_Init_Call. Generate a call to
2795 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2796 the associated collection.
2797 (Get_Allocator_Final_List): Removed. Finalization lists are not
2798 available.
2799 (Suitable_Element): Remove the mention of Name_uController.
2800 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
2801 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
2802 the left hand side, carry out the assignment and adjust the left hand
2803 side.
2804 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
2805 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
2806 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
2807 BIP_Collection and BIPcollection.
2808 (Build_Heap_Allocator): New routine used to allocate the return object
2809 of a build-in-place function onto a collection.
2810 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
2811 (Expand_Call): Do not replace direct calls to Deep routines with their
2812 aliases.
2813 (Expand_N_Extended_Return_Statement): Give all variables shorter names
2814 and update their occurrences. Add a special return flag to monitor the
2815 [ab]normal execution of the function. The flag is set right before the
2816 return statement.
2817 Rewrite the mechanism used to allocate a build-in-place return object
2818 on the heap or on a storage pool.
2819 (Is_Direct_Deep_Call): New routine.
2820 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
2821 build-in-place function call instead of a final list. Build a call to
2822 Set_Finalize_Address_Ptr to decorate the associated collection.
2823 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
2824 order to name the build-in-place function call's result for later
2825 finalization. Add a collection to a build-in-place function call
2826 instead of a final list.
2827 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
2828 build-in-place function call instead of a final list. Remove the code
2829 which moves one final list and transforms it into the actual in a
2830 nested build-in-place call.
2831 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
2832 build-in-place function call instead of a final list.
2833 (Move_Final_List): Removed.
2834 (Needs_BIP_Collection): New routine.
2835 (Needs_BIP_Final_List): Removed.
2836 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
2837 enumeration type BIP_Formal_Kind.
2838 Update the related comment.
2839 (Needs_BIP_Collection): New routine.
2840 (Needs_BIP_Final_List): Removed.
2841 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
2842 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
2843 majority of subprograms in this unit. Add Name_Finalize_Address to
2844 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
2845 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
2846 statements for an array type.
2847 (Build_Adjust_Statements): Create the adjust statements for a record
2848 type.
2849 (Build_Cleanup_Statements): New routine. A procedure which given any
2850 construct containing asynchronous calls, references to _master, or is a
2851 task body, a task allocation or a protected body produces the necessary
2852 runtime calls to clean up these constructs.
2853 (Build_Exception_Handler): New routine.
2854 (Build_Final_List): Removed.
2855 (Build_Finalization_Collection): New routine. A core procedure which
2856 creates a collection to service heap allocated controlled objects
2857 associated with an access-to-controlled type.
2858 (Build_Finalize_Statements): Create the finalization statements for a
2859 record types.
2860 (Build_Finalizer): New routine. A core procedure which given any
2861 construct with declarations and/or statements detects all objects which
2862 need any type of clean up (controlled objects, protected objects) and
2863 generates all necessary code to clean up the said objects in the proper
2864 order.
2865 (Build_Finalizer_Call): New routine.
2866 (Build_Initialize_Statements): Create the initialization statements for
2867 an array type. The generated routine contains code to finalize partially
2868 initialized arrays.
2869 (Build_Object_Declarations): New routine.
2870 (Build_Raise_Statement): New routine.
2871 (Clean_Simple_Protected_Objects): Removed.
2872 (Controller_Component): Removed.
2873 (Enclosing_Function): New routine.
2874 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
2875 either declarations or statements or both.
2876 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
2877 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
2878 package.
2879 (Find_Final_List): Removed.
2880 (Global_Flist_Ref): Removed.
2881 (In_Finalization_Root): Removed.
2882 (Insert_Actions_In_Scope_Around): Determine the range of the transient
2883 scope in terms of tree nodes. Process all transient variables within
2884 that range.
2885 (Make_Adjust_Call): Rewritten. There is no longer an attach call
2886 generated after the adjust.
2887 (Make_Attach_Call): Removed.
2888 (Make_Call): New routine.
2889 (Make_Clean): Removed.
2890 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
2891 build routines.
2892 (Make_Deep_Proc): Rewritten to generate the new profile signature used
2893 in Deep routines.
2894 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
2895 build routines.
2896 (Make_Final_Call): Modified to simply create a call to either
2897 Deep_Finalize or Finalize.
2898 (Make_Finalize_Address_Body): New routine.
2899 (Make_Finalize_Address_Stmts): New routine. A function which produces
2900 TSS primitive Finalize_Address used in conjunction with heap allocated
2901 controlled objects.
2902 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
2903 (Make_Init_Call): Rewritten. There is no longer an attach call
2904 generated after initialization.
2905 (Make_Local_Deep_Finalize): New routine.
2906 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2907 (Make_Transient_Block): Remove the finalization list retrieval and
2908 manipulation.
2909 (Needs_Finalization): Moved to Exp_Util.
2910 (Parent_Field_Type): New routine.
2911 (Preprocess_Components): New routine.
2912 (Process_Transient_Objects): New routine.
2913 (Wrap_HSS_In_Block): New routine.
2914 (Wrap_Transient_Declaration): Remove finalization list management and
2915 controller insertion.
2916 (Wrap_Transient_Expression): Code reformatting.
2917 (Wrap_Transient_Statement): Code reformatting.
2918 * exp_ch7.ads (Build_Final_List): Removed.
2919 (Build_Finalization_Collection): New routine.
2920 (Build_Raise_Statement): New routine.
2921 (Controller_Component): Removed.
2922 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
2923 (Find_Final_List): Removed.
2924 (In_Finalization_Root): Removed.
2925 (Is_Simple_Protected_Type): Update related comment.
2926 (Make_Adjust_Call): New parameter profile and associated comments.
2927 (Make_Attach_Call): Removed.
2928 (Make_Final_Call): New parameter profile and associated comments.
2929 (Make_Finalize_Address_Body): New routine.
2930 (Make_Init_Call): New parameter profile and associated comments.
2931 (Make_Local_Deep_Finalize): New routine.
2932 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2933 (Needs_Finalization): Moved to Exp_Util.
2934 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
2935 (Expand_N_Protected_Body): Remove the handling of finalization lists.
2936 (Find_Protection_Type): Moved to Exp_Util.
2937 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
2938 (Make_DT): Update sequence of dispatch table initialization. Remove the
2939 initialization of field RC_Offset. Add initialization of field Needs_
2940 Finalization.
2941 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
2942 Reimplement how an object is first finalized, then deallocated.
2943 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2944 Code reformatting.
2945 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
2946 Register TSS_Finalize_Address with type TSS_Names.
2947 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
2948 procedure provides the interface between an allocation / deallocation
2949 and the support machinery in Ada.Finalization.Heap_Management.
2950 (Find_Init_Call): Code reformatting.
2951 (Find_Init_Call_In_List): Code reformatting.
2952 (Find_Protection_Type): Moved from Exp_Ch9.
2953 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
2954 (Has_Controlled_Coextensions): Removed.
2955 (Has_Controlled_Objects): New routine.
2956 (In_Library_Level_Package_Body): New routine.
2957 (Insert_Action_After): New routine.
2958 (Is_Finalizable_Transient): New routine. This predicate determines
2959 whether an object declaration is one of the many variants of controlled
2960 transients.
2961 (Is_Null_Access_BIP_Func_Call): New routine.
2962 (Is_Non_BIP_Func_Call): New routine.
2963 (Is_Related_To_Func_Return): New routine.
2964 (Needs_Finalization): Moved from Exp_Ch7.
2965 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
2966 (Find_Protection_Type): Moved from Exp_Ch9.
2967 (Has_Controlled_Coextensions): Removed.
2968 (Has_Controlled_Objects): New routine.
2969 (In_Library_Level_Package_Body): New routine.
2970 (Insert_Action_After): New routine.
2971 (Is_Finalizable_Transient): New routine.
2972 (Is_Null_Access_BIP_Func_Call): New routine.
2973 (Is_Non_BIP_Func_Call): New routine.
2974 (Is_Related_To_Func_Return): New routine.
2975 (Needs_Finalization): Moved from Exp_ch7.
2976 * expander.adb (Expand): Add a case for N_Free_Statement.
2977 * freeze.adb (Freeze_All): Replace the generation of a finalization
2978 list with a collection for access-to-controlled types.
2979 (Freeze_Entity): Code reformatting.
2980 (Freeze_Record_Type): Remove the freezing of a record controller
2981 component.
2982 (Freeze_Subprogram): Code reformatting.
2983 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
2984 finalization list.
2985 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
2986 has a library-level finalizer.
2987 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
2988 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
2989 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
2990 files. Add a-fihema to the list of object files.
2991 * par-ch4.adb:
2992 Alphabetize the associations in type Is_Parameterless_Attribute.
2993 * rtsfind.ads: Ada.Finalization_List.Controller and
2994 System.Finalization_Implementation are no longer a GNAT unit.
2995 Update the range of type Ada_Finalization_Child. Remove the following
2996 recoverable entities:
2c7f9cc0 2997
df3e68b1
HK
2998 RE_Attach_To_Final_List
2999 RE_Deep_Tag_Attach
3000 RE_Finalize_List
3001 RE_Finalize_One
3002 RE_Finalizable_Ptr_Ptr
3003 RE_Global_Final_List
3004 RE_Limited_Record_Controller
3005 RE_List_Controller
3006 RE_Move_Final_List
3007 RE_Record_Controller
3008 RE_Simple_List_Controller
2c7f9cc0 3009
df3e68b1 3010 Add the following recoverable entities:
2c7f9cc0 3011
df3e68b1
HK
3012 RE_Add_Offset_To_Address
3013 RE_Allocate
3014 RE_Base_Pool
3015 RE_Deallocate
3016 RE_Exception_Identity
3017 RE_Finalization_Collection
3018 RE_Finalization_Collection_Ptr
3019 RE_Needs_Finalization
3020 RE_Save_Library_Occurrence
3021 RE_Set_Finalize_Address_Ptr
3022 RE_Set_Storage_Pool_Ptr
3023 RE_Storage_Count
3024 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
3025 Name_uController.
3026 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
3027 (First_Stored_Discriminant): Remove the mention of Name_uController.
3028 * sem_aux.ads: Comment reformatting.
3029 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
3030 to redecorate an already existing class-wide type.
3031 (Decorate_Tagged_Type): New parameter profile and associated comment.
3032 Create a "shadow class-wide type" for a shadow entity.
3033 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
3034 of the final chain along with the associated comment.
3035 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
3036 Full_Desig and set it to the full view of the designated type.
3037 Initialize the finalization collection to empty.
3038 (Build_Derived_Record_Type): Alphabetize local variables. Code
3039 reformatting.
3040 (Collect_Fixed_Components): Remove the mention of Name_uController.
3041 (Create_Constrained_Components): Remove the mention of Name_uController.
3042 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
3043 class-wide type of a shadow entity.
3044 (Process_Full_View): Update the machinery which marks type
3045 Limited_Controlled's entity as limited.
3046 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
3047 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
3048 list, instead make a collection build-in-place formal.
3049 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
3050 a designated type in order to establish a match between the renaming
3051 and the renamed entity.
3052 (Find_Selected_Component): Add guard to prevent spurious exceptions
3053 from being raised on .NET/JVM.
3054 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
3055 to the list of primitive that need special processing. Update arrays
3056 C_Names and D_Names.
3057 (Replace_Types): Handle class-wide types.
3058 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
3059 different parameter profile, look at the first formal.
3060 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
3061 use clauses for Exp_Util.
3062 * sem_res.adb: Remove with and use clauses for Elists.
3063 (Propagate_Coextensions): Removed.
3064 (Resolve_Allocator): Do not propagate the list of coextensions from one
3065 allocator to another.
3066 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
3067 Deaccessed_T to Desig_Typ.
3068 (Enter_Name): Remove the mention of Name_uController.
3069 (Gather_Components): Remove the mention of Name_uController.
3070 (Incomplete_Or_Private_View): New routine.
3071 (Is_Coextension_Root): Removed.
3072 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
3073 * sem_util.ads (Incomplete_Or_Private_View): New routine.
3074 (Is_Coextension_Root): Removed.
3075 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
3076 Controlled types are now derived from a null tagged record. Remove
3077 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
3078 * sinfo.adb (Coextensions): Removed.
3079 (Set_Coextensions): Removed.
3080 * sinfo.ads: Remove Coextensions from the explanation of node fields
3081 and its uses in nodes.
3082 Update the field usage of N_Allocator.
3083 (Coextensions): Removed along with its pragma Inline.
3084 (Set_Coextensions): Removed along with its pragma Inline.
3085 * snames.ads-tmpl: Remove names
2c7f9cc0 3086
df3e68b1
HK
3087 Name_uClean
3088 Name_uController
3089 Name_uFinal_List
3090 Name_uLocal_Final_List
3091 Name_Finalization_Root
3092 Name_Next
3093 Name_Prev
2c7f9cc0 3094
df3e68b1 3095 Add names
2c7f9cc0 3096
df3e68b1
HK
3097 Name_uFinalizer
3098 Name_Finalize_Address
3099 * s-pooglo.adb (Allocate): Add overriding indicator.
3100 (Deallocate): Add overriding indicator.
3101 (Storage_Size): Add overriding indicator.
3102 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
3103 than Finalize_Global_List.
3104 (Null_Finalize_Global_List): Removed.
3105 (Save_Library_Occurrence): New routine.
3106 * s-soflin.ads: Remove variable Finalize_Global_List along with its
3107 initialization. Add variable Finalize_Library_Objects along with its
3108 pragma Export. Add variables Library_Exception and
3109 Library_Exception_Set along with their pragma Export.
3110 (Null_Finalize_Global_List): Removed.
3111 (Save_Library_Occurrence): New routine.
3112 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
3113 rather than Finalize_Global_List.
3114 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
3115 of the constructed node.
3116
2ee06322
RO
31172011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3118
3119 * link.c: Include "auto-host.h" before system headers.
3120
f77b022b
VC
31212011-08-03 Vincent Celier <celier@adacore.com>
3122
3123 * make.adb (Gnatmake): Add to table Library_Projs only library projects
3124 that are not extended. Do not check if a library project that is
3125 extended should be regenerated. Do not add to table Library_Paths the
3126 libraries that are in extended projects. Link only with libraries that
3127 are in libray projects that are not extended.
3128 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
3129 for a library project that is extended.
3130
0187b60e
AC
31312011-08-03 Gary Dismukes <dismukes@adacore.com>
3132
3133 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
3134 conforming subprogram renamings that appear to be completions if they
3135 are not fully conformant.
3136 Such renamings are homographs but not completions.
3137 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
3138 names in a subprogram renaming that appears in an instance.
3139
31402011-08-03 Ed Schonberg <schonberg@adacore.com>
3141
3142 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
3143 not immutably limited, build actual subtype from expression to provide
3144 proper bounds to caller.
3145
31462011-08-03 Gary Dismukes <dismukes@adacore.com>
3147
3148 * sem_ch8.adb: Minor comment correction.
3149
31502011-08-03 Thomas Quinot <quinot@adacore.com>
3151
3152 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
3153 returning a limited array, use an extended return statement.
3154
31552011-08-03 Vincent Celier <celier@adacore.com>
3156
3157 * make.adb (Initialize): If --subdirs= is used, but no project file is
3158 specified, attempt to create the specify subdir if it does not already
3159 exist and use it as the object directory as if -D had been specified.
3160
31612011-08-03 Arnaud Charlet <charlet@adacore.com>
3162
3163 * s-tpopsp-vms.adb: New file.
3164 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
3165 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
3166
e280f981
AC
31672011-08-03 Emmanuel Briot <briot@adacore.com>
3168
3169 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
3170 package.
3171
31722011-08-03 Yannick Moy <moy@adacore.com>
3173
3174 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
3175 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
3176 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
3177 detect that an array has static bounds.
3178
98c99a5a
AC
31792011-08-03 Thomas Quinot <quinot@adacore.com>
3180
3181 * exp_dist.adb: Minor reformatting.
3182
31832011-08-03 Arnaud Charlet <charlet@adacore.com>
3184
3185 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
3186 (ATCB_Key): Removed, not always used.
3187
31882011-08-03 Emmanuel Briot <briot@adacore.com>
3189
3190 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
3191 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
3192 most remaining global variables.
3193
686d0984
AC
31942011-08-03 Robert Dewar <dewar@adacore.com>
3195
3196 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
3197 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
3198 reformatting.
3199
32002011-08-03 Javier Miranda <miranda@adacore.com>
3201
3202 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
3203 that must be passed by copy in VM targets.
3204
32052011-08-03 Emmanuel Briot <briot@adacore.com>
3206
3207 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
3208 duplicates a similar htable now in the project tree.
3209
32102011-08-03 Claire Dross <dross@adacore.com>
3211
3212 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
3213 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
3214 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
3215 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
3216 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
3217 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
3218 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
3219 update.
3220
32212011-08-03 Arnaud Charlet <charlet@adacore.com>
3222
3223 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
3224 (ATCB_Key): Removed, not always used.
3225 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
3226 s-taprop-posix.adb.
3227 * s-tpopsp-tls.adb: New file.
3228 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
3229 x86/x64/ia64/powerpc/sparc Linux.
3230
32312011-08-03 Arnaud Charlet <charlet@adacore.com>
3232
3233 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
3234 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
3235
32362011-08-03 Thomas Quinot <quinot@adacore.com>
3237
3238 * rtsfind.ads, exp_dist.adb, exp_dist.ads
3239 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
3240 Fix type selection for mapping integer types to PolyORB types.
3241
32422011-08-03 Bob Duff <duff@adacore.com>
3243
3244 * sem_ch7.adb: Minor comment clarification.
3245
32462011-08-03 Bob Duff <duff@adacore.com>
3247
3248 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
3249 an error analyzing a choice, skip further processing. Further
3250 processing could cause a crash or cascade errors.
3251
40ecf2f5
EB
32522011-08-03 Emmanuel Briot <briot@adacore.com>
3253
3254 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
3255 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
3256 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
3257 prj-env.ads (Shared_Project_Tree_Data): new type
3258 An aggregate project and its aggregated trees need to share the common
3259 data structures used for lists of strings, packages,... This makes the
3260 code simpler since otherwise we have to pass the root tree (also used
3261 for the configuration file data) in addition to the current project
3262 tree. This also avoids ambiguities as to which tree should be used.
3263 And finally this saves a bit of memory.
3264 (For_Every_Project_Imported): new parameter Tree.
3265 Since aggregated projects are using a different tree, we need to let
3266 the caller know which tree to use to manipulate the returned project.
3267
9fde638d
RD
32682011-08-03 Robert Dewar <dewar@adacore.com>
3269
3270 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
3271 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
3272 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
3273 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
3274
95eb8b69
AC
32752011-08-03 Javier Miranda <miranda@adacore.com>
3276
3277 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
3278 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
3279
32802011-08-03 Bob Duff <duff@adacore.com>
3281
3282 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
3283 the Base_Type.
3284
32852011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
3286
3287 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
3288 g-sehash.ads: Fix typo. Update header.
3289
32902011-08-03 Thomas Quinot <quinot@adacore.com>
3291
3292 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
3293 expansion.
3294
32952011-08-03 Gary Dismukes <dismukes@adacore.com>
3296
3297 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
3298 prefixes of private types along with records, since the selector may be
3299 a discriminant.
3300 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3301 private types along with records, since the selector may be a
3302 discriminant.
3303
92e77027
AC
33042011-08-03 Emmanuel Briot <briot@adacore.com>
3305
b2f7ebc1 3306 * prj-pp.adb (Pretty_Print): Remove trailing blank line.
92e77027
AC
3307
33082011-08-03 Javier Miranda <miranda@adacore.com>
3309
3310 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3311 Tagged_Type_Expansion.
3312
33132011-08-03 Yannick Moy <moy@adacore.com>
3314
b2f7ebc1
GP
3315 * sem_res.adb (Resolve_Op_Concat_Arg): Do not issue a SPARK
3316 violation when the argument of concatenation is the name of a
3317 constant.
92e77027 3318
ab29a348
EB
33192011-08-03 Emmanuel Briot <briot@adacore.com>
3320
3321 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3322 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3323 (Process_Declarative_Items): new parameter Child_Env.
3324
9466892f
AC
33252011-08-03 Yannick Moy <moy@adacore.com>
3326
589ef536
GP
3327 * alfa.ads: Update format of ALFA section in ALI file in order to
3328 add a mapping from bodies to specs when both are present.
3329 (ALFA_Scope_Record): Add components for spec file/scope.
3330 * get_alfa.adb (Get_ALFA): Read the new file/scope for spec when
3331 present.
3332 * lib-xref-alfa.adb (Collect_ALFA): After all scopes have been
3333 collected, fill in the spec information when relevant.
3334 * put_alfa.adb (Put_ALFA): Write the new file/scope for spec when
9466892f
AC
3335 present.
3336
33372011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3338
3339 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3340 code unit to decide whether to add internally generated subprograms.
2c7f9cc0 3341
9466892f
AC
33422011-08-03 Javier Miranda <miranda@adacore.com>
3343
3344 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
589ef536
GP
3345 * exp_ch9.adb (Build_Simple_Entry_Call): Handle actuals that must
3346 be handled by copy in VM targets.
9466892f
AC
3347
33482011-08-03 Emmanuel Briot <briot@adacore.com>
3349
589ef536 3350 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): Share
9466892f
AC
3351 code with Makeutl.Get_Switches.
3352 * prj-tree.adb: Update comment.
3353
b5ea9143
AC
33542011-08-03 Thomas Quinot <quinot@adacore.com>
3355
3356 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
3357 subprogram with a limited formal that does not support external
3358 streaming.
3359
33602011-08-03 Yannick Moy <moy@adacore.com>
3361
3362 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
3363 continuation line
3364 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
3365 not from current unit in two phases, because it is not possible to
3366 change the table while iterating over its content.
3367 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
3368
33692011-08-03 Sergey Rybin <rybin@adacore.com>
3370
3371 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
3372 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
3373
668a19bc
ES
33742011-08-03 Ed Schonberg <schonberg@adacore.com>
3375
3376 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
3377 and the component type is composite, this is ambiguous for predefined
3378 concatenation, but if the node is not overloaded and the entity is a use
3379 -defined function its profile can be used to resolve that aggregate.
3380
170b2989
AC
33812011-08-03 Robert Dewar <dewar@adacore.com>
3382
3383 * exp_ch4.adb: Minor code cleanup.
3384
33852011-08-03 Thomas Quinot <quinot@adacore.com>
3386
3387 * exp_dist.adb: Do not generate distribution stubs if serious errors
3388 have been diagnosed.
3389
33902011-08-03 Ed Schonberg <schonberg@adacore.com>
3391
3392 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
3393 the first formal of a primitive operation, go to the base type to
3394 handle properly an access to a derived type with constrained
3395 discriminants.
3396 * sem_type.adb (Disambiguate): an immediately visible operator hides a
3397 user-defined function that is only use-visible.
170b2989 3398
e917aec2
RD
33992011-08-03 Robert Dewar <dewar@adacore.com>
3400
3401 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
3402 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
3403 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
3404 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
3405 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
3406 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
3407 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
3408 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
3409
34102011-08-03 Robert Dewar <dewar@adacore.com>
3411
3412 * repinfo.adb (List_Mechanism): Add handling of
3413 Convention_Ada_Pass_By_XXX.
3414 * sem_mech.adb (Set_Mechanism): Ditto.
3415 * sem_prag.adb (Process_Convention): Add entries for
3416 Convention_Ada_Pass_By_XXX.
3417 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
3418
49bfcf43
AC
34192011-08-03 Pascal Obry <obry@adacore.com>
3420
3421 * makeutl.adb: Minor reformatting.
3422
34232011-08-03 Vincent Celier <celier@adacore.com>
3424
3425 * fname-uf.adb
3426 (Get_File_Name) If the file cannot be found when there are no config
3427 pragmas file and May_Fail is True, return No_File instead of the file
3428 name, to be consistent.
3429
34302011-08-03 Pascal Obry <obry@adacore.com>
3431
3432 * adaint.c (__gnat_is_executable_file_attr): Avoid access
3433 to null pointer.
3434
34352011-08-03 Javier Miranda <miranda@adacore.com>
3436
3437 * sem_ch13.adb
3438 (Same_Representation): In VM targets the representation of arrays with
3439 aliased components differs from arrays with non-aliased components.
3440
34798441
EB
34412011-08-03 Emmanuel Briot <briot@adacore.com>
3442
3443 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
3444 not systematically lower case attribute indexes that contain no "."
3445 Fix definition of several Naming attributes, which take
3446 a unit name as index and therefore should be case insensitive.
3447 Minor refactoring (reduce length of variable names).
3448
34492011-08-03 Emmanuel Briot <briot@adacore.com>
3450
3451 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
3452
4437a530
EB
34532011-08-03 Emmanuel Briot <briot@adacore.com>
3454
3455 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
3456 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
3457 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
3458 prj-tree.ads (Prj.Tree.Environment): new type.
3459
804fe3c4
EB
34602011-08-03 Emmanuel Briot <briot@adacore.com>
3461
3462 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
3463 prj-tree.adb, prj-tree.ads (Environment): new type.
3464
c565bc66
AC
34652011-08-03 Emmanuel Briot <briot@adacore.com>
3466
3467 * prj-tree.ads: Remove unused variable.
3468
34692011-08-03 Yannick Moy <moy@adacore.com>
3470
3471 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
3472 issuing messages related to SPARK restriction violation.
3473
4ee646da
AC
34742011-08-03 Ed Schonberg <schonberg@adacore.com>
3475
3476 * sem_ch6.adb: guard against error nodes in return statements.
3477
34782011-08-03 Arnaud Charlet <charlet@adacore.com>
3479
3480 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
3481 a warning can only appear on a configuration file, so emit warning
3482 without further checks.
3483
34842011-08-03 Arnaud Charlet <charlet@adacore.com>
3485
3486 * s-interr.ads: add overriding keyword.
3487
34882011-08-03 Geert Bosch <bosch@adacore.com>
3489
3490 * exp_attr.adb: Fix minor typo.
3491
34922011-08-03 Ed Schonberg <schonberg@adacore.com>
3493
3494 * par-ch4.adb: improve error recovery.
3495
c0e538ad
AC
34962011-08-03 Emmanuel Briot <briot@adacore.com>
3497
3498 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
3499 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
3500 to Errout_Handling.
3501
35022011-08-03 Emmanuel Briot <briot@adacore.com>
3503
3504 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
3505 "external" as an attribute name in aggregate projects.
3506
35072011-08-03 Jose Ruiz <ruiz@adacore.com>
3508
3509 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
3510 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
3511 from 0, so we need to adjust.
3512
35132011-08-03 Emmanuel Briot <briot@adacore.com>
3514
3515 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
3516 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
3517
c4d67e2d
AC
35182011-08-03 Yannick Moy <moy@adacore.com>
3519
3520 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
3521 restriction on overloaded entity if the entity is not an operator.
3522
35232011-08-03 Yannick Moy <moy@adacore.com>
3524
3525 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
3526 restrict.ads: Rename remaining Check_Formal_Restriction* into
3527 Check_SPARK_Restriction*.
3528
35292011-08-03 Emmanuel Briot <briot@adacore.com>
3530
3531 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
3532 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
3533 qualifier.
3534 (Project_Empty): removed
3535 (Empty_Project): new parameter Qualifier
3536 This is used to have fields specific to aggregate projects, cleaner
3537 New field to store the list of aggregated projects.
3538 (Check_Aggregate_Project): removed
3539 (Process_Aggregated_Projects, Free): new subprograms.
3540
3f5a8fee
AC
35412011-08-03 Olivier Hainque <hainque@adacore.com>
3542
3543 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
3544
35452011-08-03 Ed Schonberg <schonberg@adacore.com>
3546
3547 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
3548 explicit dereference of an unconstrained type, create a constrained
3549 subtype for it, as is done for function calls that return an
3550 unconstrained type.
3551
35522011-08-03 Thomas Quinot <quinot@adacore.com>
3553
3554 * g-pehage.adb (Finalize): Avoid possible double-free.
3555
35562011-08-03 Steve Baird <baird@adacore.com>
3557
3558 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
3559 Elab_Spec/Body attrs in CodePeer_Mode.
3560
35612011-08-03 Javier Miranda <miranda@adacore.com>
3562
3563 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
3564 low bound is not known at compile time but they have no others choice.
3565 Done because in this case the bounds can be obtained directly from the
3566 aggregate.
3567
35682011-08-03 Ed Falis <falis@adacore.com>
3569
3570 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
3571 on VxWorks SMP. Remove unusable constant ANY_CPU.
3572
a96ca600
EB
35732011-08-03 Emmanuel Briot <briot@adacore.com>
3574
3575 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
3576 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
3577 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
3578 Prj.Env.Initialize_Empty): new subprograms
3579 (Get_Env, Find_Project): remove parameter Target_Name.
3580
3e582869
AC
35812011-08-03 Gary Dismukes <dismukes@adacore.com>
3582
3583 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
3584 as a condition for the delayed call to Derived_Subprograms done for the
3585 case of the rewriting of a derived type that constrains the
3586 discriminants of its parent type.
3587 Avoids redundant subprogram derivations for private subtype derivations.
3588
35892011-08-03 Javier Miranda <miranda@adacore.com>
3590
3591 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
3592 Build_Record_Aggr_Code.
3593 (Build_Record_Aggr_Code): Add missing support to initialize hidden
3594 discriminants in extension aggregates.
3595
35962011-08-03 Emmanuel Briot <briot@adacore.com>
3597
3598 * prj-pp.adb (Print): also output project qualifiers, since in
3599 particular "aggregate" is mandatory in an aggregate project.
3600
36012011-08-03 Emmanuel Briot <briot@adacore.com>
3602
3603 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
3604 (Debug_Output): new function.
3605
56e94186
AC
36062011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3607
3608 * gnat_ugn.texi: Document -Wstack-usage.
3609 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
3610
36112011-08-03 Thomas Quinot <quinot@adacore.com>
3612
3613 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
3614 have keyword LIMITED.
3615
36162011-08-03 Yannick Moy <moy@adacore.com>
3617
3618 * alfa.adb, alfa.ads, alfa_test.adb: New files.
3619 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
3620 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
3621 section (does not happen in compiler, only if code directly calls
3622 Scan_ALI).
3623 * get_alfa.adb, get_alfa.ads: New files.
3624 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
3625 needed.
3626 * lib-xref-alfa.adb: New file.
3627 * lib-xref.adb, lib-xref.ads
3628 (Xref_Entry): redefine information needed in cross-references for ALFA.
3629 Push ALFA treatments in separated local package.
3630 (Enclosing_Subpragram_Or_Package): treat specially subprogram
3631 identifiers. Return entity of package body instead of spec. Return
3632 Empty for a scope with no location.
3633 (Generate_Reference): adapt to new components for ALFA information.
3634 Remove the need for D references on definitions.
3635 (Is_Local_Reference): moved to ALFA local package
3636 (Output_References): extract subfunction as Extract_Source_Name
3637 (Output_Local_References): remove procedure, replaced by filtering of
3638 cross-references in package ALFA and printing in Put_ALFA.
3639 (Write_Entity_Name): remove procedure
3640 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
3641 print exact name of entity as it appears in source file
3642 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
3643 * put_alfa.adb, put_alfa.ads: New files.
3644 * xref_lib.adb (Search_Xref): protect read of cross-references against
3645 reading other sections of the ALI file, in gnatxref
3646 (Search): protect read of cross-references against reading other
3647 sections of the ALI file, in gnatfind.
3648 * gcc-interface/Make-lang.in: Update dependencies.
3649
36502011-08-03 Thomas Quinot <quinot@adacore.com>
3651
3652 * sem_ch3.adb: Minor reformatting.
3653
36542011-08-03 Jose Ruiz <ruiz@adacore.com>
3655
3656 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
3657 raising an exception.
3658
36592011-08-03 Ed Schonberg <schonberg@adacore.com>
3660
3661 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
3662 type, always use 1 as the lower bound or string, even if lower bound of
3663 context is not static, to handle properly null strings in a non-static
3664 context.
3665
36662011-08-03 Bob Duff <duff@adacore.com>
3667
3668 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
3669 always legal on the right-hand side of an assignment statement; there
3670 is always an applicable index constraint in this case. Therefore, the
3671 check for Pkind = N_Assignment_Statement is now unconditional -- it
3672 doesn't depend on whether Is_Constrained (Typ).
3673
4317e442
AC
36742011-08-03 Robert Dewar <dewar@adacore.com>
3675
3676 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
3677
36782011-08-03 Ed Schonberg <schonberg@adacore.com>
3679
3680 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
3681 for an itype created within a generic unit.
3682
36832011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3684
3685 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
3686 suppresses all inlining.
3687
53f29d4f
AC
36882011-08-03 Robert Dewar <dewar@adacore.com>
3689
3690 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
3691 exp_aggr.adb: Minor reformatting.
3692
36932011-08-03 Thomas Quinot <quinot@adacore.com>
3694
3695 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
3696 tagged assignment when discriminant checks are suppressed. This is
3697 useless and extremely costly in terms of static stack usage.
3698
36992011-08-03 Bob Duff <duff@adacore.com>
3700
3701 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
3702 of generics, because this leads to the wrong entity in the wrong scope,
3703 causing (e.g.) pragma Export_Procedure to get an error if the entity is
3704 an instance.
3705 (Process_Interface_Name): Follow Alias for instances of generics, to
3706 correct for the above change.
3707
37082011-08-03 Ed Schonberg <schonberg@adacore.com>
3709
3710 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
3711 is an integer literal it is always safe to replace the reference. In
3712 addition, if the reference appears in the generated code for an object
3713 declaration it is necessary to copy because otherwise the reference
3714 might be to the uninitilized value of the discriminant of the object
3715 itself.
3716
37172011-08-03 Pascal Obry <obry@adacore.com>
3718
3719 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
3720 ACL used, in this case we want to check for ending .exe, not .exe
3721 anywhere in the path.
3722
37232011-08-03 Sergey Rybin <rybin@adacore.com>
3724
3725 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3726 the tree structure (semantic decoration of references to record
3727 discriminants).
3728
c0b11850
AC
37292011-08-03 Gary Dismukes <dismukes@adacore.com>
3730
3731 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
3732 choices of a named array aggregate, bail out when any choices are
3733 marked as Errors_Posted.
3734
37352011-08-03 Ed Schonberg <schonberg@adacore.com>
3736
3737 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
3738 in which entity is frozen, to handle properly loop variables in
3739 iterators.
3740
37412011-08-03 Ed Schonberg <schonberg@adacore.com>
3742
3743 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
3744 subtype is not static, compute the upper bound using attributes, to
3745 handle properly index types that are not integer types.
3746
37472011-08-03 Bob Duff <duff@adacore.com>
3748
3749 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
3750 Update copyright notice.
3751
37522011-08-03 Ed Schonberg <schonberg@adacore.com>
3753
3754 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
3755 Original_Discriminant if within an instance.
3756 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
3757
37582011-08-03 Thomas Quinot <quinot@adacore.com>
3759
3760 * einfo.ads: Minor reformatting.
3761
37622011-08-03 Ed Schonberg <schonberg@adacore.com>
3763
3764 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
3765 composite type with an unfrozen subcomponent, in the profile of a
3766 primitive operation.
3767
5c34e9cd
AC
37682011-08-03 Robert Dewar <dewar@adacore.com>
3769
3770 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3771
37722011-08-03 Ed Schonberg <schonberg@adacore.com>
3773
3774 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
3775 unconstrained type with discriminants is initialized with an aggregate,
3776 use the constrained subtype of the aggregate as the type of the object,
3777 because it is immutable, and this allows the back-end to generate no
3778 code for the object declaration.
3779
abcd9db2
AC
37802011-08-03 Robert Dewar <dewar@adacore.com>
3781
3782 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
3783 comparison operand is variable, and turns out to be zero or negative.
3784
37852011-08-03 Javier Miranda <miranda@adacore.com>
3786
3787 * exp_intr.adb
3788 (Expand_Dispatching_Constructor_Call): Disable expansion of
3789 code required for native targets. Done to avoid generating
3790 references to unavailable runtime entities in VM targets.
3791 * exp_ch3.adb
3792 (Expand_N_Object_Declaration): Add missing support to handle
3793 the explicit initialization of class-wide interface objects.
3794 Fix documentation.
3795
37962011-08-03 Matthew Heaney <heaney@adacore.com>
3797
3798 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
3799
38002011-08-03 Matthew Heaney <heaney@adacore.com>
3801
3802 * a-cbdlli.adb (Splice): move source items from first to last
3803
38042011-08-03 Yannick Moy <moy@adacore.com>
3805
3806 * sem_util.ads: comment added.
3807
38082011-08-03 Javier Miranda <miranda@adacore.com>
3809
3810 * exp_aggr.adb
3811 (Expand_Record_Aggregate): In VM targets disable the expansion into
3812 assignments of aggregates whose type is not known at compile time.
3813
b474d6c3
ES
38142011-08-03 Ed Schonberg <schonberg@adacore.com>
3815
3816 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
3817 protected entries and task entries, to build the proper renaming
3818 declaration for entry formals, used in debugging.
3819 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
3820 parameters in the same way.
3821
0580d807
AC
38222011-08-02 Robert Dewar <dewar@adacore.com>
3823
3824 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
3825 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
3826 code reorganization.
3827
38282011-08-02 Robert Dewar <dewar@adacore.com>
3829
3830 * debug.adb: Debug flag d.P to suppress length comparison optimization
3831 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
3832 comparison of Length by comparing First/Last instead.
3833
38342011-08-02 Matthew Heaney <heaney@adacore.com>
3835
3836 * a-cobove.ads: Code clean up.
3837
b191a125
AC
38382011-08-02 Vincent Celier <celier@adacore.com>
3839
3840 * adaint.c (file_names_case_sensitive_cache): New static int.
3841 (__gnat_get_file_names_case_sensitive): Cache the return value in
3842 file_names_case_sensitive_cache at the first invocation, to avoid
3843 multiple calls to getenv.
3844
38452011-08-02 Bob Duff <duff@adacore.com>
3846
3847 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
3848
316a0661
AC
38492011-08-02 Yannick Moy <moy@adacore.com>
3850
3851 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
3852 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
3853 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
3854 indicate that we are in a precondition or postcondition. This is used in
3855 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
3856 decide whether to flag the spec or body of the current subprogram as
3857 not in ALFA.
3858
38592011-08-02 Fabien Chouteau <chouteau@adacore.com>
3860
3861 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
3862 list.
3863 * a-extiin.ads: New file.
3864
38652011-08-02 Bob Duff <duff@adacore.com>
3866
3867 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
3868 now raises Name_Error instead of Use_Error in certain cases. The other
3869 parts of this AI were already implemented properly.
3870
f9adb9d4
AC
38712011-08-02 Vincent Celier <celier@adacore.com>
3872
3873 * link.c: Only import "auto-host.h" when building the gnattools.
3874
38752011-08-02 Yannick Moy <moy@adacore.com>
3876
3877 * sem_util.adb: Inter-unit inlining does not work for a subprogram
3878 which calls a local subprogram, so extract subprogram
3879 from Mark_Non_ALFA_Subprogram_Body.
3880
38812011-08-02 Javier Miranda <miranda@adacore.com>
3882
3883 * exp_ch9.adb
3884 (Extract_Dispatching_Call): If the type of the dispatching object is an
3885 access type then return an explicit dereference in the Object out-mode
3886 parameter.
3887
38882011-08-02 Gary Dismukes <dismukes@adacore.com>
3889
3890 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
3891 compatibility checks for all indexes of an array subtype, not just the
3892 first. Reset Has_Dynamic_Range_Check on the subtype before each
3893 potential check to ensure that Insert_Range_Checks will not elide any
3894 of the dynamic checks.
3895
38962011-08-02 Yannick Moy <moy@adacore.com>
3897
3898 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
3899 SPARK restriction at parsing time.
3900 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
3901 directive only if the SPARK restriction is set for this unit.
3902
83f33150
YM
39032011-08-02 Yannick Moy <moy@adacore.com>
3904
3905 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
3906 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
3907 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
3908 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
3909 Mark_Non_ALFA_Subprogram_Body.
3910 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
3911 inlined.
3912
7b98672f
YM
39132011-08-02 Yannick Moy <moy@adacore.com>
3914
3915 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
3916 might be costly.
3917
052e0603
AC
39182011-08-02 Robert Dewar <dewar@adacore.com>
3919
3920 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
3921 exp_ch3.adb: Minor reformatting.
3922
39232011-08-02 Emmanuel Briot <briot@adacore.com>
3924
3925 * adaint.c (__gnat_locate_exec_on_path): only returns executable
3926 files, not any regular file.
3927 (__gnat_locate_file_with_predicate): new subprogram.
3928
39292011-08-02 Yannick Moy <moy@adacore.com>
3930
3931 * sinfo.adb, sinfo.ads: Restrict the use of flags
3932 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
3933 nodes, plus N_Subtype_Declaration for the 2nd one.
3934
4fbad0ba
AC
39352011-08-02 Sergey Rybin <rybin@adacore.com>
3936
3937 * gnat_rm.texi: Ramification of pragma Eliminate documentation
3938 - fix bugs in the description of Source_Trace;
3939 - get rid of UNIT_NAME;
3940
052e0603
AC
39412011-08-02 Javier Miranda <miranda@adacore.com>
3942
3943 * exp_ch9.adb
3944 (Build_Dispatching_Requeue): Adding support for VM targets
3945 since we cannot directly reference the Tag entity.
3946 * exp_sel.adb (Build_K): Adding support for VM targets.
3947 (Build_S_Assignment): Adding support for VM targets.
3948 * exp_disp.adb
3949 (Default_Prim_Op_Position): In VM targets do not restrict availability
3950 of predefined interface primitives to compiling in Ada 2005 mode.
3951 (Is_Predefined_Interface_Primitive): In VM targets this service is not
3952 restricted to compiling in Ada 2005 mode.
3953 (Make_VM_TSD): Generate code that declares and initializes the OSD
3954 record. Needed to support dispatching calls through synchronized
3955 interfaces.
3956 * exp_ch3.adb
3957 (Make_Predefined_Primitive_Specs): Enable generation of predefined
3958 primitives associated with synchronized interfaces.
3959 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3960 primitives associated with synchronized interfaces.
3961
39622011-08-02 Yannick Moy <moy@adacore.com>
3963
3964 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3965 statements hidden in SPARK if preceded by the HIDE directive
3966 (Parse_Exception_Handlers): mark each exception handler in a sequence of
3967 exception handlers as hidden in SPARK if preceded by the HIDE directive
3968 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3969 if starting with the HIDE directive
3970 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3971 starting with the HIDE directive; mark the declarations in a private
3972 part as hidden in SPARK if the private part starts with the HIDE
3973 directive
3974 * restrict.adb, restrict.ads
3975 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3976 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3977 argument node belongs to a part which is hidden in SPARK
3978 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3979 parts in SPARK; protect the possibly costly call to
3980 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3981 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3982 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3983 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3984 Tok_SPARK_Hide.
3985 (Scan): recognize special comment starting with '#' and followed by
3986 SPARK keyword "hide" as a HIDE directive.
3987
39882011-08-02 Yannick Moy <moy@adacore.com>
3989
3990 * types.ads, erroutc.ads: Minor reformatting.
3991
39922011-08-02 Vincent Celier <celier@adacore.com>
3993
3994 * link.c: Add response file support for cross platforms.
3995
39962011-08-02 Ed Schonberg <schonberg@adacore.com>
3997
3998 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3999 in an association, set parent field of copy before partial analysis.
4000 * sem_res.adb (Resolve_Slice): create reference to itype only when
4001 expansion is enabled.
4002
40032011-08-02 Yannick Moy <moy@adacore.com>
4004
4005 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
4006 for new flag denoting which subprogram bodies are in ALFA
4007 * restrict.adb, sem_ch7.adb: Update comment
4008 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4009 sem_ch9.adb, sem_res.adb: Add calls to
4010 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
4011 * sem_ch6.adb (Analyze_Function_Return): add calls to
4012 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
4013 middle of the body, and extended return.
4014 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
4015 False when missing return.
4016 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
4017 to True for subprograms whose spec is in ALFA. Remove later on the flag
4018 on the entity used for a subprogram body when there exists a separate
4019 declaration.
4020 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
4021 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
4022 False, otherwise do nothing.
4023
40242011-08-02 Robert Dewar <dewar@adacore.com>
4025
4026 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4027
40282011-08-02 Yannick Moy <moy@adacore.com>
4029
4030 * sem_ch4.ads: minor formatting.
4031
40322011-08-02 Yannick Moy <moy@adacore.com>
4033
4034 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
4035 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
4036 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
4037 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
4038 opt.ads: cleanup of SPARK mode
4039
40402011-08-02 Yannick Moy <moy@adacore.com>
4041
4042 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
4043 types.
4044 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
4045 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
4046 * sem_ch3.adb
4047 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
4048 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
4049 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
4050 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
4051 types.
4052 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
4053 non-static range.
4054 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
4055 functions whose return type is not in ALFA.
4056 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
4057 specifications.
4058 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4059 parameter's type is not in ALFA.
4060 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4061 types are in ALFA.
4062
40632011-08-02 Ed Schonberg <schonberg@adacore.com>
4064
4065 * sem_ch6 (Analyze_Expression_Function): treat the function as
4066 Inline_Always, and introduce a subprogram declaration for it when it is
4067 not a completion.
4068 * inline.adb (Add_Inlined_Body): recognize bodies that come from
4069 expression functions, so that the back-end can determine whether they
4070 can in fact be inlined.
4071 * sem_util.adb (Is_Expression_Function): predicate to determine whether
4072 a function body comes from an expression function.
4073
40742011-08-02 Gary Dismukes <dismukes@adacore.com>
4075
4076 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4077 null exclusions to test Can_Never_Be_Null on the anonymous access types
4078 of the formals rather than testing the formals themselves. Exclude this
4079 check in cases where the Old_Formal is marked as a controlling formal,
4080 to avoid issuing spurious errors for bodies completing dispatching
4081 operations (due to the flag not getting set on controlling access
4082 formals in body specs).
4083 (Find_Corresponding_Spec): When checking full and subtype conformance of
4084 subprogram bodies in instances, pass Designated and E in that order, for
4085 consistency with the expected order of the formals (New_Id followed by
4086 Old_Id).
4087
40882011-08-02 Robert Dewar <dewar@adacore.com>
4089
4090 * sem_ch8.adb: Minor reformatting.
4091
40922011-08-02 Ed Schonberg <schonberg@adacore.com>
4093
4094 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4095 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4096 primitive operations of class-wide actuals.
4097
40982011-08-02 Javier Miranda <miranda@adacore.com>
4099
4100 * exp_atag.ads, exp_atag.adb
4101 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4102 since its value is implicitly passed in argument Typ.
4103 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4104 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4105 Build_Common_Dispatching_Select_Statements.
4106
41072011-08-02 Robert Dewar <dewar@adacore.com>
4108
4109 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4110 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4111 Minor reformatting.
4112
41132011-08-02 Robert Dewar <dewar@adacore.com>
4114
4115 * sem_res.adb: Minor reformatting.
4116 * sem_prag.adb: Minor reformatting.
4117
41182011-08-02 Javier Miranda <miranda@adacore.com>
4119
4120 * exp_atag.adb, exp_atags.ads
4121 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4122 by the tagged type Entity. Required to use this routine in the VM
4123 targets since we do not have available the Tag entity in the VM
4124 platforms.
4125 * exp_ch6.adb
4126 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4127 Ada.Tags has not been previously loaded.
4128 * exp_ch7.adb
4129 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4130 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4131 * sem_aux.adb
4132 (Enclosing_Dynamic_Scope): Add missing support to handle the full
4133 view of enclosing scopes. Required to handle enclosing scopes that
4134 are synchronized types whose full view is a task type.
4135 * exp_disp.adb
4136 (Build_VM_TSDs): Minor code improvement to avoid generating and
4137 analyzing lists with empty nodes.
4138 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4139 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4140 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4141 (Make_Disp_Timed_Select_Body): Add support for VM targets.
4142 (Make_Select_Specific_Data_Table): Add support for VM targets.
4143 (Make_VM_TSD): Generate code to initialize the SSD structure of
4144 the TSD.
4145
41462011-08-02 Yannick Moy <moy@adacore.com>
4147
4148 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4149 cross-references section in ALI.
4150 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4151 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4152 Sub).
4153 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4154 subprogram or package entity of a node
4155 (Is_Local_Reference_Type): new function returns True for references
4156 selected in local cross-references.
4157 (Lt): function extracted from Lt in Output_References
4158 (Write_Entity_Name): function extracted from Output_References
4159 (Generate_Definition): generate reference with type 'D' for definition
4160 of objects (object declaration and parameter specification), with
4161 appropriate locations and units, for use in local cross-references.
4162 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4163 references of type 'I' for initialization in object definition.
4164 (Output_References): move part of function Lt and procedure
4165 Write_Entity_Name outside of the body. Ignore references of types 'D'
4166 and 'I' introduced for local cross-references.
4167 (Output_Local_References): new procedure to output the local
4168 cross-references sections.
4169 (Lref_Entity_Status): new array defining whether an entity is a local
4170 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4171 with 'I' type when initialization expression is present.
4172 * get_scos.adb, get_scos.ads: Correct comments and typos
4173
41742011-08-02 Javier Miranda <miranda@adacore.com>
4175
4176 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4177 the JVM target.
4178 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4179 the JVM target.
4180 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4181 TSD support.
4182
41832011-08-02 Vincent Celier <celier@adacore.com>
4184
4185 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4186 (No_Space_Img): New function
4187 (Find_Excluded_Sources): When reading from a file, record the file name
4188 and the line number for each excluded source.
4189 (Mark_Excluded_Sources): When reporting an error, if the excluded
4190 sources were read from a file, include file name and line number in
4191 the error message.
4192
41932011-08-02 Ed Schonberg <schonberg@adacore.com>
4194
4195 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4196
41972011-08-02 Robert Dewar <dewar@adacore.com>
4198
4199 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4200
42012011-08-02 Javier Miranda <miranda@adacore.com>
4202
4203 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4204 generation of TSDs to the DOTNET compiler.
4205 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4206 generation of TSDs to the DOTNET compiler.
4207
42082011-08-02 Javier Miranda <miranda@adacore.com>
4209
4210 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4211 record of all the tagged types declared inside library level package
4212 declarations, library level package bodies or library level subprograms.
4213 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4214 associated with a given tagged type.
4215 (Build_VM_TSDs): New subprogram.
4216 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4217 compilation units that are subprograms.
4218 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4219 compilation units that are package bodies.
4220 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4221 units that are a package declaration or a package instantiation.
4222 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4223 reorganization to improve the error generated by the frontend when the
4224 function Ada.Tags.Secondary_Tag is not available.
4225 * rtsfind.ads (RE_Register_TSD): New runtime entity.
4226 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4227
42282011-08-02 Javier Miranda <miranda@adacore.com>
4229
4230 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4231
42322011-08-02 Robert Dewar <dewar@adacore.com>
4233
4234 * s-imenne.ads: Minor reformatting.
4235
42362011-08-02 Robert Dewar <dewar@adacore.com>
4237
4238 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
4239 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
4240 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
4241
42422011-08-02 Robert Dewar <dewar@adacore.com>
4243
4244 * einfo.ads (Materialize_Entity): Document this is only for renamings
4245 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
4246 required debug information in the case where we transform the object
4247 declaration into a renaming declaration.
4248 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
4249 object
4250 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
4251 Materialize_Entity.
4252
42532011-08-02 Robert Dewar <dewar@adacore.com>
4254
4255 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
4256 Suppress_Init_Procs.
4257 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
4258 Suppress_Initialization/Initialization_Suppressed.
4259 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
4260 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
4261 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
4262 * sem_prag.adb: New processing for pragma Suppress_Initialization.
4263
42642011-08-02 Robert Dewar <dewar@adacore.com>
4265
4266 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
4267 Minor reformatting.
4268
42692011-08-02 Ed Schonberg <schonberg@adacore.com>
4270
4271 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4272 only have inheritable classwide pre/postconditions.
4273
42742011-08-02 Javier Miranda <miranda@adacore.com>
4275
4276 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4277 * rtsfind.ads (RE_Check_TSD): New runtime entity.
4278 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4279 checks if the external tag of a type is the same as the external tag
4280 of some other declaration.
4281
42822011-08-02 Thomas Quinot <quinot@adacore.com>
4283
4284 * s-taskin.ads: Minor reformatting.
4285
42862011-08-02 Emmanuel Briot <briot@adacore.com>
4287
4288 * g-comlin.adb (Display_Help): swap the order in which it prints the
4289 short help and the general usage.
4290
42912011-08-02 Ed Schonberg <schonberg@adacore.com>
4292
4293 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4294 the aspect declarations and attach them to the generic copy for
4295 subsequent analysis.
4296 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4297 declarations of the generic tree to the new subprogram declarations.
4298 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4299 conditions that apply to a subprogram instance.
4300
43012011-08-02 Robert Dewar <dewar@adacore.com>
4302
4303 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4304
43052011-08-02 Ed Schonberg <schonberg@adacore.com>
4306
4307 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4308 private type with a tagged full view is not derived in the immediate
4309 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4310
43112011-08-02 Robert Dewar <dewar@adacore.com>
4312
4313 * exp_ch4.adb: Minor reformatting.
4314
43152011-08-02 Ed Schonberg <schonberg@adacore.com>
4316
4317 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4318 Ada2012 iterator, the loop will be rewritten during expansion into a
4319 while loop with a cursor and an element declaration. Do not analyze the
4320 body in this case, because if the container is for indefinite types the
4321 actual subtype of the elements will only be determined when the cursor
4322 declaration is analyzed.
4323
43242011-08-02 Arnaud Charlet <charlet@adacore.com>
4325
4326 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4327 size/alignment related attributes in CodePeer_Mode.
4328
43292011-08-02 Gary Dismukes <dismukes@adacore.com>
4330
4331 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4332 Prepend_Element, since this can result in the operation getting the
4333 wrong slot in the full type's dispatch table if the full type has
4334 inherited operations. The incomplete type's operation will get added
4335 to the proper position in the full type's primitives
4336 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4337 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4338 dispatching operations, since there are cases where nonprimitive
4339 subprograms can get added to the list of incomplete dependents (such
4340 as subprograms in nested packages).
4341 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4342 private part when determining whether to add a primitive with a
4343 parameter of a tagged incomplete type to the Private_Dependents list.
4344 Such primitives can also occur in the visible part, and should not have
4345 been excluded from being private dependents.
4346 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4347 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4348 list of a Taft-amendment incomplete type is a primitive before issuing
4349 an error that the full type must appear in the same unit. There are
4350 cases where nonprimitives can be in the list (such as subprograms in
4351 nested packages).
4352 * sem_disp.adb (Derives_From): Use correct condition for checking that
4353 a formal's type is derived from the type of the corresponding formal in
4354 the parent subprogram (the condition was completely wrong). Add
4355 checking that was missing for controlling result types being derived
4356 from the result type of the parent operation.
4357
43582011-08-02 Yannick Moy <moy@adacore.com>
4359
4360 * errout.adb (First_Node): minor renaming
4361 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4362 first node.
4363
43642011-08-02 Yannick Moy <moy@adacore.com>
4365
4366 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4367 before accessing operands.
4368 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4369 decide whether an initialization expression respects SPARK rules, as
4370 the plain node is the expanded one. This allows for more valid warnings
4371 to be issued.
4372 * gnat_rm.texi: Minor update.
4373
43742011-08-02 Arnaud Charlet <charlet@adacore.com>
4375
4376 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4377 previous change.
4378
43792011-08-02 Robert Dewar <dewar@adacore.com>
4380
4381 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4382
43832011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4384
4385 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4386 loop statements and the element renaming declaration with a block when
4387 the element type is controlled.
4388
43892011-08-02 Yannick Moy <moy@adacore.com>
4390
4391 * sinfo.ads: Minor formatting.
4392
43932011-08-02 Ed Schonberg <schonberg@adacore.com>
4394
4395 * sem_aggr.adb (Add_Association): if the association has a box and no
4396 expression, use the Sloc of the aggregate itself for the new
4397 association.
4398 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4399 the Original_Node.
4400
44012011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4402
4403 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4404 When a container is provided via a function call, generate a renaming
4405 of the function result. This avoids the creation of a transient scope
4406 and the premature finalization of the container.
4407 * exp_ch7.adb (Is_Container_Cursor): Removed.
4408 (Wrap_Transient_Declaration): Remove the supression of the finalization
4409 of the list controller when the declaration denotes a container cursor,
4410 it is not needed.
4411
44122011-08-02 Yannick Moy <moy@adacore.com>
4413
4414 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4415 node is from source, instead of the original node being from source.
4416 * sem_aggr.adb
4417 (Resolve_Array_Aggregate): refine the check for a static expression, to
4418 recognize also static ranges
4419 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4420 Array_Type_Declaration): postpone the test for the type being a subtype
4421 mark after the type has been resolved, so that component-selection and
4422 expanded-name are discriminated.
4423 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4424 to distinguish the case of an iteration scheme, so that an error is
4425 issed on a non-static range in SPARK except in an iteration scheme.
4426 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4427 In_Iter_Schm = True.
4428 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4429 user-defined operators so that they are allowed in renaming
4430 * sem_ch8.adb
4431 (Find_Selected_Component): refine the check for prefixing of operators
4432 so that they are allowed in renaming. Move the checks for restrictions
4433 on selector name after analysis discriminated between
4434 component-selection and expanded-name.
4435 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4436 concatenation argument of string type if it is static.
4437 * sem_util.adb, sem_util.ads
4438 (Check_Later_Vs_Basic_Declarations): add a new function
4439 Is_Later_Declarative_Item to decice which declarations are allowed as
4440 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4441 mode, add that renamings are considered as later items.
4442 (Enclosing_Package): new function to return the enclosing package
4443 (Enter_Name): correct the rule for homonyms in SPARK
4444 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4445 from source (result of expansion) to avoid issuing wrong warnings.
4446
44472011-08-02 Ed Schonberg <schonberg@adacore.com>
4448
4449 * errout.adb: On anything but an expression First_Node returns its
4450 argument.
4451
44522011-08-02 Pascal Obry <obry@adacore.com>
4453
4454 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4455
44562011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4457
4458 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4459 Set the associated loop as the related expression of internally
4460 generated cursors.
4461 * exp_ch7.adb (Is_Container_Cursor): New routine.
4462 (Wrap_Transient_Declaration): Supress the finalization of the list
4463 controller when the declaration denotes a container cursor.
4464
44652011-08-02 Yannick Moy <moy@adacore.com>
4466
4467 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4468 command line now.
4469 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4470 expression is a simple expression. This check cannot be performed in
4471 the semantics, so just drop it.
4472 (P_Index_Or_Discriminant_Constraint): move check that the index or
4473 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4474 semantics. Other cases were previously checked in the semantics.
4475 * par-ch4.adb (P_Name): move checks that a selector name is not
4476 character literal or an operator symbol to Find_Selected_Component in
4477 the semantics
4478 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4479 declarations are not placed after later declarations in a separate
4480 procedure in Sem_Util (possibly not the best choice?), to be used both
4481 during parsing, for Ada 83 mode, and during semantic analysis, for
4482 SPARK mode.
4483 * par-endh.adb (Check_End): move check that end label is not missing
4484 to Process_End_Label in the semantics
4485 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4486 the special case for SPARK restriction
4487 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4488 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4489 parameter Force to issue the error message even on internal node (used
4490 for generated end label). Call Check_Restriction to check when an error
4491 must be issued. In SPARK mode, issue an error message even if the
4492 restriction is not set.
4493 (Check_Restriction): new procedure with an additional out parameter to
4494 inform the caller that a message has been issued
4495 * sem_aggr.adb: Minor modification of message
4496 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4497 instead of issuing an error message directly
4498 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4499 declarations are not placed after later declarations, by calling
4500 Check_Later_Vs_Basic_Declarations
4501 (Analyze_Subtype_Declaration): move here the check that an index or
4502 discriminant constraint must be a subtype mark. Change the check that
4503 a subtype of String must start at one so that it works on subtype marks.
4504 * sem_ch4.adb (Analyze_Call): move here the check that a named
4505 association cannot follow a positional one in a call
4506 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4507 instead of issuing an error message directly
4508 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4509 selector name is not a character literal or an operator symbol. Move
4510 here the check that the prefix of an expanded name cannot be a
4511 subprogram or a loop statement.
4512 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4513 procedure called from parsing and semantics to check that basic
4514 declarations are not placed after later declarations
4515 (Process_End_Label): move here the check that end label is not missing
4516
45172011-08-02 Arnaud Charlet <charlet@adacore.com>
4518
4519 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4520 representation clause in codepeer mode, since it confuses CodePeer and
4521 does not bring useful info.
4522
45232011-08-02 Ed Falis <falis@adacore.com>
4524
4525 * init.c: initialize fp hw on MILS.
4526
45272011-08-02 Ed Schonberg <schonberg@adacore.com>
4528
4529 * errout.adb (First_Node): for bodies, return the node itself (small
4530 optimization). For other nodes, do not check source_unit if the node
4531 comes from Standard.
4532
45332011-08-02 Robert Dewar <dewar@adacore.com>
4534
4535 * exp_ch3.adb: Minor comment additions.
4536 * sem_ch13.adb: Minor reformatting.
4537
45382011-08-02 Pascal Obry <obry@adacore.com>
4539
4540 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4541
45422011-08-02 Robert Dewar <dewar@adacore.com>
4543
4544 * sem_attr.adb: Minor reformatting.
4545
45462011-08-02 Robert Dewar <dewar@adacore.com>
4547
4548 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4549 (Has_Default_Component_Value): Removed
4550 * einfo.ads Comment updates
4551 (Has_Default_Aspect): Replaces Has_Default_Value
4552 (Has_Default_Component_Value): Removed
4553 * exp_ch13.adb
4554 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4555 * exp_ch3.adb
4556 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4557 (Get_Simple_Init_Val): Handle Default_Value aspect
4558 (Needs_Simple_Initialization): Handle Default_Value aspect
4559 * exp_ch3.ads: Needs_Simple_Initialization
4560 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4561 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4562 * sem_ch13.adb
4563 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4564 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4565 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4566
45672011-08-02 Ed Schonberg <schonberg@adacore.com>
4568
4569 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4570 package containing iteration primitives.
4571 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4572
45732011-08-02 Ed Schonberg <schonberg@adacore.com>
4574
4575 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4576 "of", pre-analyze expression in case it is a function call with
4577 finalization actions that must be placed ahead of the loop.
4578 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4579 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4580
45812011-08-02 Geert Bosch <bosch@adacore.com>
4582
4583 * cstand.adb (Create_Float_Types): Only consider C's long double for
4584 Long_Long_Float, in addition to double.
4585
45862011-08-02 Robert Dewar <dewar@adacore.com>
4587
4588 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4589 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4590 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4591 Minor reformatting.
4592
45932011-08-02 Ed Schonberg <schonberg@adacore.com>
4594
4595 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4596 indexed component.
4597
45982011-08-02 Javier Miranda <miranda@adacore.com>
4599
4600 * einfo.ads, einfo.adb
4601 (Original_Access_Type): Move this attribute to Node26 since there was
4602 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4603 which causes conflicts and breaks the generation of the .NET compiler.
4604 (Interface_Name): Add missing documentation on JGNAT only uses of
4605 this attribute.
4606
46072011-08-02 Geert Bosch <bosch@adacore.com>
4608
4609 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4610 (Find_Back_End_Float_Type): Likewise
4611 (Create_Back_End_Float_Types): Likewise
4612 (Create_Float_Types): Likewise
4613 (Register_Float_Type): Likewise
4614 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4615 Nlist and split out type selection in new local Find_Base_Type function.
4616 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4617 Nlist
4618 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4619
46202011-08-02 Robert Dewar <dewar@adacore.com>
4621
4622 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4623 alpha order).
4624 * opt.ads: Minor comment change.
4625 * sem_ch12.adb: Minor code reorganization.
4626
46272011-08-02 Gary Dismukes <dismukes@adacore.com>
4628
4629 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4630 subtype's list of rep items to the list on the full subtype in the case
4631 where the lists are the same.
4632
46332011-08-02 Geert Bosch <bosch@adacore.com>
4634
4635 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4636 using the one from System.Strings, which also deallocates all strings.
4637
46382011-08-02 Geert Bosch <bosch@adacore.com>
4639
4640 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4641 function.
4642 * gcc-interface/Make-lang.in: Update dependencies.
4643
46442011-08-02 Olivier Hainque <hainque@adacore.com>
4645
4646 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4647 end_locus.
4648
46492011-08-02 Javier Miranda <miranda@adacore.com>
4650
4651 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4652 associated with anonymous access to subprograms.
4653
46542011-08-02 Geert Bosch <bosch@adacore.com>
4655
4656 * opt.ads
4657 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4658 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4659 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4660 (Add_Symbol_Definition): Move to switch-c.adb
4661 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4662 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4663 (Add_Symbol_Definition): Move to switch-c.adb.
4664 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4665 * sem_warn.adb
4666 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4667 Move to warnsw.adb.
4668 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4669 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4670 Move to warnsw.adb.
4671 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4672 (Add_Symbol_Definition): Moved from Prepcomp.
4673 * switch-c.ads: Update copyright notice. Use String_List instead of
4674 Argument_List, removing dependency on System.OS_Lib.
4675
46762011-08-02 Yannick Moy <moy@adacore.com>
4677
4678 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4679 mode on initialization expression which does not respect SPARK
4680 restrictions.
4681 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4682 if the tree referenced by its argument represents an initialization
4683 expression in SPARK, suitable for initializing an object in an object
4684 declaration.
4685
46862011-08-02 Javier Miranda <miranda@adacore.com>
4687
4688 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4689 internally generated access to subprogram with its associated protected
4690 subprogram type.
4691 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4692
46932011-08-02 Geert Bosch <bosch@adacore.com>
4694
4695 * cstand.adb (Register_Float_Type): Print information about type to
4696 register, if the Debug_Flag_Dot_B is set.
4697 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4698 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4699 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4700 with a requested precision of more than Max_Digits digits and no more
4701 than Max_Base_Digits digits, if a range specification is present and the
4702 Predefined_Float_Types list has a suitable type to derive from.
4703 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4704 case of type completion with pragma Import
4705 * sem_prag.adb
4706 (Process_Import_Predefined_Type): Processing to complete a type
4707 with pragma Import. Currently supports floating point types only.
4708 (Set_Convention_From_Pragma): Do nothing without underlying type.
4709 (Process_Convention): Guard against absence of underlying type,
4710 which may happen when importing incomplete types.
4711 (Process_Import_Or_Interface): Handle case of importing predefined
4712 types. Tweak error message.
4713
47142011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4715
4716 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4717 functions to previous change. Reorganize code slightly.
4718
47192011-08-02 Geert Bosch <bosch@adacore.com>
4720
4721 * back_end.ads (Register_Type_Proc): New call back procedure type for
4722 allowing the back end to provide information about available types.
4723 (Register_Back_End_Types): New procedure to register back end types.
4724 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4725 available types.
4726 * cstand.adb (Back_End_Float_Types): New list for floating point types
4727 supported by the back end.
4728 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4729 (Copy_Float_Type): New procedure to make new copies of predefined types.
4730 (Register_Float_Type): New call back procedure to populate the BEFT list
4731 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4732 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4733 (Create_Float_Types): New procedure to create entities for floating
4734 point types predefined in Standard, and put these and any remaining
4735 BEFTs on the Predefined_Float_Types list.
4736 * stand.ads (Predefined_Float_Types): New list for predefined floating
4737 point types that do not have declarations in package Standard.
4738
47392011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4740
4741 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4742 entity node for the unit containing the parameter.
4743 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4744 (Add_Inlined_Subprogram): Likewise.
4745 * gcc-interface/Make-lang.in: Update dependencies.
4746
47472011-08-02 Thomas Quinot <quinot@adacore.com>
4748
4749 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4750 suitable value.
4751
47522011-08-02 Geert Bosch <bosch@adacore.com>
4753
4754 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4755
47562011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4757
4758 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4759 computed value of Base_Type.
4760
47612011-08-02 Yannick Moy <moy@adacore.com>
4762
4763 * restrict.adb (Check_Restriction): issue an error for any use of
4764 class-wide, even if the No_Dispatch restriction is not set.
4765 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4766 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4767 when completing a private extension, the type named in the private part
4768 is not the same as that named in the visible part.
4769 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4770 of an inherited primitive operations of a tagged type or type extension
4771 that returns the tagged type.
4772 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4773 function which returns True for an implicit operation inherited by the
4774 derived type declaration for the argument type.
4775 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4776 order.
4777
47782011-08-02 Ed Schonberg <schonberg@adacore.com>
4779
4780 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4781 Process_Bounds, to perform analysis with expansion of a range or an
4782 expression that is the iteration scheme for a loop.
4783 (Analyze_Iterator_Specification): If domain of iteration is given by a
4784 function call with a controlled result, as is the case if call returns
4785 a predefined container, ensure that finalization actions are properly
4786 generated.
4787 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4788
47892011-08-02 Javier Miranda <miranda@adacore.com>
4790
4791 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4792 * gcc-interface/Make-lang.in: Update dependencies.
4793
47942011-08-02 Javier Miranda <miranda@adacore.com>
4795
4796 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4797 determine if the analysis is performed using N or Original_Node (N).
4798 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4799 functionality of routine Is_Variable avoids code duplication.
4800 * checks.adb (Determine_Range): Handle temporaries generated by
4801 Remove_Side_Effects.
4802
48032011-08-02 Javier Miranda <miranda@adacore.com>
4804
4805 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4806 expansion of the condition. Required since the previous analysis was
4807 done with expansion disabled (see Resolve_Quantified_Expression) and
4808 hence checks were not inserted and record comparisons have not been
4809 expanded.
4810
48112011-08-02 Ed Falis <falis@adacore.com>
4812
4813 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4814 Update header.
4815
48162011-08-02 Bob Duff <duff@adacore.com>
4817
4818 * opt.ads: Minor comment fix.
4819
48202011-08-02 Bob Duff <duff@adacore.com>
4821
4822 * sem_ch12.adb (Analyze_Package_Instantiation,
4823 Analyze_Subprogram_Instantiation): Turn off style checking while
4824 analyzing an instance. Whatever style checks that apply to the generic
4825 unit should apply, so it makes no sense to apply them in an instance.
4826 This was causing trouble when compiling an instance of a runtime
4827 unit that violates the -gnatyO switch.
4828 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4829 one of the two case statements, causing spurious errors.
4830
48312011-08-02 Robert Dewar <dewar@adacore.com>
4832
4833 * uname.adb: Minor reformatting.
4834 * gnatcmd.adb: Minor reformatting.
4835 * exp_attr.adb: Minor reformatting.
4836
48372011-08-02 Ed Schonberg <schonberg@adacore.com>
4838
4839 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4840 No_Dispatching_Calls, do not look for the Assign primitive, because
4841 predefined primitives are not created in this case.
4842
48432011-08-02 Bob Duff <duff@adacore.com>
4844
4845 * stylesw.ads: Minor comment fixes.
4846
48472011-08-02 Robert Dewar <dewar@adacore.com>
4848
4849 * freeze.adb (Add_To_Result): New procedure.
4850
48512011-08-02 Jose Ruiz <ruiz@adacore.com>
4852
4853 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4854 time, if the specific run-time routines for handling streams of strings
4855 are not available, use the default mechanism.
4856
48572011-08-02 Arnaud Charlet <charlet@adacore.com>
4858
4859 * s-regpat.ads: Fix typo.
4860
48612011-08-02 Vincent Celier <celier@adacore.com>
4862
4863 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4864 not null, call it to create the in memory config project file without
4865 parsing an existing default config project file.
4866
48672011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4868
4869 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4870
48712011-08-02 Ed Schonberg <schonberg@adacore.com>
4872
4873 * sem_elim.adb: an abstract subprogram does not need an eliminate
4874 pragma for its descendant to be eliminable.
4875
48762011-08-02 Ed Falis <falis@adacore.com>
4877
4878 * init.c: revert to handling before previous checkin for VxWorks
4879 * s-intman-vxworks.adb: delete unnecessary declarations related to
4880 using Ada interrupt facilities for handling signals.
4881 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4882 * s-intman-vxworks.ads: Import __gnat_install_handler as
4883 Initialize_Interrupts.
4884 * s-taprop-vxworks.adb: Delete Signal_Mask.
4885 (Abort_Handler): change construction of mask to unblock exception
4886 signals.
4887
48882011-08-02 Jerome Guitton <guitton@adacore.com>
4889
4890 * a-except-2005.adb (Raise_From_Signal_Handler): Call
4891 Debug_Raise_Exception before propagation starts.
4892
48932011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4894
4895 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4896 to Restriction_Check_Required.
4897 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4898 * sem_res.adb (Resolve_Call): Likewise.
4899 * sem_attr.adb (Check_Stream_Attribute): Likewise.
4900
49012011-08-02 Bob Duff <duff@adacore.com>
4902
4903 * stylesw.ads: Update comment.
4904 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4905 * errout.ads: Remove obsolete comment.
4906
49072011-08-02 Javier Miranda <miranda@adacore.com>
4908
4909 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4910 (Set_Is_Safe_To_Reevaluate): new procedure.
4911 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4912 assignment is allowed on safe-to-reevaluate variables.
4913 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4914 temporary created to remove side effects in expressions that use
4915 the secondary stack as safe-to-reevaluate.
4916 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4917 variables that are not true constants.
4918
49192011-08-02 Robert Dewar <dewar@adacore.com>
4920
4921 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4922 sem_res.adb, sem_ch6.adb: Minor reformatting.
4923
49242011-08-02 Jerome Guitton <guitton@adacore.com>
4925
4926 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4927
49282011-08-02 Ed Schonberg <schonberg@adacore.com>
4929
4930 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4931 not set Overridden_Operation if subprogram is an initialization
4932 procedure.
4933
49342011-08-02 Yannick Moy <moy@adacore.com>
4935
4936 * par-ch6.adb: Correct obsolete name in comments
4937 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4938 which takes two message arguments (existing function takes one), with
4939 second message used for continuation.
4940 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4941 block statements that originate from a source block statement, not
4942 generated block statements
4943 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4944 symmetry with procedure case
4945 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4946 function to issue an error in formal mode if a package specification
4947 contains more than one tagged type or type extension.
4948 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4949 parameters matching formals of tagged types are objects (or ancestor
4950 type conversions of objects), not general expressions. Issue an error
4951 on view conversions that are not involving ancestor conversion of an
4952 extended type.
4953 (Resolve_Type_Conversion): in formal mode, issue an error on the
4954 operand of an ancestor type conversion which is not an object
4955 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4956 procedure so that it works also for actuals of function calls
4957 (Is_Actual_Tagged_Parameter): new function which determines if its
4958 argument is an actual parameter of a formal of tagged type in a
4959 subprogram call
4960 (Is_SPARK_Object_Reference): new function which determines if the tree
4961 referenced by its argument represents an object in SPARK
4962
49632011-08-02 Robert Dewar <dewar@adacore.com>
4964
4965 * sem_ch3.adb: Minor reformatting
4966 Minor comment addition
4967 Minor error msg text change
4968
49692011-08-02 Javier Miranda <miranda@adacore.com>
4970
4971 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4972 function. Used to be more precise when we generate a variable plus one
4973 assignment to remove side effects in the evaluation of the Bound
4974 expressions.
4975 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4976 of the bound expression to force its re-analysis and thus expand the
4977 associated transient scope (if required). Code cleanup replacing the
4978 previous code that declared the constant entity by an invocation to
4979 routine Force_Evaluation which centralizes this work in the frontend.
4980
49812011-08-02 Robert Dewar <dewar@adacore.com>
4982
4983 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4984 (Base_Type): Now uses improved Is_Base_Type function
4985 * einfo.ads (Base_Type): Inline this function
4986
49872011-08-02 Robert Dewar <dewar@adacore.com>
4988
4989 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4990 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4991
49922011-08-02 Arnaud Charlet <charlet@adacore.com>
4993
4994 * gcc-interface/Make-lang.in: Update dependencies.
4995 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4996 targets.
4997
49982011-08-02 Yannick Moy <moy@adacore.com>
4999
5000 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
5001 non-simple expression used in delta constraint
5002 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
5003 index constraint which is not a subtype mark
5004 * par.adb: With and use Restrict
5005 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
5006 mode on component type which is not a subtype mark and default
5007 expression on component
5008 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
5009 of string which does not have a lower index bound equal to 1
5010 (Array_Type_Declaration): issue an error in formal mode on index or
5011 component type which is not a subtype mark, and on aliased keyword on
5012 component
5013 (Derived_Type_Declaration): issue an error in formal mode on interface,
5014 limited or abstract type
5015 (Record_Type_Declaration): issue an error in formal mode on interface
5016 (Record_Type_Definition): issue an error in formal mode on tagged types
5017 and type extensions not declared in the specification of a library unit
5018 package; on null non-tagged record; on variant part
5019
50202011-08-02 Vincent Celier <celier@adacore.com>
5021
5022 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
5023 not declared for qualified library project when Library_Name is not
5024 declared, but Library_Dir is.
5025
50262011-08-02 Robert Dewar <dewar@adacore.com>
5027
5028 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
5029 pragmas (affects aspects [Component_]Default_Value
5030 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
5031 component type for the resolution
5032
50332011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5034
5035 * einfo.adb (Base_Type): Tune implementation for speed.
5036
50372011-08-02 Robert Dewar <dewar@adacore.com>
5038
5039 * freeze.adb: Minor reformatting.
5040
50412011-08-02 Thomas Quinot <quinot@adacore.com>
5042
5043 * scos.ads: Update comments.
5044
50452011-08-02 Ed Schonberg <schonberg@adacore.com>
5046
5047 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
5048 base type, because the parent may be a subtype of a private type whose
5049 convention is established in a private part.
5050
50512011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5052
5053 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
5054 statement in a block when the expansion of the return expression has
5055 created a finalization chain.
5056 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
5057 with the parent node.
5058 Add N_Extended_Return_Statement to handle the case where a transient
5059 object declaration appears in the Return_Object_Declarations list of
5060 an extended return statement.
5061
50622011-08-02 Matthew Gingell <gingell@adacore.com>
5063
5064 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5065 unused parameter 'name'.
5066
50672011-08-02 Ed Schonberg <schonberg@adacore.com>
5068
5069 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5070 inherited operation, check whether its alias, which is the source
5071 operastion that it renames, has been marked eliminated.
5072
50732011-08-02 Javier Miranda <miranda@adacore.com>
5074
5075 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5076 in-mode parameter whose type is an access type since it can be used to
5077 modify its designated object. Enforce code that handles as safe an
5078 access type that is not access-to-constant but it is the result of a
5079 previous removal of side-effects.
5080 (Remove_Side_Effects): Minor code reorganization of cases which require
5081 no action. Done to incorporate documentation on new cases uncovered
5082 working in this ticket: no action needed if this routine was invoked
5083 too early and the nodes are not yet decorated.
5084 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5085 to routine Remove_Side_Effects by calls to Force_Evaluation since they
5086 were issued with actuals that are implicitly provided by
5087 Force_Evaluation.
5088
50892011-08-02 Robert Dewar <dewar@adacore.com>
5090
5091 * sem_ch3.adb, sem_res.adb: Minor reformatting.
5092
50932011-08-02 Yannick Moy <moy@adacore.com>
5094
5095 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5096 to issue an error in formal mode on attribute not supported in this mode
5097 (Analyze_Attribute): issue errors on standard attributes not supported
5098 in formal mode.
5099 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5100 comment, and issue error in formal mode on modulus which is not a power
5101 of 2.
5102 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5103 range.
5104 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5105 subtype mark.
5106 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5107 operator on modular type (except 'not').
5108
51092011-08-02 Robert Dewar <dewar@adacore.com>
5110
5111 * gnat_rm.texi: Minor reformatting.
5112
51132011-08-02 Arnaud Charlet <charlet@adacore.com>
5114
5115 * s-osinte-linux.ads: Minor comment update and reformatting.
5116 * i-cexten.ads: Make this unit pure, as for its parent.
5117 Will allow its usage in more contexts if needed.
5118
51192011-08-02 Robert Dewar <dewar@adacore.com>
5120
5121 * s-utf_32.ads: Minor comment fix.
5122
51232011-08-02 Ed Schonberg <schonberg@adacore.com>
5124
5125 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5126 operation of a tagged synchronized type, handle the case where the
5127 controlling argument is overloaded.
5128
51292011-08-02 Yannick Moy <moy@adacore.com>
5130
5131 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5132 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5133 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5134 SPARK mode and formal verification mode on processing SPARK restriction
5135 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5136 requiring consistency checking.
5137
51382011-08-02 Robert Dewar <dewar@adacore.com>
5139
5140 * sem_res.adb: Minor reformatting.
5141
51422011-08-02 Robert Dewar <dewar@adacore.com>
5143
5144 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5145 a-cforse.ads: Remove unneeded with of Ada.Containers
5146 Remove commented out pragma Inline's
5147 Move specifications of new subprograms to the actual specs
5148
51492011-08-02 Yannick Moy <moy@adacore.com>
5150
5151 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5152 a-cforse.ads: Update comments.
5153
51542011-08-02 Ed Schonberg <schonberg@adacore.com>
5155
5156 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5157
51582011-08-02 Robert Dewar <dewar@adacore.com>
5159
5160 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5161 a-cforse.ads, a-cofove.ads: Minor reformatting.
5162
51632011-08-02 Claire Dross <dross@adacore.com>
5164
5165 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5166 a-cofove.ads: Add comments.
5167
51682011-08-02 Yannick Moy <moy@adacore.com>
5169
5170 * gnat_rm.texi: Document formal containers.
5171
51722011-08-02 Emmanuel Briot <briot@adacore.com>
5173
5174 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5175 are empty sections.
5176
51772011-08-02 Robert Dewar <dewar@adacore.com>
5178
5179 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5180 reformatting.
5181
51822011-08-02 Robert Dewar <dewar@adacore.com>
5183
5184 * aspects.adb: New aspects Default_Value and Default_Component_Value
5185 New format of Aspect_Names table checks for omitted entries
5186 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5187 handling of boolean aspects for derived types.
5188 New aspects Default_Value and Default_Component_Value
5189 New format of Aspect_Names table checks for omitted entries
5190 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5191 (Has_Default_Value): New flag
5192 (Has_Default_Component_Value): New flag
5193 (Has_Default_Value): New flag
5194 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5195 table.
5196 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5197 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5198 Default_Value and Default_Component_Value
5199 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5200 New aspects Default_Value and Default_Component_Value
5201 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5202 * sprint.adb: Print N_Aspect_Specification node when called from gdb
5203
52042011-08-02 Vincent Celier <celier@adacore.com>
5205
5206 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5207 inherit library kind.
5208
52092011-08-02 Ed Schonberg <schonberg@adacore.com>
5210
5211 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5212 Minor reformatting.
5213
52142011-08-02 Robert Dewar <dewar@adacore.com>
5215
5216 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5217
52182011-08-02 Yannick Moy <moy@adacore.com>
5219
5220 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5221
52222011-08-02 Robert Dewar <dewar@adacore.com>
5223
5224 * impunit.adb: Add comment.
5225
52262011-08-02 Yannick Moy <moy@adacore.com>
5227
5228 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5229 qualification of aggregates in formal mode
5230 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5231 another aggregate
5232 (Resolve_Aggregate): complete the test that an aggregate is adequately
5233 qualified in formal mode
5234
52352011-08-02 Pascal Obry <obry@adacore.com>
5236
5237 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
5238 * mlib-prj.adb: Supress warning when compiling binder generated file.
5239 (Build_Library): Supress all warnings when compiling the binder
5240 generated file.
5241
52422011-08-02 Yannick Moy <moy@adacore.com>
5243
5244 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
5245 from here...
5246 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
5247 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
5248 Add with/use clauses to make Check_Formal_Restriction visible
5249
52502011-08-02 Ed Schonberg <schonberg@adacore.com>
5251
5252 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
5253 in-parameters when type of the generic formal is private in the generic
5254 spec and non-private in the body.
5255
52562011-08-02 Claire Dross <dross@adacore.com>
5257
5258 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
5259 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
5260 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
5261 * impunit.adb, Makefile.rtl: Take new files into account.
5262
52632011-08-02 Robert Dewar <dewar@adacore.com>
5264
5265 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
5266 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5267
52682011-08-02 Yannick Moy <moy@adacore.com>
5269
5270 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5271 formal mode
5272 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5273 matching static array bounds, taking into account the special case of
5274 string literals
5275 * sem_ch3.adb: Typo in comment.
5276
52772011-08-02 Yannick Moy <moy@adacore.com>
5278
5279 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5280 which issues an error in formal mode if its argument node is originally
5281 from source
5282 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5283 has a discriminant specification so that it does not include the case
5284 of derived types
5285 (Derived_Type_Declaration): move here the test that a derived type has a
5286 discriminant specification
5287 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5288 first element of a component association before accessing its choices
5289 (presence of component association is not enough)
5290 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5291 declaration is a library item before accessing the next element in a
5292 list, as library items are not member of lists
5293 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5294 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5295 Check_Formal_Restriction whenever possible.
5296
52972011-08-02 Ed Schonberg <schonberg@adacore.com>
5298
5299 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5300 reference when needed.
5301
53022011-08-02 Bob Duff <duff@adacore.com>
5303
5304 * gnat_ugn.texi: Fix typo.
5305
53062011-08-02 Vincent Celier <celier@adacore.com>
5307
5308 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5309 archive file name. Do not use the full path name of archives for Open
5310 VMS.
5311
53122011-08-02 Robert Dewar <dewar@adacore.com>
5313
5314 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5315 Analyze_Aspect_Specifications
5316 * sem_ch13.adb
5317 (Analyze_Aspect_Specifications): New handling for boolean aspects
5318 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5319 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5320 sequence for Analyze_Aspect_Specifications
5321 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5322 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5323
53242011-08-02 Robert Dewar <dewar@adacore.com>
5325
5326 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5327 aspects, since these no longer exist.
5328
53292011-08-02 Robert Dewar <dewar@adacore.com>
5330
5331 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5332 semicolon, do not try to see if there are aspects following it.
5333 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5334 aspect spec.
5335
53362011-08-02 Robert Dewar <dewar@adacore.com>
5337
5338 * sem_ch8.adb, aspects.ads: Minor reformatting.
5339
53402011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5341
5342 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5343 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5344 extracted from...
5345 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5346
53472011-08-02 Yannick Moy <moy@adacore.com>
5348
5349 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5350 mode on subprogram declaration outside of package specification, unless
5351 it is followed by a pragma Import
5352 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5353 Access_Type_Declaration): issue error in formal mode on access type
5354 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5355 incomplete type
5356 (Analyze_Object_Declaration): issue error in formal mode on object
5357 declaration which does not respect SPARK restrictions
5358 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5359 declaration which does not respect SPARK restrictions
5360 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5361 error in formal mode on digits or delta constraint
5362 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5363 decimal fixed point type
5364 (Derived_Type_Declaration): issue error in formal mode on derived type
5365 other than type extensions of tagged record types
5366 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5367 with check on access definition
5368 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5369 mode on protected definition.
5370 (Analyze_Task_Definition): issue error in formal mode on task definition
5371
53722011-08-02 Robert Dewar <dewar@adacore.com>
5373
5374 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5375
53762011-08-02 Javier Miranda <miranda@adacore.com>
5377
5378 * sem_ch6.adb (Can_Override_Operator): New function.
5379 (Verify_Overriding_Indicator): Add missing code to check overriding
5380 indicator in operators. Fixes regression.
5381 (Check_Overriding_Indicator): Minor reformating after replacing the
5382 code that evaluates if the subprogram can override an operator by
5383 invocations to the above new function.
5384 * einfo.adb
5385 (Write_Field26_Name): Add missing code to ensure that, following
5386 the documentation in einfo.ads, this field is not shown as attribute
5387 "Static_Initialization" on non-dispatching functions.
5388
53892011-08-02 Jose Ruiz <ruiz@adacore.com>
5390
5391 * sem_res.adb (Resolve_Call): A call to
5392 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5393 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5394 i.e., when the second parameter is of type Time_Span.
5395
53962011-08-02 Vincent Celier <celier@adacore.com>
5397
5398 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5399 with an archive instead of -L<library dir> -l<library name>.
5400
54012011-08-02 Ed Schonberg <schonberg@adacore.com>
5402
5403 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5404 mark the base types In_Use in addition to making the operations
5405 use_visible.
5406
54072011-08-02 Ed Falis <falis@adacore.com>
5408
5409 * init.c: add and setup __gnat_signal_mask for the exception signals
5410 * s-inmaop-vxworks.adb: new file.
5411 * s-intman-vxworks.adb: remove unnecessary initializations and
5412 simplify remaining
5413 * s-intman-vxworks.ads: remove unnecessary variable
5414 * s-taprop-vxworks.adb: simplify signal initialization
5415
54162011-08-02 Robert Dewar <dewar@adacore.com>
5417
5418 * sem_ch8.adb: Minor code reorganization, comment updates.
5419
54202011-08-02 Robert Dewar <dewar@adacore.com>
5421
5422 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5423 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5424 here from Sem_Res.
5425 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5426 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5427
54282011-08-02 Ed Schonberg <schonberg@adacore.com>
5429
5430 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5431 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5432 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5433 use_type_clauses, to handle more efficiently use_type and use_all_type
5434 constructs.
5435 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5436 Ada2012 Use_All_Type clause.
5437 (Use_Class_Wide_Operations): new procedure.
5438
54392011-08-02 Robert Dewar <dewar@adacore.com>
5440
5441 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5442 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5443 expression to expression function.
5444
54452011-08-02 Ed Schonberg <schonberg@adacore.com>
5446
5447 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5448 if types are compatible.
5449
54502011-08-02 Yannick Moy <moy@adacore.com>
5451
5452 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5453 returns True if its argument array types have same dimension and same
5454 static bounds at each index.
5455 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5456 OUT or IN OUT paramaters which are not view conversions in SPARK.
5457 (Resolve_Arithmetic_Op): issue an error in formal mode on
5458 multiplication or division with operands of fixed point types which are
5459 not qualified or explicitly converted.
5460 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5461 Boolean or array type (except String) operands.
5462 (Resolve_Equality_Op): issue an error in formal mode on equality
5463 operators for array types other than String with non-matching static
5464 bounds.
5465 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5466 for array types with non-matching static bounds. Factorize the code in
5467 Matching_Static_Array_Bounds.
5468 (Resolve_Qualified_Expression): issue an error in formal mode on
5469 qualified expressions for array types with non-matching static bounds.
5470 (Resolve_Type_Conversion): issue an error in formal mode on type
5471 conversion for array types with non-matching static bounds
5472
54732011-08-02 Robert Dewar <dewar@adacore.com>
5474
5475 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5476
54772011-08-02 Ed Schonberg <schonberg@adacore.com>
5478
5479 * par-ch9.adb: save location of entry for proper error message.
5480
54812011-08-02 Javier Miranda <miranda@adacore.com>
5482
5483 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5484 (Use_Full_View) which permits this routine to climb through the
5485 ancestors using the full-view of private parents.
5486 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5487 Use_Full_View to true in calls to Is_Ancestor.
5488 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5489 true in call to Is_Ancestor.
5490 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5491 Use_Full_View to true in call to Is_Ancestor.
5492 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5493 call to Is_Ancestor.
5494 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5495 Use_Full_View to true in calls to Is_Ancestor.
5496 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5497 Make_Select_Specific_Data_Table, Register_Primitive,
5498 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5499 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5500 to true in call to Is_Ancestor.
5501 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5502 Use_Full_View to true in calls to Is_Ancestor.
5503 * exp_cg.adb
5504 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5505 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5506
55072011-08-02 Robert Dewar <dewar@adacore.com>
5508
5509 * gnat_rm.texi: Minor reformatting.
5510 * sem_prag.adb: Minor reformatting.
5511
55122011-08-02 Tristan Gingold <gingold@adacore.com>
5513
5514 * vms_data.ads: Add VMS qualifier for -gnateP.
5515
55162011-08-02 Robert Dewar <dewar@adacore.com>
5517
5518 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5519 * par-ch7.adb (P_Package): Proper placement of aspects for package
5520 decl/instantiation.
5521 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5522 (End_Statements): Add Is_Sloc parameterr
5523 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5524 (Check_End): Ad Is_Sloc parameter
5525 (End_Statements): Add Is_Sloc parameterr
5526
55272011-08-02 Vincent Celier <celier@adacore.com>
5528
5529 * ug_words: Add VMS qualifier equivalent to -gnateP:
5530 /SYMBOL_PREPROCESSING.
5531
55322011-08-02 Jose Ruiz <ruiz@adacore.com>
5533
5534 * gnat-style.texi: For hexadecimal numeric literals the typical
5535 grouping of digits is 4 to represent 2 bytes.
5536 A procedure spec which is split into several lines is indented two
5537 characters.
5538
55392011-08-02 Yannick Moy <moy@adacore.com>
5540
5541 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5542 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5543 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5544 properly qualified
5545 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5546 choice in array aggregate
5547 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5548 mark as ancestor
5549 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5550 positional and named aggregate for record, or others in record
5551 aggregate, or multiple choice in record aggregate
5552 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5553 array operands to logical operations AND, OR and XOR do not have the
5554 same static lower and higher bounds
5555 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5556
55572011-08-01 Robert Dewar <dewar@adacore.com>
5558
5559 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5560 Replaces Last_Source_Node_In_Sequence.
5561 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5562 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5563 parens and blank in string (this was inconsistently implemented).
5564 * errout.ads
5565 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5566 blank in string (this was inconsistently implemented).
5567 * gnat1drv.adb
5568 (Set_Global_Switches): Set formal mode switches appropriately
5569 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5570 * par-prag.adb
5571 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5572 call Set_Error_Msg_Lang to set "spark" as language name.
5573 * par.adb: Remove unnecessary call to set formal language for errout
5574 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5575 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5576 name.
5577 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5578 calls to it, moved after resolution so that types are known
5579 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5580 result of concatenation is not of type String
5581 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5582 concatenation is not properly restricted
5583 * gnat_rm.texi: Add doc on pragma Spark_95.
5584 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5585 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5586 * gcc-interface/Make-lang.in: Update dependencies.
5587
55882011-08-01 Javier Miranda <miranda@adacore.com>
5589
5590 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5591 condition that detects if the overridden operation must replace an
5592 existing entity.
5593
55942011-08-01 Javier Miranda <miranda@adacore.com>
5595
5596 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5597 code declarations inserted by Insert_Actions in each alternative of the
5598 N_Case_Expression node.
5599
56002011-08-01 Robert Dewar <dewar@adacore.com>
5601
5602 * sem_ch6.adb: Minor code reorganization.
5603 * sem_util.adb: Minor reformatting.
5604
56052011-08-01 Pascal Obry <obry@adacore.com>
5606
5607 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5608 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5609
56102011-08-01 Yannick Moy <moy@adacore.com>
5611
5612 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5613 literal or operator symbol which is prefixed
5614 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5615 mode on access attributes.
5616 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5617 that concatenation operands are properly restricted in formal mode
5618 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5619 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5620 result of the concatenation has a type different from String.
5621 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5622 Analyze_Quantified_Expression, Analyze_Slice,
5623 Analyze_Null): issue an error in formal mode on unsupported constructs
5624 * sem_ch5.adb
5625 (Analyze_Block_Statement): only issue error on source block statement
5626 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5627 function which returns the last node in a list of nodes for which
5628 Comes_From_Source returns True, if any
5629 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5630 Last_Source_Node_In_Sequence
5631 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5632 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5633 mode on unsupported constructs
5634 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5635 rest of the actions may be needed later on since the error is marked as
5636 not serious.
5637 * sinfo.ads: Typos in comments.
5638
56392011-08-01 Pascal Obry <obry@adacore.com>
5640
5641 * projects.texi: Minor editing.
5642
56432011-08-01 Yannick Moy <moy@adacore.com>
5644
5645 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5646 insertion character ~~
5647 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5648 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5649 with insertion character ~~
5650 (Set_Msg_Text): treat insertion character ~~
5651 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5652 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5653 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5654 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5655 errors related to the formal language restriction not serious
5656 (insertion character |).
5657 * par.adb (Par): set formal language for error messages if needed
5658 * sem_ch6.adb (Check_Missing_Return): take into account possible
5659 generated statements at the end of the function
5660 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5661 enumeration value to define a new pragma SPARK_95
5662 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5663 SPARK_Version): new type and variables to store the SPARK version
5664 (none by default).
5665 (SPARK_Mode): return True when SPARK_Version is set
5666 * par-prag.adb: Correct indentation
5667 (Prag): take Pragma_SPARK_95 into account
5668 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5669 into account.
5670
56712011-08-01 Robert Dewar <dewar@adacore.com>
5672
5673 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5674 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5675 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5676
56772011-08-01 Pascal Obry <obry@adacore.com>
5678
5679 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5680 Target_Name to Get_Path call.
5681 (Parse_Single_Project): Likewise.
5682 (Post_Parse_Context_Clause): Likewise.
5683 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5684 Call Initialise_Project_Path with the proper Target_Name.
5685 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5686 search path.
5687 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5688 with the proper Target_Name.
5689 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5690 Part.Parse routine.
5691 (Parse_Project_And_Apply_Config): Likewise.
5692 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5693 This is fine as this part of the code is supporting only native
5694 compilation.
5695 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5696 is fine as this part of the code is supporting only native compilation.
5697
56982011-08-01 Yannick Moy <moy@adacore.com>
5699
5700 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5701 of homonym, unless the homonym is one of the cases allowed in SPARK
5702 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5703 package declaration occurring after a body.
5704
57052011-08-01 Robert Dewar <dewar@adacore.com>
5706
5707 * checks.adb, exp_ch4.adb: Minor reformatting.
5708
57092011-08-01 Javier Miranda <miranda@adacore.com>
5710
5711 * einfo.ads (Access_Disp_Table): Fix documentation.
5712 (Dispatch_Table_Wrappers): Fix documentation.
5713
57142011-08-01 Pascal Obry <obry@adacore.com>
5715
5716 * prj-env.adb, prj-env.ads: Minor reformatting.
5717
57182011-08-01 Yannick Moy <moy@adacore.com>
5719
5720 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5721 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5722 procedures out of these packages.
2c7f9cc0 5723 * errout.ads, errout.adb
052e0603
AC
5724 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5725 procedures in of this package
5726 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5727 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5728 on misplaced later vs initial declarations, like in Ada 83
5729 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5730 formal mode on attribute of private type whose full type declaration
5731 is not visible
5732 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5733 package declaration inside a package specification
5734 (Analyze_Full_Type_Declaration): issue error in formal mode on
5735 controlled type or discriminant type
5736 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5737 user-defined operator means that it should come from the source
5738 (New_Overloaded_Entity): issue error in formal mode on overloaded
5739 entity.
5740 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5741
57422011-08-01 Thomas Quinot <quinot@adacore.com>
5743
5744 * atree.adb: Minor reformatting.
5745 * checks.adb: Minor reformatting.
5746
57472011-08-01 Vincent Celier <celier@adacore.com>
5748
5749 * s-parame-vms-ia64.ads: Fix typo in comment
5750 Minor reformatting
5751 * s-parame-vms-restrict.ads: Removed, unused.
5752
57532011-08-01 Javier Miranda <miranda@adacore.com>
5754
5755 * exp_ch3.adb
5756 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5757 * sem_ch3.adb
5758 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5759 * sem_ch3.ads, sem_ch3.adb
5760 (Is_Constant_Bound): New extended version of the subprogram that was
5761 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5762 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5763 * sem_aux.ads (Constant_Value): Fix typo in comment.
5764 * checks.adb (Generate_Index_Checks): New implementation which, for
5765 array objects with constant bounds, generates the runtime check
5766 referencing the bounds of the array type. For other cases this routine
5767 provides its previous behavior obtaining such values from the array
5768 object.
5769 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5770 parent type.
5771 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5772 we cannot have semantic interpretations of the new node.
5773
57742011-08-01 Ed Schonberg <schonberg@adacore.com>
5775
5776 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5777 expressions.
5778
57792011-08-01 Arnaud Charlet <charlet@adacore.com>
5780
5781 * sem_ch8.adb: Minor code editing.
5782 * s-vxwext.adb: Remove trailing space.
5783 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5784 consistency with other files.
5785
57862011-08-01 Thomas Quinot <quinot@adacore.com>
5787
5788 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5789
57902011-08-01 Ed Schonberg <schonberg@adacore.com>
5791
5792 * par-ch10.adb: reject parameterized expressions as compilation unit.
5793 * sem_ch4.adb: handle properly conditional expression with overloaded
5794 then_clause and no else_clause.
5795
57962011-08-01 Tristan Gingold <gingold@adacore.com>
5797
5798 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5799 like done by System.Aux_DEC.
5800 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5801
58022011-08-01 Yannick Moy <moy@adacore.com>
5803
5804 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5805 missing label at end of declaration (subprogram or package)
5806 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5807 of positional and named parameter association
5808 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5809 Error_Msg_SP which adds a prefix to the error message giving the name
5810 of the formal language analyzed
5811 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5812 access result type in subprogram, unconstrained array as result type,.
5813 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5814 procedure
5815 * sem_ch8.adb: Code clean up.
5816
58172011-08-01 Javier Miranda <miranda@adacore.com>
5818
5819 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5820 * einfo.ads (Access_Disp_Table): Fix documentation.
5821 (Dispatch_Table_Wrappers): Fix documentation.
5822 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5823 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5824 to enforce the documentation of this attribute.
5825 (Set_Is_Interface): Cleanup the assertion.
5826 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5827 the Underlying_Type entity before reading attribute Access_Disp_Table.
5828 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5829 Locate the Underlying_Type before reading attribute Access_Disp_Table.
5830 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5831 the Underlying_Type entity before reading attribute Access_Disp_Table.
5832 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5833 Locate the Underlying_Type entity before reading attribute
5834 Access_Disp_Table.
5835
58362011-08-01 Ed Schonberg <schonberg@adacore.com>
5837
5838 * s-poosiz.ads: Additional overriding indicators.
5839
58402011-08-01 Yannick Moy <moy@adacore.com>
5841
5842 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5843 formal mode.
5844 (Analyze_Iteration_Scheme): issue error in formal mode when loop
5845 parameter specification does not include a subtype mark.
5846 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5847 formal mode on abstract subprogram.
5848 (Analyze_Subprogram_Specification): issue error in formal mode on
5849 user-defined operator.
5850 (Process_Formals): issue error in formal mode on access parameter and
5851 default expression.
5852 * sem_ch9.adb (Analyze_Abort_Statement,
5853 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5854 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5855 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5856 Analyze_Requeue, Analyze_Selective_Accept,
5857 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5858 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5859 issue error in formal mode on user-defined raise statement.
5860
58612011-08-01 Thomas Quinot <quinot@adacore.com>
5862
5863 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5864 declaration being hidden when overriding an implicit inherited
5865 subprogram.
5866 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5867 (-gnats), do not complain about a source file that contains only a
5868 pragma No_Body.
5869
58702011-08-01 Ed Schonberg <schonberg@adacore.com>
5871
5872 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5873 variable if already set.
5874
58752011-08-01 Arnaud Charlet <charlet@adacore.com>
5876
5877 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5878 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5879 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5880 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5881 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5882 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5883 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5884 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5885 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5886 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5887 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5888 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5889 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5890 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5891 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5892 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5893 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5894 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5895 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5896 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5897 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5898 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5899 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5900 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5901 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5902 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5903 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5904 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5905 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5906 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5907 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5908 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5909 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5910 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5911 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5912 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5913 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5914 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5915 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5916 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5917 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5918 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5919 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5920 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5921 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5922 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5923 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5924 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5925 s-osinte-mingw.ads: Update to GPLv3 run-time license.
5926 Use GNAT instead of GNARL.
5927
59282011-08-01 Bob Duff <duff@adacore.com>
5929
5930 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5931 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5932 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5933 reformatting.
5934
59352011-08-01 Yannick Moy <moy@adacore.com>
5936
5937 * debug.adb (d.D) reverve flag for the SPARK mode
5938 (d.E) reverve flag for SPARK generation mode
5939 (d.F) reverve flag for Why generation mode
2c7f9cc0 5940 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
052e0603
AC
5941 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
5942 functions which return True when the corresponding modes are set
5943 (Formal_Language): return "spark" or "alfa" when in formal verification
5944 mode.
5945 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5946 Error_Msg to prefix the error message with a tag giving the formal
5947 language
5948 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5949 message with a tag giving the formal language
5950 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5951 block statement
5952 (Analyze_Case_Statement): issue error in formal mode on case statement
5953 with a single "others" case alternative
5954 (Analyze_Exit_Statement): issue errors in formal mode on exit
5955 statements which do not respect SPARK restrictions
5956 (Analyze_Goto_Statement): issue error in formal mode on goto statement
5957 (Check_Unreachable_Code): always issue an error (not a warning) in
5958 formal mode on unreachable code (concerns both code after an infinite
5959 loop and after an unconditional jump, both not allowed in SPARK)
5960 * sem_ch6.adb (Analyze_Return_Statement): add call to
5961 Set_Return_Present for a procedure containing a return statement
5962 (already done for functions in Analyze_Function_Return)
5963 (Analyze_Function_Return): issue error in formal mode on extended
5964 return or if return is not last statement in function
5965 (Check_Missing_Return): issue error in formal mode if function does
5966 not end with return or if procedure contains a return
5967 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5968 function to detect if there is an inner scope of its parameter S which
5969 is a loop.
5970
59712011-08-01 Thomas Quinot <quinot@adacore.com>
5972
5973 * sem_ch6.ads: Minor reformatting.
5974
59752011-08-01 Javier Miranda <miranda@adacore.com>
5976
5977 * sem_util.adb (Abstract_Interface_List): Complete condition when
5978 processing private type declarations to avoid reading unavailable
5979 attribute.
5980 (Is_Synchronized_Tagged_Type): Complete condition when processing
5981 private extension declaration nodes to avoid reading unavailable
5982 attribute.
5983
59842011-08-01 Thomas Quinot <quinot@adacore.com>
5985
5986 * sem_ch3.adb: Minor reformatting.
5987
59882011-08-01 Thomas Quinot <quinot@adacore.com>
5989
5990 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5991 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5992 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5993 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5994 for VMS, instead parametrize the common implementation with
5995 System.Parameters declarations.
5996
59972011-08-01 Eric Botcazou <ebotcazou@adacore.com>
5998
5999 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
6000
60012011-08-01 Tristan Gingold <gingold@adacore.com>
6002
6003 * seh_init.c: Fix SEH handler installation on win64.
6004
60052011-08-01 Ed Schonberg <schonberg@adacore.com>
6006
6007 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
6008 double analysis of an anonymous access to subprogram, because it can
6009 lead to improper sharing of profiles and a back-end crash.
6010
60112011-08-01 Robert Dewar <dewar@adacore.com>
6012
6013 * make.adb, sem_ch4.adb: Minor reformatting.
6014 * gcc-interface/Make-lang.in: Update dependencies.
6015 * sem_util.adb, exp_ch5.adb: Minor reformatting.
6016
60172011-08-01 Arnaud Charlet <charlet@adacore.com>
6018
6019 * gnat_rm.texi: Fix definition of Long_Integer.
6020
60212011-08-01 Ed Schonberg <schonberg@adacore.com>
6022
6023 * exp_aggr.adb: check limit size of static aggregate unconditionally,
6024 to prevent storage exhaustion.
6025 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
6026 finalized is a function body, insert the cleanup code before the final
6027 return statement, to prevent spurious warnings.
6028 * s-pooglo.ads: add overriding indicator.
6029
60302011-08-01 Ed Schonberg <schonberg@adacore.com>
6031
6032 * sem_ch4.adb (Operator_Check): improve error message when both a
6033 with_clause and a use_clause are needed to make operator usage legal.
6034 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
6035 determine whether a compilation unit is visible within an other,
6036 either through a with_clause in the current unit, or a with_clause in
6037 its library unit or one one of its parents.
6038
60392011-08-01 Ed Schonberg <schonberg@adacore.com>
6040
6041 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
6042 over an arbitrary expression of an array or container type.
6043 * lib-xref.adb: clarify comment.
6044
60452011-08-01 Bob Duff <duff@adacore.com>
6046
6047 * einfo.ads: Minor reformatting.
6048 * debug.adb: Minor comment improvement.
6049
60502011-08-01 Javier Miranda <miranda@adacore.com>
6051
6052 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
6053 consider hidden subprograms as valid candidates.
6054
60552011-08-01 Arnaud Charlet <charlet@adacore.com>
6056
6057 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6058
60592011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
6060
6061 * gnat_ugn.texi: Fix typo.
6062
60632011-08-01 Robert Dewar <dewar@adacore.com>
6064
6065 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6066 lib-xref.adb: Minor reformatting
6067
60682011-08-01 Gary Dismukes <dismukes@adacore.com>
6069
6070 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6071 when to generate a call to Move_Final_List.
6072 (Has_Controlled_Parts): Remove this function.
6073
60742011-08-01 Geert Bosch <bosch@adacore.com>
6075
6076 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6077 "," in choice list.
6078
60792011-08-01 Thomas Quinot <quinot@adacore.com>
6080
6081 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6082 explicit raise of a predefined exception as Comes_From_Source if the
6083 original N_Raise_Statement comes from source.
6084
60852011-08-01 Robert Dewar <dewar@adacore.com>
6086
6087 * sinfo.ads: Add comment.
6088 * sem_ch6.adb: Minor reformatting.
6089
60902011-08-01 Robert Dewar <dewar@adacore.com>
6091
6092 * freeze.adb (Freeze_Entity): Refine check for bad component size
6093 clause to avoid rejecting confirming clause when atomic/aliased present.
6094
60952011-08-01 Ed Schonberg <schonberg@adacore.com>
6096
6097 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6098 better determine whether an entity reference is a write.
6099 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6100 subcomponent.
6101 * lib-xref.adb (Output_References): Do no suppress a read reference at
6102 the same location as an immediately preceeding modify-reference, to
6103 handle properly in-out actuals.
6104
61052011-08-01 Tristan Gingold <gingold@adacore.com>
6106
6107 * env.c (__gnat_setenv) [VMS]: Refine previous change.
6108
61092011-08-01 Quentin Ochem <ochem@adacore.com>
6110
6111 * i-cstrin.adb (New_String): Changed implementation, now uses only the
6112 heap to compute the result.
6113
61142011-08-01 Robert Dewar <dewar@adacore.com>
6115
6116 * atree.ads: Minor reformatting.
6117
61182011-08-01 Emmanuel Briot <briot@adacore.com>
6119
6120 * g-expect.adb (Get_Command_Output): Fix memory leak.
6121
61222011-08-01 Geert Bosch <bosch@adacore.com>
6123
6124 * cstand.adb (P_Float_Type): New procedure to print the definition of
6125 predefined fpt types.
6126 (P_Mixed_Name): New procedure to print a name using mixed case
6127 (Print_Standard): Use P_Float_Type for printing floating point types
6128 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6129 precision IEEE float.
6130
61312011-08-01 Thomas Quinot <quinot@adacore.com>
6132
6133 * sem_ch3.adb: Minor reformatting.
6134
61352011-08-01 Ed Schonberg <schonberg@adacore.com>
6136
6137 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6138 the completion of a generic function, insert the new body rather than
6139 rewriting the original.
6140
61412011-08-01 Yannick Moy <moy@adacore.com>
6142
6143 * sinfo.ads, errout.ads: Typos in comments.
6144
61452011-08-01 Robert Dewar <dewar@adacore.com>
6146
6147 * par-endh.adb: Minor reformatting.
6148
61492011-08-01 Robert Dewar <dewar@adacore.com>
6150
6151 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6152 (Pre_Post_Aspects): New subtype.
6153 * par-ch12.adb (P_Generic): New syntax for aspects in packages
6154 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6155 * par-ch7.adb (P_Package): Remove Decl parameter
6156 (P_Package): Handle new syntax for aspects (before IS)
6157 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6158 new aspect syntax
6159 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6160 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6161 (P_Package): Remove Decl parameter
6162 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6163 aspects
6164 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6165 specs
6166 * sem_util.ads, sem_util.adb (Static_Boolean): New function
6167 * sinfo.ads: Document new syntax for aspects in packages etc.
6168 * sprint.adb: Handle new syntax of aspects before IS in package
6169
61702011-08-01 Thomas Quinot <quinot@adacore.com>
6171
6172 * atree.ads: Minor reformatting.
6173 * sem_prag.adb: Minor reformatting.
6174
61752011-08-01 Robert Dewar <dewar@adacore.com>
6176
6177 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6178 case expr alternative.
6179
61802011-08-01 Ed Schonberg <schonberg@adacore.com>
6181
6182 * sem_ch12.adb: Fix typo.
6183
61842011-08-01 Geert Bosch <bosch@adacore.com>
6185
6186 * sem_prag.adb (Check_No_Link_Name): New procedure.
6187 (Process_Import_Or_Interface): Use Check_No_Link_Name.
6188 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6189 instead of Standard_Long_Long_Float_Size global. Preparation for
6190 eventual removal of per type constants.
6191 * exp_util.ads (Get_Stream_Size): New function returning the stream
6192 size value of subtype E.
6193 * exp_util.adb (Get_Stream_Size): Implement new function.
6194 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6195 function.
6196 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6197 * einfo.adb:
6198 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6199
62002011-08-01 Geert Bosch <bosch@adacore.com>
6201
6202 * cstand.adb: Fix comments.
6203 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6204 count of arguments.
6205
62062011-08-01 Robert Dewar <dewar@adacore.com>
6207
6208 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6209
62102011-08-01 Geert Bosch <bosch@adacore.com>
6211
6212 * atree.ads: Fix comment.
6213
62142011-08-01 Robert Dewar <dewar@adacore.com>
6215
6216 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6217 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6218 * par.adb: Add with for Namet.Sp.
6219 * par-tchk.adb: Minor reformatting.
6220
62212011-08-01 Vincent Celier <celier@adacore.com>
6222
6223 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6224 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6225 of the init procedure of a SAL.
6226 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6227 New procedure.
6228
62292011-08-01 Thomas Quinot <quinot@adacore.com>
6230
6231 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6232 reformatting.
6233
62342011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6235
6236 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
6237
62382011-08-01 Thomas Quinot <quinot@adacore.com>
6239
6240 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
6241 conformant with its spec (return True only for types that have
6242 an overriding Initialize primitive operation that prevents them from
6243 having preelaborable initialization).
6244 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
6245 initialization for controlled types in Ada 2005 or later mode.
6246
62472011-08-01 Robert Dewar <dewar@adacore.com>
6248
6249 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
6250 Postcondition.
6251 (Same_Aspect): New function.
6252 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
6253 Type_Invariant, Precondition, Postcondition.
6254 * snames.ads-tmpl: Add Name_Type_Invariant.
6255
62562011-08-01 Robert Dewar <dewar@adacore.com>
6257
6258 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
6259 here.
6260 (Freeze_All_Ent): Fix error in handling inherited aspects.
6261 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
6262 already analyzed, but don't skip entire processing of a declaration,
6263 that's wrong in some cases of declarations being rewritten.
6264 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
6265 Don't delay for integer, string literals
6266 Treat predicates in usual manner for delay, remove special case code,
6267 not needed.
6268 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
6269 (Build_Predicate_Function): Update saved expression in aspect
6270 (Build_Invariant_Procedure): Update saved expression in aspect
6271 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6272 of replacement of discriminant references if the reference is simple.
6273
62742011-08-01 Robert Dewar <dewar@adacore.com>
6275
6276 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6277 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6278 Static_Predicate and Dynamic_Predicate.
6279 (Build_Predicate_Function): Add processing for Static_Predicate
6280 and Dynamic_Predicate.
6281 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6282 (From_Static_Predicate): New flag
6283 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6284
62852011-08-01 Robert Dewar <dewar@adacore.com>
6286
6287 * usage.adb: Documentation cleanup for Ada version modes in usage.
6288 * expander.adb: Minor reformatting.
6289
62902011-08-01 Robert Dewar <dewar@adacore.com>
6291
6292 * atree.ads: Minor comment fix.
6293 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6294 a-witeio.ads, sem_prag.adb: Minor reformatting.
6295
62962011-08-01 Doug Rupp <rupp@adacore.com>
6297
6298 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6299 pointers. Use descrip.h header file for convenience. Add some
6300 comments.
6301
63022011-08-01 Robert Dewar <dewar@adacore.com>
6303
6304 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6305 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6306 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6307 New procedure.
6308 (Check_Aspect_At_End_Of_Declarations): New procedure
6309 (Analye_Aspect_Specification): Minor changes for above procedures
6310 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6311 specification node as well.
6312
63132011-08-01 Pascal Obry <obry@adacore.com>
6314
6315 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6316 Windows files. Use GetFilesAttributes() in this case to check for file
6317 existence instead of returning with an error code.
6318
63192011-08-01 Vincent Celier <celier@adacore.com>
6320
6321 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6322 High is above Source length.
6323
63242011-08-01 Robert Dewar <dewar@adacore.com>
6325
6326 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6327
63282011-08-01 Robert Dewar <dewar@adacore.com>
6329
6330 * aspects.ads (Boolean_Aspects): New subtype.
6331 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6332 for derived types in cases where the parent type and derived type have
6333 aspects.
6334 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6335 with aspects when parent type also has aspects.
6336 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6337 boolean expression at this point).
6338 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6339 accordance with final decision on the Ada 2012 feature.
6340 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6341
63422011-08-01 Matthew Heaney <heaney@adacore.com>
6343
6344 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6345
63462011-08-01 Pascal Obry <obry@adacore.com>
6347
6348 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6349 Fix Replace_Slice when High is above current string size.
6350 (Replace_Slice): Fix DL computation when High is above current
6351 string length.
6352
63532011-08-01 Gary Dismukes <dismukes@adacore.com>
6354
6355 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6356
63572011-08-01 Matthew Heaney <heaney@adacore.com>
6358
6359 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6360 of node.
6361
63622011-08-01 Pascal Obry <obry@adacore.com>
6363
6364 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6365 reformatting.
6366
63672011-08-01 Ed Schonberg <schonberg@adacore.com>
6368
6369 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6370 access to protected subprograms in generic bodies.
6371 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6372 protected type, indicate that the convention of the subprogram is
6373 Convention_Protected, because it may be used in subsequent declarations
6374 within the protected declaration.
6375
63762011-08-01 Vincent Celier <celier@adacore.com>
6377
6378 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6379 and "final" procedures when the name of the library is "ada", to avoid
6380 duplicate symbols "adainit" and "adafinal" in executables.
6381
63822011-08-01 Ed Schonberg <schonberg@adacore.com>
6383
6384 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6385 quantified expression that appears within a postcondition and uses the
6386 Ada2012 'Result attribute.
6387
63882011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6389
6390 * init.c (__gnat_error_handler): Cast reason to int.
6391 (__gnat_install_handler): Explain sa_sigaction use.
6392
63932011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6394
6395 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6396 subprogram has copy-in copy-out parameters, try to promote the mode of
6397 the return type if it is passed in registers.
6398
63992011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6400
6401 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6402 left operand as addressable.
6403
64042011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6405
6406 * gcc-interface/gigi.h (build_function_stub): Remove.
6407 (build_return_expr): Likewise.
6408 (convert_vms_descriptor): Declare.
6409 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6410 (build_function_stub): Move to...
6411 * gcc-interface/utils2.c (build_return_expr): Move to...
6412 * gcc-interface/trans.c (build_function_stub): ...here.
6413 (build_return_expr): ...here.
6414 (Subprogram_Body_to_gnu): Add local variable for language_function.
6415 Disconnect the parameter attributes cache, if any, once done with it.
6416 Call end_subprog_body only after setting the end_locus.
6417 Build the stub associated with the function, if any, at the very end.
6418 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6419 variables and streamline control flow.
6420
64212011-07-23 Arnaud Charlet <charlet@adacore.com>
6422
6423 PR ada/49819
6424 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6425 g-trasym-dwarf.adb.
6426
64272011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6428
6429 PR bootstrap/49794
6430 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6431 Assign to act.sa_sigaction.
6432 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6433 current->return_address to char * before arithmetic.
6434
64352011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6436
6437 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6438 Correct argument types.
6439 Extract code from reason.
6440 (__gnat_install_handler): Assign to act.sa_sigaction.
6441
64422011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6443
6444 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6445 (GNAT1_OBJS): ...here.
6446
64472011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6448
6449 PR ada/48711
6450 * g-socthi-mingw.adb (Fill): Fix formatting.
6451
6452 * gcc-interface/gigi.h: Move around comment.
6453
64542011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6455
6456 PR ada/46350
6457 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6458
64592011-07-14 Florian Weimer <fw@deneb.enyo.de>
6460
6461 PR ada/48711
6462 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6463
64642011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6465
6466 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6467 range comparison if Pmode is SImode.
6468
64692011-07-12 Laurent GUERBY <laurent@guerby.net>
6470 Eric Botcazou <ebotcazou@adacore.com>
6471
6472 * adadecode.c: Wrap up in extern "C" block.
6473 * adadecode.h: Likewise.
6474 * adaint.c: Likewise. Remove 'const' keyword.
6475 * adaint.h: Likewise.
6476 * argv.c: Likewise.
6477 * atree.h: Likewise.
6478 * cio.c: Likewise.
6479 * cstreams.c: Likewise.
6480 * env.c: Likewise.
6481 * exit.c: Likewise.
6482 * fe.h: Likewise.
6483 * final.c: Likewise.
6484 * init.c: Likewise.
6485 * initialize.c: Likewise.
6486 * link.c: Likewise.
6487 * namet.h: Likewise.
6488 * nlists.h: Likewise.
6489 * raise.c: Likewise.
6490 * raise.h: Likewise.
6491 * repinfo.h: Likewise.
6492 * seh_init.c: Likewise.
6493 * targext.c: Likewise.
6494 * tracebak.c: Likewise.
6495 * uintp.h: Likewise.
6496 * urealp.h: Likewise.
6497 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6498 * xsinfo.adb: Likewise.
6499 * xsnamest.adb: Likewise.
6500 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6501 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6502 * gcc-interface/misc.c: Likewise.
6503 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6504 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6505 ada/targext.o here...
6506 (GNAT_ADA_OBJS): ...and not here.
6507 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6508 (GNATBIND_OBJS): Reorder.
6509
65102011-07-07 Richard Henderson <rth@redhat.com>
6511
6512 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6513 dwarf2out_frame_init.
6514
65152011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6516
6517 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6518
65192011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6520
6521 PR target/39150
6522 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6523
65242011-07-06 Richard Guenther <rguenther@suse.de>
6525
6526 * gcc-interface/misc.c (gnat_init): Merge calls to
6527 build_common_tree_nodes and build_common_tree_nodes_2.
6528 Re-initialize boolean_false_node.
6529
65302011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6531 Olivier Hainque <hainque@adacore.com>
6532 Nicolas Setton <setton@adacore.com>
6533
6534 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6535 the type according to the ARTIFICIAL_P parameter.
6536 (create_type_decl): Likewise.
6537 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6538
65392011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6540
6541 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6542 (gnatbind): Likewise.
6543
65442011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6545
6546 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6547
65482011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6549
6550 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6551 local variable throughout. Remove useless call to Base_Type.
6552 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6553 Take it also into account for the volatileness of the field. Set the
6554 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6555
65562011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6557
6558 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6559 on a dereference built for a by-ref object if it has an address clause.
6560
65612011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6562
6563 * einfo.ads (Address_Taken): Document use for the second argument of
6564 Asm_Input and Asm_Output attributes.
6565 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6566 argument is an entity name, then set Address_Taken on it.
6567 <Attribute_Asm_Output>: Likewise.
6568 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6569 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6570 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6571 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6572
65732011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6574
6575 PR middle-end/46500
6576 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6577
65782011-06-14 Joseph Myers <joseph@codesourcery.com>
6579
6580 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6581 (ada/utils.o): Update dependencies.
6582 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6583 ../../../libcpp/libcpp.a.
6584 * gcc-interface/utils.c: Include common/common-target.h.
6585 (process_attributes): Use targetm_common.have_named_sections.
6586
65872011-06-07 Richard Guenther <rguenther@suse.de>
6588
6589 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6590 set_sizetype.
6591
65922011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6593
6594 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6595 TREE_THIS_NOTRAP flag.
6596
65972011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6598
6599 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6600 Fix thinko.
6601
66022011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6603
6604 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6605 constants whose full view has discriminants specially.
6606
66072011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6608
6609 * gcc-interface/utils.c: Include diagnostic.h.
6610 (gnat_write_global_declarations): Output debug information for all
6611 global type declarations before finalizing the compilation unit.
6612 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6613
66142011-05-25 Jakub Jelinek <jakub@redhat.com>
6615
6616 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6617
66182011-05-25 Kai Tietz <ktietz@redhat.com>
6619
6620 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6621 initialization instead of const/none-const pointer assignment.
6622
66232011-05-24 Joseph Myers <joseph@codesourcery.com>
6624
6625 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6626 $(EXTRA_GNAT1_OBJS).
6627 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6628 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6629 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6630 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6631 libcommon-target.a instead of prefix.o.
6632
66332011-05-21 Joseph Myers <joseph@codesourcery.com>
6634
6635 PR ada/49097
6636 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6637
66382011-05-20 Joseph Myers <joseph@codesourcery.com>
6639
6640 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6641 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6642 instead of version.o.
6643
66442011-05-18 Kai Tietz <ktietz@redhat.com>
6645
6646 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6647 boolean_false_node instead of integer_zero_node.
6648 (convert_with_check): Likewise.
6649 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6650
66512011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6652
6653 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6654 type of the parameter is an unconstrained array, convert the actual to
6655 the type of the formal in the In Out and Out cases as well.
6656
66572011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6658
6659 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6660 call build_function_type_array or build_varargs_function_type_array
6661 instead.
6662 (create_subprog_type): Don't call build_function_type; call
6663 build_function_type_vec instead.
6664
66652011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6666
6667 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6668 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6669 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6670
66712011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6672
6673 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6674
6675 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6676 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6677
66782011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6679
6680 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6681
66822011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6683
6684 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6685 instead of accessing TYPE_ARG_TYPES directly.
6686 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6687
66882011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6689
6690 PR ada/48844
6691 * gcc-interface/gigi.h (get_variant_part): Declare.
6692 * gcc-interface/decl.c (get_variant_part): Make global.
6693 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6694 types have the same constant size, are record types and T1 has a
6695 variant part while T2 doesn't.
6696
66972011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6698
6699 * gcc-interface/utils.c (begin_subprog_body): Do not call
6700 get_pending_sizes.
6701 (end_subprog_body): Likewise.
6702
67032011-05-04 Richard Guenther <rguenther@suse.de>
6704
6705 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6706 int_const_binop.
6707 (pos_to_constructor): Likewise.
6708
67092011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 6710 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
6711
6712 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6713 of build_function_type. Adjust calls to...
6714 (build_raise_check): ...this. Do not take a void_tree parameter.
6715 Call build_function_type_list instead of build_function_type.
6716 Fix head comment and swap couple of conditional blocks.
6717
67182011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6719
6720 * gnatvsn.ads (Library_Version): Bump to 4.7.
6721 (Current_Year): Bump to 2011.
6722
67232011-04-29 Michael Matz <matz@suse.de>
6724
6725 * gcc-interface/misc.c (gnat_handle_option): Set
6726 warn_maybe_uninitialized.
6727
67282011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6729
6730 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6731 the Watson/McCabe paper.
6732
67332011-04-23 Jim Meyering <meyering@redhat.com>
6734
6735 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6736
67372011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6738
6739 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6740 onto the new type.
6741
67422011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6743
6744 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6745 parameter.
6746 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6747 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6748 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6749 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6750 <all>: Do not set flags on the reused DECL node coming from an alias.
6751 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6752 don't need debug info here...
6753 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6754 (gigi): Adjust calls to create_subprog_decl.
6755 (build_raise_check): Likewise.
6756 (establish_gnat_vms_condition_handler): Likewise.
6757 (Compilation_Unit_to_gnu): Likewise.
6758 (gnat_to_gnu): Likewise.
6759
67602011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6761
6762 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6763 (NO_REORDER_ADAFLAGS): New variable.
6764 (EXTRA_GNATTOOLS): Always define.
6765 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6766 Clean up and adjust list of files compiled with special options.
6767 * gcc-interface/Make-lang.in: Likewise.
6768 (ada/decl.o): Cosmetical change.
6769 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6770
67712011-04-20 Jim Meyering <meyering@redhat.com>
6772
6773 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6774
67752011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6776
6777 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6778 $(CFLAGS) on the link line.
6779
67802011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6781
6782 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6783 padded type built for the return type if it is unconstrained.
6784
67852011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6786
6787 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6788
67892011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6790
6791 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6792 before calling TREE_CHAIN.
6793 * gcc-interface/misc.c (gnat_init_ts): New function.
6794 (LANG_HOOKS_INIT_TS): Define.
6795
67962011-04-12 Martin Jambor <mjambor@suse.cz>
6797
6798 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6799 instead of cgraph_node.
6800
68012011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6802
6803 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6804 alignment on fields of the RETURN type built for the Copy-In Copy-Out
6805 mechanism.
6806
68072011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6808
6809 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6810 of aggregate types that contain a placeholder.
6811
68122011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6813
6814 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
6815 TYPE_ARG_TYPES.
6816 (handle_type_generic_attribute): Likewise.
6817
68182011-04-04 Eric Botcazou <ebotcazou@adacore.com>
6819
6820 PR ada/47163
6821 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6822
68232011-04-04 Kai Tietz <ktietz@redhat.com>
6824
6825 PR ada/47163
6826 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6827 to flag value.
6828
68292011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6830
6831 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6832 type case, do not strip a padding type around the array type.
6833
68342011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6835
6836 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6837 types.
6838
68392011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6840
6841 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6842 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
6843 code for -feliminate-unused-debug-types.
6844 (gnat_post_options): Likewise.
6845
68462011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6847
6848 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6849 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6850 distinct copy.
6851
68522011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6853
6854 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6855 DECL_ARTIFICIAL flag on enumeration types.
6856
68572011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6858
6859 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6860 fat pointer types artificial unconditionally.
6861 <E_Array_Subtype>: Attach the base array type as a parallel type if it
6862 isn't artificial.
6863
68642011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6865
6866 * gcc-interface/gigi.h (get_dummy_type): Declare.
6867 (build_dummy_unc_pointer_types): Likewise.
6868 (finish_fat_pointer_type): Likewise.
6869 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6870 fat pointer type has been built, complete it in place.
6871 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6872 and thin pointers. Remove useless variable.
6873 (finish_fat_pointer_type): Make global and move to...
6874 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6875 (get_dummy_type): New function.
6876 (build_dummy_unc_pointer_types): Likewise.
6877 (gnat_pushdecl): Propage the name to the anonymous variants only.
6878 (update_pointer_to): Only adjust the pointer types in the unconstrained
6879 array case.
6880
68812011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6882
6883 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6884 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6885 if this is a Taft amendment type and the full declaration is available.
6886 * gcc-interface/trans.c (process_type): Likewise.
6887 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6888 (process_freeze_entity): Likewise.
6889 * gcc-interface/utils.c (dummy_global): New static variable.
6890 (gnat_write_global_declarations): If there are types declared as used
6891 at the global level, insert them in the global hash table.
6892
68932011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6894
6895 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6896 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6897 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6898 copy.
6899 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
6900 flag of the type accordingly.
6901 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6902
69032011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6904
6905 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6906 finalizing types when updating the pointers to the designated type.
6907 <all>: Finalize the deferred types even if we didn't defer processing
6908 of incomplete types in this invocation.
6909
69102011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
6911 Nicolas Setton <setton@adacore.com>
6912 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
6913
6914 * gcc-interface/misc.c (gnat_descriptive_type): New function.
6915 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6916
69172011-03-28 Kai Tietz <ktietz@redhat.com>
6918
6919 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
6920 Windows targets.
6921 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6922 * system-mingw.ads (System): Change ZCX_By_Default default to True.
6923
6924 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
6925
69262011-03-28 Tristan Gingold <gingold@adacore.com>
6927
6928 PR ada/44431
6929 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6930 Use ada output of gnatbind.
6931 (ada/b_gnatb.adb): Ditto.
6932 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6933 (ada.mostlyclean, ada.stage1)
6934 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6935 (ada.stagefeedback): Adjust.
6936 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
6937 Use ada output of gnatbind.
6938 (b_gnatm.adb): Ditto.
6939 (b_gnatl.o, b_gnatm.o): New rules.
6940
69412011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6942
6943 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6944 for the padded type built to support a specified size or alignment.
6945
69462011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6947
6948 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6949 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6950 unconditionally to the end of the unit when the designated type is
6951 limited_with'ed.
6952 <all>: Rename local variable. Attempt to un-defer types only and do it
6953 for limited_with'ed types as well.
6954 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
6955 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6956 consistently and remove redundant call to finalize_from_with_types.
6957
69582011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6959
6960 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6961 subprograms without a previous spec declared in the same unit.
6962 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6963 subprograms at the end of the unit instead of at the beginning.
6964 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6965 isn't public for the special handling of non-inline functions nested
6966 inside inline external functions.
6967
69682011-03-25 Jeff Law <law@redhat.com>
6969
6970 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
6971
69722011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6973
6974 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6975 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6976 to compute Set_Size_Depends_On_Discriminant.
6977 (Layout_Type): Call it on array types in back-end layout mode.
6978 * sem_util.adb (Requires_Transient_Scope): Return true for array
6979 types only if the size depends on the value of discriminants.
6980 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6981 type if the RHS is a call to a function that returns an unconstrained
6982 type with default discriminant.
6983
69842011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6985
6986 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6987 non-conversion to the nominal result type at the end.
6988
69892011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6990
6991 * gcc-interface/trans.c (create_temporary): New function taken from...
6992 (create_init_temporary): ...here. Call it.
6993 (call_to_gnu): Create the temporary for the return value early, if any.
6994 Create it for a function with copy-in/copy-out parameters if there is
6995 no target; in other cases of copy-in/copy-out, use another temporary.
6996 Push the new binding level lazily. Add and rename local variables.
6997
69982011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6999
7000 * gcc-interface/decl.c (validate_size): Improve comments and tweak
7001 error message.
7002 (set_rm_size): Likewise.
7003
70042011-03-23 Eric Botcazou <ebotcazou@adacore.com>
7005
7006 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
7007 for the padded type built in order to support a specified alignment.
7008 Fix incorrect formatting.
7009
70102011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7011
7012 PR bootstrap/48216
7013 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
7014
70152011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7016
7017 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
7018 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
7019 to the end of the list. Adjust recursive call. Rename local variable.
7020 If REORDER is true, reorder components of the record type.
7021 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
7022 components_to_record and adjust the parameter list.
7023
70242011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7025
7026 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
7027 disabled, use the variable for bounds of loop iteration scheme.
7028
70292011-03-21 Kai Tietz <ktietz@redhat.com>
7030
7031 PR target/12171
7032 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
7033
70342011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7035
7036 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
7037 out whether the expression is read-only. Short-circuit placeholder
7038 case and rename a couple of local variables.
7039
70402011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7041
7042 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
7043 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
7044 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
7045 (convert): Deal with conversions from a smaller form type specially.
7046
70472011-02-14 Eric Botcazou <ebotcazou@adacore.com>
7048
7049 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
7050 its argument, except for the special -I- switch.
7051
70522011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
7053
7054 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
7055 "Ada Issues".
7056
70572011-02-08 Eric Botcazou <ebotcazou@adacore.com>
7058
7059 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7060
70612011-02-03 Eric Botcazou <ebotcazou@adacore.com>
7062
7063 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7064 GNAT_FORMAL.
7065 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7066 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
7067 instead of GNAT_FORMAL. Protect the expression against multiple uses.
7068 Do not generate the check directly, instead instantiate the template
7069 check present in the descriptor.
7070 (make_descriptor_field): Move around.
7071 (build_vms_descriptor32): Build a template check in the POINTER field.
7072 (build_vms_descriptor): Remove useless suffixes.
7073 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7074
70752011-01-26 Eric Botcazou <ebotcazou@adacore.com>
7076
7077 PR bootstrap/47467
7078 * targext.c: Include target files if IN_RTS is defined.
7079
70802011-01-26 Richard Guenther <rguenther@suse.de>
7081
7082 PR bootstrap/47467
7083 * targext.c: Include config.h.
7084 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7085 dependency.
7086
70872011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 7088 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
7089
7090 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7091
70922011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7093
7094 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7095 end-of-case on the end label and its associated gotos, if any.
7096
70972011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7098
7099 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7100 expressions of the parameter cache within the statement group of
7101 the CICO mechanism.
7102
71032011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 7104 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
7105
7106 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7107 (set_end_locus_from_node): New function.
7108 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7109 make and the function end_locus.
7110 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7111 for the elaboration subprogram.
7112 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7113 set the end_locus of the expression as well.
7114
71152011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7116
7117 PR ada/47131
7118 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7119 variables that are referenced in exception handlers volatile.
7120
7121
7122\f
7123Copyright (C) 2011 Free Software Foundation, Inc.
7124
7125Copying and distribution of this file, with or without modification,
7126are permitted in any medium without royalty provided the copyright
7127notice and this notice are preserved.
7128
7129 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7130 - fix bugs in the description of Source_Trace;
7131 - get rid of UNIT_NAME;
7132
4fbad0ba
AC
71332011-08-02 Javier Miranda <miranda@adacore.com>
7134
7135 * exp_ch9.adb
7136 (Build_Dispatching_Requeue): Adding support for VM targets
7137 since we cannot directly reference the Tag entity.
7138 * exp_sel.adb (Build_K): Adding support for VM targets.
7139 (Build_S_Assignment): Adding support for VM targets.
7140 * exp_disp.adb
7141 (Default_Prim_Op_Position): In VM targets do not restrict availability
7142 of predefined interface primitives to compiling in Ada 2005 mode.
7143 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7144 restricted to compiling in Ada 2005 mode.
7145 (Make_VM_TSD): Generate code that declares and initializes the OSD
7146 record. Needed to support dispatching calls through synchronized
7147 interfaces.
7148 * exp_ch3.adb
7149 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7150 primitives associated with synchronized interfaces.
7151 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7152 primitives associated with synchronized interfaces.
7153
71542011-08-02 Yannick Moy <moy@adacore.com>
7155
7156 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7157 statements hidden in SPARK if preceded by the HIDE directive
7158 (Parse_Exception_Handlers): mark each exception handler in a sequence of
7159 exception handlers as hidden in SPARK if preceded by the HIDE directive
7160 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7161 if starting with the HIDE directive
7162 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7163 starting with the HIDE directive; mark the declarations in a private
7164 part as hidden in SPARK if the private part starts with the HIDE
7165 directive
7166 * restrict.adb, restrict.ads
7167 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7168 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7169 argument node belongs to a part which is hidden in SPARK
7170 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7171 parts in SPARK; protect the possibly costly call to
7172 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7173 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7174 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7175 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7176 Tok_SPARK_Hide.
7177 (Scan): recognize special comment starting with '#' and followed by
7178 SPARK keyword "hide" as a HIDE directive.
7179
71802011-08-02 Yannick Moy <moy@adacore.com>
7181
7182 * types.ads, erroutc.ads: Minor reformatting.
7183
71842011-08-02 Vincent Celier <celier@adacore.com>
7185
7186 * link.c: Add response file support for cross platforms.
7187
6ff6152d
ES
71882011-08-02 Ed Schonberg <schonberg@adacore.com>
7189
7190 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7191 in an association, set parent field of copy before partial analysis.
7192 * sem_res.adb (Resolve_Slice): create reference to itype only when
7193 expansion is enabled.
7194
975c6896
YM
71952011-08-02 Yannick Moy <moy@adacore.com>
7196
7197 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7198 for new flag denoting which subprogram bodies are in ALFA
7199 * restrict.adb, sem_ch7.adb: Update comment
7200 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7201 sem_ch9.adb, sem_res.adb: Add calls to
7202 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7203 * sem_ch6.adb (Analyze_Function_Return): add calls to
7204 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7205 middle of the body, and extended return.
7206 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7207 False when missing return.
7208 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7209 to True for subprograms whose spec is in ALFA. Remove later on the flag
7210 on the entity used for a subprogram body when there exists a separate
7211 declaration.
7212 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7213 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7214 False, otherwise do nothing.
7215
afc8324d
AC
72162011-08-02 Robert Dewar <dewar@adacore.com>
7217
7218 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7219
72202011-08-02 Yannick Moy <moy@adacore.com>
7221
7222 * sem_ch4.ads: minor formatting.
7223
2ba431e5
YM
72242011-08-02 Yannick Moy <moy@adacore.com>
7225
7226 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7227 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7228 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7229 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7230 opt.ads: cleanup of SPARK mode
7231
0f853035
YM
72322011-08-02 Yannick Moy <moy@adacore.com>
7233
7234 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7235 types.
7236 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7237 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7238 * sem_ch3.adb
7239 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7240 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7241 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7242 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7243 types.
7244 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7245 non-static range.
7246 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7247 functions whose return type is not in ALFA.
7248 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7249 specifications.
7250 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7251 parameter's type is not in ALFA.
7252 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7253 types are in ALFA.
7254
d2b10647
ES
72552011-08-02 Ed Schonberg <schonberg@adacore.com>
7256
7257 * sem_ch6 (Analyze_Expression_Function): treat the function as
7258 Inline_Always, and introduce a subprogram declaration for it when it is
7259 not a completion.
7260 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7261 expression functions, so that the back-end can determine whether they
7262 can in fact be inlined.
7263 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7264 a function body comes from an expression function.
7265
c7b9d548
AC
72662011-08-02 Gary Dismukes <dismukes@adacore.com>
7267
7268 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7269 null exclusions to test Can_Never_Be_Null on the anonymous access types
7270 of the formals rather than testing the formals themselves. Exclude this
7271 check in cases where the Old_Formal is marked as a controlling formal,
7272 to avoid issuing spurious errors for bodies completing dispatching
7273 operations (due to the flag not getting set on controlling access
7274 formals in body specs).
7275 (Find_Corresponding_Spec): When checking full and subtype conformance of
7276 subprogram bodies in instances, pass Designated and E in that order, for
7277 consistency with the expected order of the formals (New_Id followed by
7278 Old_Id).
7279
72802011-08-02 Robert Dewar <dewar@adacore.com>
7281
7282 * sem_ch8.adb: Minor reformatting.
7283
1138cf59
AC
72842011-08-02 Ed Schonberg <schonberg@adacore.com>
7285
7286 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7287 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7288 primitive operations of class-wide actuals.
7289
72902011-08-02 Javier Miranda <miranda@adacore.com>
7291
7292 * exp_atag.ads, exp_atag.adb
7293 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7294 since its value is implicitly passed in argument Typ.
7295 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7296 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7297 Build_Common_Dispatching_Select_Statements.
7298
7b9db926
RD
72992011-08-02 Robert Dewar <dewar@adacore.com>
7300
7301 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7302 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7303 Minor reformatting.
7304
e8374e7a
AC
73052011-08-02 Robert Dewar <dewar@adacore.com>
7306
7307 * sem_res.adb: Minor reformatting.
7308 * sem_prag.adb: Minor reformatting.
7309
73102011-08-02 Javier Miranda <miranda@adacore.com>
7311
7312 * exp_atag.adb, exp_atags.ads
7313 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7314 by the tagged type Entity. Required to use this routine in the VM
7315 targets since we do not have available the Tag entity in the VM
7316 platforms.
7317 * exp_ch6.adb
7318 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7319 Ada.Tags has not been previously loaded.
7320 * exp_ch7.adb
7321 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7322 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7323 * sem_aux.adb
7324 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7325 view of enclosing scopes. Required to handle enclosing scopes that
7326 are synchronized types whose full view is a task type.
7327 * exp_disp.adb
7328 (Build_VM_TSDs): Minor code improvement to avoid generating and
7329 analyzing lists with empty nodes.
7330 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7331 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7332 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7333 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7334 (Make_Select_Specific_Data_Table): Add support for VM targets.
7335 (Make_VM_TSD): Generate code to initialize the SSD structure of
7336 the TSD.
7337
73382011-08-02 Yannick Moy <moy@adacore.com>
7339
7340 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7341 cross-references section in ALI.
7342 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7343 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7344 Sub).
7345 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7346 subprogram or package entity of a node
7347 (Is_Local_Reference_Type): new function returns True for references
7348 selected in local cross-references.
7349 (Lt): function extracted from Lt in Output_References
7350 (Write_Entity_Name): function extracted from Output_References
7351 (Generate_Definition): generate reference with type 'D' for definition
7352 of objects (object declaration and parameter specification), with
7353 appropriate locations and units, for use in local cross-references.
7354 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7355 references of type 'I' for initialization in object definition.
7356 (Output_References): move part of function Lt and procedure
7357 Write_Entity_Name outside of the body. Ignore references of types 'D'
7358 and 'I' introduced for local cross-references.
7359 (Output_Local_References): new procedure to output the local
7360 cross-references sections.
7361 (Lref_Entity_Status): new array defining whether an entity is a local
7362 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7363 with 'I' type when initialization expression is present.
7364 * get_scos.adb, get_scos.ads: Correct comments and typos
7365
1f6439e3
AC
73662011-08-02 Javier Miranda <miranda@adacore.com>
7367
7368 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7369 the JVM target.
7370 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7371 the JVM target.
7372 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7373 TSD support.
7374
73752011-08-02 Vincent Celier <celier@adacore.com>
7376
7377 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7378 (No_Space_Img): New function
7379 (Find_Excluded_Sources): When reading from a file, record the file name
7380 and the line number for each excluded source.
7381 (Mark_Excluded_Sources): When reporting an error, if the excluded
7382 sources were read from a file, include file name and line number in
7383 the error message.
7384
73852011-08-02 Ed Schonberg <schonberg@adacore.com>
7386
7387 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7388
ab027d28
RD
73892011-08-02 Robert Dewar <dewar@adacore.com>
7390
7391 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7392
b3b28b0c
JM
73932011-08-02 Javier Miranda <miranda@adacore.com>
7394
7395 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7396 generation of TSDs to the DOTNET compiler.
7397 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7398 generation of TSDs to the DOTNET compiler.
7399
9732e886
JM
74002011-08-02 Javier Miranda <miranda@adacore.com>
7401
7402 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7403 record of all the tagged types declared inside library level package
7404 declarations, library level package bodies or library level subprograms.
7405 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7406 associated with a given tagged type.
7407 (Build_VM_TSDs): New subprogram.
7408 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7409 compilation units that are subprograms.
7410 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7411 compilation units that are package bodies.
7412 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7413 units that are a package declaration or a package instantiation.
7414 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7415 reorganization to improve the error generated by the frontend when the
7416 function Ada.Tags.Secondary_Tag is not available.
7417 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7418 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7419
e526d0c7
AC
74202011-08-02 Javier Miranda <miranda@adacore.com>
7421
7422 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7423
74242011-08-02 Robert Dewar <dewar@adacore.com>
7425
7426 * s-imenne.ads: Minor reformatting.
7427
74282011-08-02 Robert Dewar <dewar@adacore.com>
7429
7430 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7431 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7432 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7433
74342011-08-02 Robert Dewar <dewar@adacore.com>
7435
7436 * einfo.ads (Materialize_Entity): Document this is only for renamings
7437 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7438 required debug information in the case where we transform the object
7439 declaration into a renaming declaration.
7440 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7441 object
7442 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7443 Materialize_Entity.
7444
5b1e6aca
RD
74452011-08-02 Robert Dewar <dewar@adacore.com>
7446
7447 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7448 Suppress_Init_Procs.
7449 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7450 Suppress_Initialization/Initialization_Suppressed.
7451 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7452 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7453 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7454 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7455
5ad4969d
RD
74562011-08-02 Robert Dewar <dewar@adacore.com>
7457
7458 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7459 Minor reformatting.
7460
8c4ee6f5
AC
74612011-08-02 Ed Schonberg <schonberg@adacore.com>
7462
7463 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7464 only have inheritable classwide pre/postconditions.
7465
74662011-08-02 Javier Miranda <miranda@adacore.com>
7467
7468 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7469 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7470 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7471 checks if the external tag of a type is the same as the external tag
7472 of some other declaration.
7473
0b3d16c0
AC
74742011-08-02 Thomas Quinot <quinot@adacore.com>
7475
7476 * s-taskin.ads: Minor reformatting.
7477
74782011-08-02 Emmanuel Briot <briot@adacore.com>
7479
7480 * g-comlin.adb (Display_Help): swap the order in which it prints the
7481 short help and the general usage.
7482
74832011-08-02 Ed Schonberg <schonberg@adacore.com>
7484
7485 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7486 the aspect declarations and attach them to the generic copy for
7487 subsequent analysis.
7488 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7489 declarations of the generic tree to the new subprogram declarations.
7490 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7491 conditions that apply to a subprogram instance.
7492
74932011-08-02 Robert Dewar <dewar@adacore.com>
7494
7495 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7496
74972011-08-02 Ed Schonberg <schonberg@adacore.com>
7498
7499 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7500 private type with a tagged full view is not derived in the immediate
7501 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7502
4637729f
AC
75032011-08-02 Robert Dewar <dewar@adacore.com>
7504
7505 * exp_ch4.adb: Minor reformatting.
7506
75072011-08-02 Ed Schonberg <schonberg@adacore.com>
7508
7509 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7510 Ada2012 iterator, the loop will be rewritten during expansion into a
7511 while loop with a cursor and an element declaration. Do not analyze the
7512 body in this case, because if the container is for indefinite types the
7513 actual subtype of the elements will only be determined when the cursor
7514 declaration is analyzed.
7515
75162011-08-02 Arnaud Charlet <charlet@adacore.com>
7517
7518 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7519 size/alignment related attributes in CodePeer_Mode.
7520
75212011-08-02 Gary Dismukes <dismukes@adacore.com>
7522
7523 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7524 Prepend_Element, since this can result in the operation getting the
7525 wrong slot in the full type's dispatch table if the full type has
7526 inherited operations. The incomplete type's operation will get added
7527 to the proper position in the full type's primitives
7528 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7529 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7530 dispatching operations, since there are cases where nonprimitive
7531 subprograms can get added to the list of incomplete dependents (such
7532 as subprograms in nested packages).
7533 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7534 private part when determining whether to add a primitive with a
7535 parameter of a tagged incomplete type to the Private_Dependents list.
7536 Such primitives can also occur in the visible part, and should not have
7537 been excluded from being private dependents.
7538 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7539 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7540 list of a Taft-amendment incomplete type is a primitive before issuing
7541 an error that the full type must appear in the same unit. There are
7542 cases where nonprimitives can be in the list (such as subprograms in
7543 nested packages).
7544 * sem_disp.adb (Derives_From): Use correct condition for checking that
7545 a formal's type is derived from the type of the corresponding formal in
7546 the parent subprogram (the condition was completely wrong). Add
7547 checking that was missing for controlling result types being derived
7548 from the result type of the parent operation.
7549
4c60de0c
YM
75502011-08-02 Yannick Moy <moy@adacore.com>
7551
7552 * errout.adb (First_Node): minor renaming
7553 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7554 first node.
7555
f5afb270
AC
75562011-08-02 Yannick Moy <moy@adacore.com>
7557
7558 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7559 before accessing operands.
7560 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7561 decide whether an initialization expression respects SPARK rules, as
7562 the plain node is the expanded one. This allows for more valid warnings
7563 to be issued.
7564 * gnat_rm.texi: Minor update.
7565
75662011-08-02 Arnaud Charlet <charlet@adacore.com>
7567
7568 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7569 previous change.
7570
75712011-08-02 Robert Dewar <dewar@adacore.com>
7572
7573 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7574
75752011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7576
7577 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7578 loop statements and the element renaming declaration with a block when
7579 the element type is controlled.
7580
75812011-08-02 Yannick Moy <moy@adacore.com>
7582
7583 * sinfo.ads: Minor formatting.
7584
75852011-08-02 Ed Schonberg <schonberg@adacore.com>
7586
7587 * sem_aggr.adb (Add_Association): if the association has a box and no
7588 expression, use the Sloc of the aggregate itself for the new
7589 association.
7590 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7591 the Original_Node.
7592
db72f10a
AC
75932011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7594
7595 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7596 When a container is provided via a function call, generate a renaming
7597 of the function result. This avoids the creation of a transient scope
7598 and the premature finalization of the container.
7599 * exp_ch7.adb (Is_Container_Cursor): Removed.
7600 (Wrap_Transient_Declaration): Remove the supression of the finalization
7601 of the list controller when the declaration denotes a container cursor,
7602 it is not needed.
7603
76042011-08-02 Yannick Moy <moy@adacore.com>
7605
7606 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7607 node is from source, instead of the original node being from source.
7608 * sem_aggr.adb
7609 (Resolve_Array_Aggregate): refine the check for a static expression, to
7610 recognize also static ranges
7611 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7612 Array_Type_Declaration): postpone the test for the type being a subtype
7613 mark after the type has been resolved, so that component-selection and
7614 expanded-name are discriminated.
7615 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7616 to distinguish the case of an iteration scheme, so that an error is
7617 issed on a non-static range in SPARK except in an iteration scheme.
7618 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7619 In_Iter_Schm = True.
7620 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7621 user-defined operators so that they are allowed in renaming
7622 * sem_ch8.adb
7623 (Find_Selected_Component): refine the check for prefixing of operators
7624 so that they are allowed in renaming. Move the checks for restrictions
7625 on selector name after analysis discriminated between
7626 component-selection and expanded-name.
7627 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7628 concatenation argument of string type if it is static.
7629 * sem_util.adb, sem_util.ads
7630 (Check_Later_Vs_Basic_Declarations): add a new function
7631 Is_Later_Declarative_Item to decice which declarations are allowed as
7632 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7633 mode, add that renamings are considered as later items.
7634 (Enclosing_Package): new function to return the enclosing package
7635 (Enter_Name): correct the rule for homonyms in SPARK
7636 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7637 from source (result of expansion) to avoid issuing wrong warnings.
7638
76392011-08-02 Ed Schonberg <schonberg@adacore.com>
7640
7641 * errout.adb: On anything but an expression First_Node returns its
7642 argument.
7643
23685ae6
AC
76442011-08-02 Pascal Obry <obry@adacore.com>
7645
7646 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7647
76482011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7649
7650 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7651 Set the associated loop as the related expression of internally
7652 generated cursors.
7653 * exp_ch7.adb (Is_Container_Cursor): New routine.
7654 (Wrap_Transient_Declaration): Supress the finalization of the list
7655 controller when the declaration denotes a container cursor.
7656
76572011-08-02 Yannick Moy <moy@adacore.com>
7658
7659 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7660 command line now.
7661 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7662 expression is a simple expression. This check cannot be performed in
7663 the semantics, so just drop it.
7664 (P_Index_Or_Discriminant_Constraint): move check that the index or
7665 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7666 semantics. Other cases were previously checked in the semantics.
7667 * par-ch4.adb (P_Name): move checks that a selector name is not
7668 character literal or an operator symbol to Find_Selected_Component in
7669 the semantics
7670 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7671 declarations are not placed after later declarations in a separate
7672 procedure in Sem_Util (possibly not the best choice?), to be used both
7673 during parsing, for Ada 83 mode, and during semantic analysis, for
7674 SPARK mode.
7675 * par-endh.adb (Check_End): move check that end label is not missing
7676 to Process_End_Label in the semantics
7677 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7678 the special case for SPARK restriction
7679 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7680 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7681 parameter Force to issue the error message even on internal node (used
7682 for generated end label). Call Check_Restriction to check when an error
7683 must be issued. In SPARK mode, issue an error message even if the
7684 restriction is not set.
7685 (Check_Restriction): new procedure with an additional out parameter to
7686 inform the caller that a message has been issued
7687 * sem_aggr.adb: Minor modification of message
7688 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7689 instead of issuing an error message directly
7690 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7691 declarations are not placed after later declarations, by calling
7692 Check_Later_Vs_Basic_Declarations
7693 (Analyze_Subtype_Declaration): move here the check that an index or
7694 discriminant constraint must be a subtype mark. Change the check that
7695 a subtype of String must start at one so that it works on subtype marks.
7696 * sem_ch4.adb (Analyze_Call): move here the check that a named
7697 association cannot follow a positional one in a call
7698 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7699 instead of issuing an error message directly
7700 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7701 selector name is not a character literal or an operator symbol. Move
7702 here the check that the prefix of an expanded name cannot be a
7703 subprogram or a loop statement.
7704 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7705 procedure called from parsing and semantics to check that basic
7706 declarations are not placed after later declarations
7707 (Process_End_Label): move here the check that end label is not missing
7708
77092011-08-02 Arnaud Charlet <charlet@adacore.com>
7710
7711 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7712 representation clause in codepeer mode, since it confuses CodePeer and
7713 does not bring useful info.
7714
77152011-08-02 Ed Falis <falis@adacore.com>
7716
7717 * init.c: initialize fp hw on MILS.
7718
77192011-08-02 Ed Schonberg <schonberg@adacore.com>
7720
7721 * errout.adb (First_Node): for bodies, return the node itself (small
7722 optimization). For other nodes, do not check source_unit if the node
7723 comes from Standard.
7724
d2d9cc22
AC
77252011-08-02 Robert Dewar <dewar@adacore.com>
7726
7727 * exp_ch3.adb: Minor comment additions.
7728 * sem_ch13.adb: Minor reformatting.
7729
77302011-08-02 Pascal Obry <obry@adacore.com>
7731
7732 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7733
a01b9df6
AC
77342011-08-02 Robert Dewar <dewar@adacore.com>
7735
7736 * sem_attr.adb: Minor reformatting.
7737
77382011-08-02 Robert Dewar <dewar@adacore.com>
7739
7740 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7741 (Has_Default_Component_Value): Removed
7742 * einfo.ads Comment updates
7743 (Has_Default_Aspect): Replaces Has_Default_Value
7744 (Has_Default_Component_Value): Removed
7745 * exp_ch13.adb
7746 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7747 * exp_ch3.adb
7748 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7749 (Get_Simple_Init_Val): Handle Default_Value aspect
7750 (Needs_Simple_Initialization): Handle Default_Value aspect
7751 * exp_ch3.ads: Needs_Simple_Initialization
7752 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7753 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7754 * sem_ch13.adb
7755 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7756 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7757 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7758
77592011-08-02 Ed Schonberg <schonberg@adacore.com>
7760
7761 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7762 package containing iteration primitives.
7763 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7764
75c90775
AC
77652011-08-02 Ed Schonberg <schonberg@adacore.com>
7766
7767 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7768 "of", pre-analyze expression in case it is a function call with
7769 finalization actions that must be placed ahead of the loop.
7770 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7771 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7772
77732011-08-02 Geert Bosch <bosch@adacore.com>
7774
7775 * cstand.adb (Create_Float_Types): Only consider C's long double for
7776 Long_Long_Float, in addition to double.
7777
ded8909b
AC
77782011-08-02 Robert Dewar <dewar@adacore.com>
7779
7780 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7781 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7782 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7783 Minor reformatting.
7784
77852011-08-02 Ed Schonberg <schonberg@adacore.com>
7786
7787 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7788 indexed component.
7789
77902011-08-02 Javier Miranda <miranda@adacore.com>
7791
7792 * einfo.ads, einfo.adb
7793 (Original_Access_Type): Move this attribute to Node26 since there was
7794 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7795 which causes conflicts and breaks the generation of the .NET compiler.
7796 (Interface_Name): Add missing documentation on JGNAT only uses of
7797 this attribute.
7798
70c34e1c
AC
77992011-08-02 Geert Bosch <bosch@adacore.com>
7800
7801 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7802 (Find_Back_End_Float_Type): Likewise
7803 (Create_Back_End_Float_Types): Likewise
7804 (Create_Float_Types): Likewise
7805 (Register_Float_Type): Likewise
7806 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7807 Nlist and split out type selection in new local Find_Base_Type function.
7808 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7809 Nlist
7810 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7811
78122011-08-02 Robert Dewar <dewar@adacore.com>
7813
7814 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7815 alpha order).
7816 * opt.ads: Minor comment change.
7817 * sem_ch12.adb: Minor code reorganization.
7818
b715bc59
AC
78192011-08-02 Gary Dismukes <dismukes@adacore.com>
7820
7821 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7822 subtype's list of rep items to the list on the full subtype in the case
7823 where the lists are the same.
7824
78252011-08-02 Geert Bosch <bosch@adacore.com>
7826
7827 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7828 using the one from System.Strings, which also deallocates all strings.
7829
002bdd68
AC
78302011-08-02 Geert Bosch <bosch@adacore.com>
7831
7832 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7833 function.
7834 * gcc-interface/Make-lang.in: Update dependencies.
7835
78362011-08-02 Olivier Hainque <hainque@adacore.com>
7837
7838 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7839 end_locus.
7840
499769ec
AC
78412011-08-02 Javier Miranda <miranda@adacore.com>
7842
7843 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7844 associated with anonymous access to subprograms.
7845
78462011-08-02 Geert Bosch <bosch@adacore.com>
7847
7848 * opt.ads
7849 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7850 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7851 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7852 (Add_Symbol_Definition): Move to switch-c.adb
7853 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7854 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7855 (Add_Symbol_Definition): Move to switch-c.adb.
7856 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7857 * sem_warn.adb
7858 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7859 Move to warnsw.adb.
7860 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7861 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7862 Move to warnsw.adb.
7863 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7864 (Add_Symbol_Definition): Moved from Prepcomp.
7865 * switch-c.ads: Update copyright notice. Use String_List instead of
7866 Argument_List, removing dependency on System.OS_Lib.
7867
aa1e353a
AC
78682011-08-02 Yannick Moy <moy@adacore.com>
7869
7870 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7871 mode on initialization expression which does not respect SPARK
7872 restrictions.
7873 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7874 if the tree referenced by its argument represents an initialization
7875 expression in SPARK, suitable for initializing an object in an object
7876 declaration.
7877
78782011-08-02 Javier Miranda <miranda@adacore.com>
7879
7880 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7881 internally generated access to subprogram with its associated protected
7882 subprogram type.
7883 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7884
15b682ca
GB
78852011-08-02 Geert Bosch <bosch@adacore.com>
7886
7887 * cstand.adb (Register_Float_Type): Print information about type to
7888 register, if the Debug_Flag_Dot_B is set.
7889 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7890 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7891 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7892 with a requested precision of more than Max_Digits digits and no more
7893 than Max_Base_Digits digits, if a range specification is present and the
7894 Predefined_Float_Types list has a suitable type to derive from.
7895 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7896 case of type completion with pragma Import
7897 * sem_prag.adb
7898 (Process_Import_Predefined_Type): Processing to complete a type
7899 with pragma Import. Currently supports floating point types only.
7900 (Set_Convention_From_Pragma): Do nothing without underlying type.
7901 (Process_Convention): Guard against absence of underlying type,
7902 which may happen when importing incomplete types.
7903 (Process_Import_Or_Interface): Handle case of importing predefined
7904 types. Tweak error message.
7905
f8726f2b
AC
79062011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7907
7908 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7909 functions to previous change. Reorganize code slightly.
7910
79112011-08-02 Geert Bosch <bosch@adacore.com>
7912
7913 * back_end.ads (Register_Type_Proc): New call back procedure type for
7914 allowing the back end to provide information about available types.
7915 (Register_Back_End_Types): New procedure to register back end types.
7916 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7917 available types.
7918 * cstand.adb (Back_End_Float_Types): New list for floating point types
7919 supported by the back end.
7920 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7921 (Copy_Float_Type): New procedure to make new copies of predefined types.
7922 (Register_Float_Type): New call back procedure to populate the BEFT list
7923 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7924 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7925 (Create_Float_Types): New procedure to create entities for floating
7926 point types predefined in Standard, and put these and any remaining
7927 BEFTs on the Predefined_Float_Types list.
7928 * stand.ads (Predefined_Float_Types): New list for predefined floating
7929 point types that do not have declarations in package Standard.
7930
feecad68
AC
79312011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7932
7933 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7934 entity node for the unit containing the parameter.
7935 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7936 (Add_Inlined_Subprogram): Likewise.
7937 * gcc-interface/Make-lang.in: Update dependencies.
7938
79392011-08-02 Thomas Quinot <quinot@adacore.com>
7940
7941 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7942 suitable value.
7943
12f0c50c
AC
79442011-08-02 Geert Bosch <bosch@adacore.com>
7945
7946 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7947
79482011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7949
7950 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7951 computed value of Base_Type.
7952
79532011-08-02 Yannick Moy <moy@adacore.com>
7954
7955 * restrict.adb (Check_Restriction): issue an error for any use of
7956 class-wide, even if the No_Dispatch restriction is not set.
7957 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7958 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7959 when completing a private extension, the type named in the private part
7960 is not the same as that named in the visible part.
7961 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7962 of an inherited primitive operations of a tagged type or type extension
7963 that returns the tagged type.
7964 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7965 function which returns True for an implicit operation inherited by the
7966 derived type declaration for the argument type.
7967 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7968 order.
7969
fb86fe11
ES
79702011-08-02 Ed Schonberg <schonberg@adacore.com>
7971
7972 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7973 Process_Bounds, to perform analysis with expansion of a range or an
7974 expression that is the iteration scheme for a loop.
7975 (Analyze_Iterator_Specification): If domain of iteration is given by a
7976 function call with a controlled result, as is the case if call returns
7977 a predefined container, ensure that finalization actions are properly
7978 generated.
7979 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7980
62be5d0a
JM
79812011-08-02 Javier Miranda <miranda@adacore.com>
7982
7983 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7984 * gcc-interface/Make-lang.in: Update dependencies.
7985
79862011-08-02 Javier Miranda <miranda@adacore.com>
7987
7988 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7989 determine if the analysis is performed using N or Original_Node (N).
7990 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7991 functionality of routine Is_Variable avoids code duplication.
7992 * checks.adb (Determine_Range): Handle temporaries generated by
7993 Remove_Side_Effects.
7994
79952011-08-02 Javier Miranda <miranda@adacore.com>
7996
7997 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7998 expansion of the condition. Required since the previous analysis was
7999 done with expansion disabled (see Resolve_Quantified_Expression) and
8000 hence checks were not inserted and record comparisons have not been
8001 expanded.
8002
a20f4389
AC
80032011-08-02 Ed Falis <falis@adacore.com>
8004
8005 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
8006 Update header.
8007
80082011-08-02 Bob Duff <duff@adacore.com>
8009
8010 * opt.ads: Minor comment fix.
8011
80122011-08-02 Bob Duff <duff@adacore.com>
8013
8014 * sem_ch12.adb (Analyze_Package_Instantiation,
8015 Analyze_Subprogram_Instantiation): Turn off style checking while
8016 analyzing an instance. Whatever style checks that apply to the generic
8017 unit should apply, so it makes no sense to apply them in an instance.
8018 This was causing trouble when compiling an instance of a runtime
8019 unit that violates the -gnatyO switch.
8020 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
8021 one of the two case statements, causing spurious errors.
8022
80232011-08-02 Robert Dewar <dewar@adacore.com>
8024
8025 * uname.adb: Minor reformatting.
8026 * gnatcmd.adb: Minor reformatting.
8027 * exp_attr.adb: Minor reformatting.
8028
90878b12
AC
80292011-08-02 Ed Schonberg <schonberg@adacore.com>
8030
8031 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8032 No_Dispatching_Calls, do not look for the Assign primitive, because
8033 predefined primitives are not created in this case.
8034
80352011-08-02 Bob Duff <duff@adacore.com>
8036
8037 * stylesw.ads: Minor comment fixes.
8038
80392011-08-02 Robert Dewar <dewar@adacore.com>
8040
8041 * freeze.adb (Add_To_Result): New procedure.
8042
80432011-08-02 Jose Ruiz <ruiz@adacore.com>
8044
8045 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8046 time, if the specific run-time routines for handling streams of strings
8047 are not available, use the default mechanism.
8048
80492011-08-02 Arnaud Charlet <charlet@adacore.com>
8050
8051 * s-regpat.ads: Fix typo.
8052
80532011-08-02 Vincent Celier <celier@adacore.com>
8054
8055 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8056 not null, call it to create the in memory config project file without
8057 parsing an existing default config project file.
8058
80592011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8060
8061 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8062
80632011-08-02 Ed Schonberg <schonberg@adacore.com>
8064
8065 * sem_elim.adb: an abstract subprogram does not need an eliminate
8066 pragma for its descendant to be eliminable.
8067
80682011-08-02 Ed Falis <falis@adacore.com>
8069
8070 * init.c: revert to handling before previous checkin for VxWorks
8071 * s-intman-vxworks.adb: delete unnecessary declarations related to
8072 using Ada interrupt facilities for handling signals.
8073 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8074 * s-intman-vxworks.ads: Import __gnat_install_handler as
8075 Initialize_Interrupts.
8076 * s-taprop-vxworks.adb: Delete Signal_Mask.
8077 (Abort_Handler): change construction of mask to unblock exception
8078 signals.
8079
273adcdf
AC
80802011-08-02 Jerome Guitton <guitton@adacore.com>
8081
8082 * a-except-2005.adb (Raise_From_Signal_Handler): Call
8083 Debug_Raise_Exception before propagation starts.
8084
80852011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8086
8087 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8088 to Restriction_Check_Required.
8089 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8090 * sem_res.adb (Resolve_Call): Likewise.
8091 * sem_attr.adb (Check_Stream_Attribute): Likewise.
8092
80932011-08-02 Bob Duff <duff@adacore.com>
8094
8095 * stylesw.ads: Update comment.
8096 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8097 * errout.ads: Remove obsolete comment.
8098
80992011-08-02 Javier Miranda <miranda@adacore.com>
8100
8101 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8102 (Set_Is_Safe_To_Reevaluate): new procedure.
8103 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8104 assignment is allowed on safe-to-reevaluate variables.
8105 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8106 temporary created to remove side effects in expressions that use
8107 the secondary stack as safe-to-reevaluate.
8108 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8109 variables that are not true constants.
8110
6320f5e1
AC
81112011-08-02 Robert Dewar <dewar@adacore.com>
8112
8113 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8114 sem_res.adb, sem_ch6.adb: Minor reformatting.
8115
81162011-08-02 Jerome Guitton <guitton@adacore.com>
8117
8118 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8119
2fe829ae
ES
81202011-08-02 Ed Schonberg <schonberg@adacore.com>
8121
8122 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8123 not set Overridden_Operation if subprogram is an initialization
8124 procedure.
8125
e24329cd
YM
81262011-08-02 Yannick Moy <moy@adacore.com>
8127
8128 * par-ch6.adb: Correct obsolete name in comments
8129 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8130 which takes two message arguments (existing function takes one), with
8131 second message used for continuation.
8132 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8133 block statements that originate from a source block statement, not
8134 generated block statements
8135 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8136 symmetry with procedure case
8137 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8138 function to issue an error in formal mode if a package specification
8139 contains more than one tagged type or type extension.
8140 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8141 parameters matching formals of tagged types are objects (or ancestor
8142 type conversions of objects), not general expressions. Issue an error
8143 on view conversions that are not involving ancestor conversion of an
8144 extended type.
8145 (Resolve_Type_Conversion): in formal mode, issue an error on the
8146 operand of an ancestor type conversion which is not an object
8147 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8148 procedure so that it works also for actuals of function calls
8149 (Is_Actual_Tagged_Parameter): new function which determines if its
8150 argument is an actual parameter of a formal of tagged type in a
8151 subprogram call
8152 (Is_SPARK_Object_Reference): new function which determines if the tree
8153 referenced by its argument represents an object in SPARK
8154
176dadf6
AC
81552011-08-02 Robert Dewar <dewar@adacore.com>
8156
8157 * sem_ch3.adb: Minor reformatting
8158 Minor comment addition
8159 Minor error msg text change
8160
81612011-08-02 Javier Miranda <miranda@adacore.com>
8162
8163 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8164 function. Used to be more precise when we generate a variable plus one
8165 assignment to remove side effects in the evaluation of the Bound
8166 expressions.
8167 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8168 of the bound expression to force its re-analysis and thus expand the
8169 associated transient scope (if required). Code cleanup replacing the
8170 previous code that declared the constant entity by an invocation to
8171 routine Force_Evaluation which centralizes this work in the frontend.
8172
d8b962d8
AC
81732011-08-02 Robert Dewar <dewar@adacore.com>
8174
8175 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8176 (Base_Type): Now uses improved Is_Base_Type function
8177 * einfo.ads (Base_Type): Inline this function
8178
81792011-08-02 Robert Dewar <dewar@adacore.com>
8180
8181 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8182 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8183
81842011-08-02 Arnaud Charlet <charlet@adacore.com>
8185
8186 * gcc-interface/Make-lang.in: Update dependencies.
8187 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8188 targets.
8189
81902011-08-02 Yannick Moy <moy@adacore.com>
8191
8192 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8193 non-simple expression used in delta constraint
8194 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8195 index constraint which is not a subtype mark
8196 * par.adb: With and use Restrict
8197 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8198 mode on component type which is not a subtype mark and default
8199 expression on component
8200 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8201 of string which does not have a lower index bound equal to 1
8202 (Array_Type_Declaration): issue an error in formal mode on index or
8203 component type which is not a subtype mark, and on aliased keyword on
8204 component
8205 (Derived_Type_Declaration): issue an error in formal mode on interface,
8206 limited or abstract type
8207 (Record_Type_Declaration): issue an error in formal mode on interface
8208 (Record_Type_Definition): issue an error in formal mode on tagged types
8209 and type extensions not declared in the specification of a library unit
8210 package; on null non-tagged record; on variant part
8211
82122011-08-02 Vincent Celier <celier@adacore.com>
8213
8214 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8215 not declared for qualified library project when Library_Name is not
8216 declared, but Library_Dir is.
8217
82182011-08-02 Robert Dewar <dewar@adacore.com>
8219
8220 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8221 pragmas (affects aspects [Component_]Default_Value
8222 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8223 component type for the resolution
8224
f96b2d85
AC
82252011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8226
8227 * einfo.adb (Base_Type): Tune implementation for speed.
8228
82292011-08-02 Robert Dewar <dewar@adacore.com>
8230
8231 * freeze.adb: Minor reformatting.
8232
8b3c6430
AC
82332011-08-02 Thomas Quinot <quinot@adacore.com>
8234
8235 * scos.ads: Update comments.
8236
82372011-08-02 Ed Schonberg <schonberg@adacore.com>
8238
8239 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8240 base type, because the parent may be a subtype of a private type whose
8241 convention is established in a private part.
8242
82432011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8244
8245 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8246 statement in a block when the expansion of the return expression has
8247 created a finalization chain.
8248 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8249 with the parent node.
8250 Add N_Extended_Return_Statement to handle the case where a transient
8251 object declaration appears in the Return_Object_Declarations list of
8252 an extended return statement.
8253
82542011-08-02 Matthew Gingell <gingell@adacore.com>
8255
8256 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8257 unused parameter 'name'.
8258
82592011-08-02 Ed Schonberg <schonberg@adacore.com>
8260
8261 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8262 inherited operation, check whether its alias, which is the source
8263 operastion that it renames, has been marked eliminated.
8264
cae81f17
JM
82652011-08-02 Javier Miranda <miranda@adacore.com>
8266
8267 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8268 in-mode parameter whose type is an access type since it can be used to
8269 modify its designated object. Enforce code that handles as safe an
8270 access type that is not access-to-constant but it is the result of a
8271 previous removal of side-effects.
8272 (Remove_Side_Effects): Minor code reorganization of cases which require
8273 no action. Done to incorporate documentation on new cases uncovered
8274 working in this ticket: no action needed if this routine was invoked
8275 too early and the nodes are not yet decorated.
8276 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8277 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8278 were issued with actuals that are implicitly provided by
8279 Force_Evaluation.
8280
218e6dee
RD
82812011-08-02 Robert Dewar <dewar@adacore.com>
8282
8283 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8284
7a489a2b
AC
82852011-08-02 Yannick Moy <moy@adacore.com>
8286
8287 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8288 to issue an error in formal mode on attribute not supported in this mode
8289 (Analyze_Attribute): issue errors on standard attributes not supported
8290 in formal mode.
8291 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8292 comment, and issue error in formal mode on modulus which is not a power
8293 of 2.
8294 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8295 range.
8296 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8297 subtype mark.
8298 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8299 operator on modular type (except 'not').
8300
83012011-08-02 Robert Dewar <dewar@adacore.com>
8302
8303 * gnat_rm.texi: Minor reformatting.
8304
cb7fa356
AC
83052011-08-02 Arnaud Charlet <charlet@adacore.com>
8306
8307 * s-osinte-linux.ads: Minor comment update and reformatting.
8308 * i-cexten.ads: Make this unit pure, as for its parent.
8309 Will allow its usage in more contexts if needed.
8310
83112011-08-02 Robert Dewar <dewar@adacore.com>
8312
8313 * s-utf_32.ads: Minor comment fix.
8314
83152011-08-02 Ed Schonberg <schonberg@adacore.com>
8316
8317 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8318 operation of a tagged synchronized type, handle the case where the
8319 controlling argument is overloaded.
8320
83212011-08-02 Yannick Moy <moy@adacore.com>
8322
8323 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8324 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8325 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8326 SPARK mode and formal verification mode on processing SPARK restriction
8327 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8328 requiring consistency checking.
8329
5cc9353d
RD
83302011-08-02 Robert Dewar <dewar@adacore.com>
8331
8332 * sem_res.adb: Minor reformatting.
8333
e51537ff
RD
83342011-08-02 Robert Dewar <dewar@adacore.com>
8335
8336 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8337 a-cforse.ads: Remove unneeded with of Ada.Containers
8338 Remove commented out pragma Inline's
8339 Move specifications of new subprograms to the actual specs
8340
83fa09c5
AC
83412011-08-02 Yannick Moy <moy@adacore.com>
8342
8343 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8344 a-cforse.ads: Update comments.
8345
83462011-08-02 Ed Schonberg <schonberg@adacore.com>
8347
8348 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8349
d11cfaf8
RD
83502011-08-02 Robert Dewar <dewar@adacore.com>
8351
8352 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8353 a-cforse.ads, a-cofove.ads: Minor reformatting.
8354
300b98bb
AC
83552011-08-02 Claire Dross <dross@adacore.com>
8356
8357 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8358 a-cofove.ads: Add comments.
8359
83602011-08-02 Yannick Moy <moy@adacore.com>
8361
8362 * gnat_rm.texi: Document formal containers.
8363
83642011-08-02 Emmanuel Briot <briot@adacore.com>
8365
8366 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8367 are empty sections.
8368
19fb051c
AC
83692011-08-02 Robert Dewar <dewar@adacore.com>
8370
8371 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8372 reformatting.
8373
83742011-08-02 Robert Dewar <dewar@adacore.com>
8375
8376 * aspects.adb: New aspects Default_Value and Default_Component_Value
8377 New format of Aspect_Names table checks for omitted entries
8378 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8379 handling of boolean aspects for derived types.
8380 New aspects Default_Value and Default_Component_Value
8381 New format of Aspect_Names table checks for omitted entries
8382 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8383 (Has_Default_Value): New flag
8384 (Has_Default_Component_Value): New flag
8385 (Has_Default_Value): New flag
8386 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8387 table.
8388 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8389 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8390 Default_Value and Default_Component_Value
8391 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8392 New aspects Default_Value and Default_Component_Value
8393 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8394 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8395
83962011-08-02 Vincent Celier <celier@adacore.com>
8397
8398 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8399 inherit library kind.
8400
84012011-08-02 Ed Schonberg <schonberg@adacore.com>
8402
8403 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8404 Minor reformatting.
8405
84062011-08-02 Robert Dewar <dewar@adacore.com>
8407
8408 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8409
5f7747af
AC
84102011-08-02 Yannick Moy <moy@adacore.com>
8411
8412 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8413
84142011-08-02 Robert Dewar <dewar@adacore.com>
8415
8416 * impunit.adb: Add comment.
8417
a5fe697b
AC
84182011-08-02 Yannick Moy <moy@adacore.com>
8419
8420 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8421 qualification of aggregates in formal mode
8422 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8423 another aggregate
8424 (Resolve_Aggregate): complete the test that an aggregate is adequately
8425 qualified in formal mode
8426
84272011-08-02 Pascal Obry <obry@adacore.com>
8428
8429 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8430 * mlib-prj.adb: Supress warning when compiling binder generated file.
8431 (Build_Library): Supress all warnings when compiling the binder
8432 generated file.
8433
bd65a2d7 84342011-08-02 Yannick Moy <moy@adacore.com>
d4487611 8435
bd65a2d7
AC
8436 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8437 from here...
8438 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8439 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8440 Add with/use clauses to make Check_Formal_Restriction visible
8441
84422011-08-02 Ed Schonberg <schonberg@adacore.com>
8443
8444 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8445 in-parameters when type of the generic formal is private in the generic
8446 spec and non-private in the body.
8447
84482011-08-02 Claire Dross <dross@adacore.com>
8449
8450 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8451 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8452 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8453 * impunit.adb, Makefile.rtl: Take new files into account.
d4487611
AC
8454
84552011-08-02 Robert Dewar <dewar@adacore.com>
8456
8457 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8458 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8459
bd434b3f
YM
84602011-08-02 Yannick Moy <moy@adacore.com>
8461
8462 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8463 formal mode
8464 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8465 matching static array bounds, taking into account the special case of
8466 string literals
8467 * sem_ch3.adb: Typo in comment.
8468
fe5d3068
YM
84692011-08-02 Yannick Moy <moy@adacore.com>
8470
8471 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8472 which issues an error in formal mode if its argument node is originally
8473 from source
8474 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8475 has a discriminant specification so that it does not include the case
8476 of derived types
8477 (Derived_Type_Declaration): move here the test that a derived type has a
8478 discriminant specification
8479 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8480 first element of a component association before accessing its choices
8481 (presence of component association is not enough)
8482 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8483 declaration is a library item before accessing the next element in a
8484 list, as library items are not member of lists
8485 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8486 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8487 Check_Formal_Restriction whenever possible.
8488
b60a3f26
AC
84892011-08-02 Ed Schonberg <schonberg@adacore.com>
8490
8491 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8492 reference when needed.
8493
84942011-08-02 Bob Duff <duff@adacore.com>
8495
8496 * gnat_ugn.texi: Fix typo.
8497
84982011-08-02 Vincent Celier <celier@adacore.com>
8499
8500 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8501 archive file name. Do not use the full path name of archives for Open
8502 VMS.
8503
eaba57fb
RD
85042011-08-02 Robert Dewar <dewar@adacore.com>
8505
8506 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8507 Analyze_Aspect_Specifications
8508 * sem_ch13.adb
8509 (Analyze_Aspect_Specifications): New handling for boolean aspects
8510 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8511 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8512 sequence for Analyze_Aspect_Specifications
8513 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8514 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8515
85162011-08-02 Robert Dewar <dewar@adacore.com>
8517
8518 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8519 aspects, since these no longer exist.
8520
85212011-08-02 Robert Dewar <dewar@adacore.com>
8522
8523 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8524 semicolon, do not try to see if there are aspects following it.
8525 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8526 aspect spec.
8527
8830d1d2
AC
85282011-08-02 Robert Dewar <dewar@adacore.com>
8529
8530 * sem_ch8.adb, aspects.ads: Minor reformatting.
8531
85322011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8533
8534 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8535 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8536 extracted from...
8537 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8538
7ff2d234
AC
85392011-08-02 Yannick Moy <moy@adacore.com>
8540
8541 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8542 mode on subprogram declaration outside of package specification, unless
8543 it is followed by a pragma Import
8544 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8545 Access_Type_Declaration): issue error in formal mode on access type
8546 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8547 incomplete type
8548 (Analyze_Object_Declaration): issue error in formal mode on object
8549 declaration which does not respect SPARK restrictions
8550 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8551 declaration which does not respect SPARK restrictions
8552 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8553 error in formal mode on digits or delta constraint
8554 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8555 decimal fixed point type
8556 (Derived_Type_Declaration): issue error in formal mode on derived type
8557 other than type extensions of tagged record types
8558 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8559 with check on access definition
8560 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8561 mode on protected definition.
8562 (Analyze_Task_Definition): issue error in formal mode on task definition
8563
85642011-08-02 Robert Dewar <dewar@adacore.com>
8565
8566 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8567
806f6d37
AC
85682011-08-02 Javier Miranda <miranda@adacore.com>
8569
8570 * sem_ch6.adb (Can_Override_Operator): New function.
8571 (Verify_Overriding_Indicator): Add missing code to check overriding
8572 indicator in operators. Fixes regression.
8573 (Check_Overriding_Indicator): Minor reformating after replacing the
8574 code that evaluates if the subprogram can override an operator by
8575 invocations to the above new function.
8576 * einfo.adb
8577 (Write_Field26_Name): Add missing code to ensure that, following
8578 the documentation in einfo.ads, this field is not shown as attribute
8579 "Static_Initialization" on non-dispatching functions.
8580
85812011-08-02 Jose Ruiz <ruiz@adacore.com>
8582
8583 * sem_res.adb (Resolve_Call): A call to
8584 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8585 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8586 i.e., when the second parameter is of type Time_Span.
8587
85882011-08-02 Vincent Celier <celier@adacore.com>
8589
8590 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8591 with an archive instead of -L<library dir> -l<library name>.
8592
85932011-08-02 Ed Schonberg <schonberg@adacore.com>
8594
8595 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8596 mark the base types In_Use in addition to making the operations
8597 use_visible.
8598
85992011-08-02 Ed Falis <falis@adacore.com>
8600
8601 * init.c: add and setup __gnat_signal_mask for the exception signals
8602 * s-inmaop-vxworks.adb: new file.
8603 * s-intman-vxworks.adb: remove unnecessary initializations and
8604 simplify remaining
8605 * s-intman-vxworks.ads: remove unnecessary variable
8606 * s-taprop-vxworks.adb: simplify signal initialization
8607
780d052e
RD
86082011-08-02 Robert Dewar <dewar@adacore.com>
8609
8610 * sem_ch8.adb: Minor code reorganization, comment updates.
8611
86122011-08-02 Robert Dewar <dewar@adacore.com>
8613
8614 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8615 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8616 here from Sem_Res.
8617 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8618 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8619
29efbb8c
ES
86202011-08-02 Ed Schonberg <schonberg@adacore.com>
8621
8622 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8623 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8624 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8625 use_type_clauses, to handle more efficiently use_type and use_all_type
8626 constructs.
8627 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8628 Ada2012 Use_All_Type clause.
8629 (Use_Class_Wide_Operations): new procedure.
8630
b0186f71
AC
86312011-08-02 Robert Dewar <dewar@adacore.com>
8632
8633 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8634 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8635 expression to expression function.
8636
86372011-08-02 Ed Schonberg <schonberg@adacore.com>
8638
8639 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8640 if types are compatible.
8641
86422011-08-02 Yannick Moy <moy@adacore.com>
8643
8644 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8645 returns True if its argument array types have same dimension and same
8646 static bounds at each index.
8647 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8648 OUT or IN OUT paramaters which are not view conversions in SPARK.
8649 (Resolve_Arithmetic_Op): issue an error in formal mode on
8650 multiplication or division with operands of fixed point types which are
8651 not qualified or explicitly converted.
8652 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8653 Boolean or array type (except String) operands.
8654 (Resolve_Equality_Op): issue an error in formal mode on equality
8655 operators for array types other than String with non-matching static
8656 bounds.
8657 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8658 for array types with non-matching static bounds. Factorize the code in
8659 Matching_Static_Array_Bounds.
8660 (Resolve_Qualified_Expression): issue an error in formal mode on
8661 qualified expressions for array types with non-matching static bounds.
8662 (Resolve_Type_Conversion): issue an error in formal mode on type
8663 conversion for array types with non-matching static bounds
8664
767bb4e8
AC
86652011-08-02 Robert Dewar <dewar@adacore.com>
8666
8667 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8668
86692011-08-02 Ed Schonberg <schonberg@adacore.com>
8670
8671 * par-ch9.adb: save location of entry for proper error message.
8672
4ac2477e
JM
86732011-08-02 Javier Miranda <miranda@adacore.com>
8674
8675 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8676 (Use_Full_View) which permits this routine to climb through the
8677 ancestors using the full-view of private parents.
8678 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8679 Use_Full_View to true in calls to Is_Ancestor.
8680 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8681 true in call to Is_Ancestor.
8682 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8683 Use_Full_View to true in call to Is_Ancestor.
8684 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8685 call to Is_Ancestor.
8686 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8687 Use_Full_View to true in calls to Is_Ancestor.
8688 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8689 Make_Select_Specific_Data_Table, Register_Primitive,
8690 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8691 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8692 to true in call to Is_Ancestor.
8693 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8694 Use_Full_View to true in calls to Is_Ancestor.
8695 * exp_cg.adb
8696 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8697 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8698
9f90d123
AC
86992011-08-02 Robert Dewar <dewar@adacore.com>
8700
8701 * gnat_rm.texi: Minor reformatting.
8702 * sem_prag.adb: Minor reformatting.
8703
87042011-08-02 Tristan Gingold <gingold@adacore.com>
8705
8706 * vms_data.ads: Add VMS qualifier for -gnateP.
8707
87082011-08-02 Robert Dewar <dewar@adacore.com>
8709
8710 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8711 * par-ch7.adb (P_Package): Proper placement of aspects for package
8712 decl/instantiation.
8713 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8714 (End_Statements): Add Is_Sloc parameterr
8715 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8716 (Check_End): Ad Is_Sloc parameter
8717 (End_Statements): Add Is_Sloc parameterr
8718
87192011-08-02 Vincent Celier <celier@adacore.com>
8720
8721 * ug_words: Add VMS qualifier equivalent to -gnateP:
8722 /SYMBOL_PREPROCESSING.
8723
87242011-08-02 Jose Ruiz <ruiz@adacore.com>
8725
8726 * gnat-style.texi: For hexadecimal numeric literals the typical
8727 grouping of digits is 4 to represent 2 bytes.
8728 A procedure spec which is split into several lines is indented two
8729 characters.
8730
87312011-08-02 Yannick Moy <moy@adacore.com>
8732
8733 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8734 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8735 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8736 properly qualified
8737 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8738 choice in array aggregate
8739 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8740 mark as ancestor
8741 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8742 positional and named aggregate for record, or others in record
8743 aggregate, or multiple choice in record aggregate
8744 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8745 array operands to logical operations AND, OR and XOR do not have the
8746 same static lower and higher bounds
8747 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8748
2933b16c
RD
87492011-08-01 Robert Dewar <dewar@adacore.com>
8750
8751 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8752 Replaces Last_Source_Node_In_Sequence.
8753 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8754 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8755 parens and blank in string (this was inconsistently implemented).
8756 * errout.ads
8757 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8758 blank in string (this was inconsistently implemented).
8759 * gnat1drv.adb
8760 (Set_Global_Switches): Set formal mode switches appropriately
8761 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8762 * par-prag.adb
8763 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8764 call Set_Error_Msg_Lang to set "spark" as language name.
8765 * par.adb: Remove unnecessary call to set formal language for errout
8766 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8767 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8768 name.
8769 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8770 calls to it, moved after resolution so that types are known
8771 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8772 result of concatenation is not of type String
8773 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8774 concatenation is not properly restricted
8775 * gnat_rm.texi: Add doc on pragma Spark_95.
8776 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8777 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8778 * gcc-interface/Make-lang.in: Update dependencies.
8779
05dbd302
AC
87802011-08-01 Javier Miranda <miranda@adacore.com>
8781
8782 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8783 condition that detects if the overridden operation must replace an
8784 existing entity.
8785
87862011-08-01 Javier Miranda <miranda@adacore.com>
8787
8788 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8789 code declarations inserted by Insert_Actions in each alternative of the
8790 N_Case_Expression node.
8791
87922011-08-01 Robert Dewar <dewar@adacore.com>
8793
8794 * sem_ch6.adb: Minor code reorganization.
8795 * sem_util.adb: Minor reformatting.
8796
af9e051f
PO
87972011-08-01 Pascal Obry <obry@adacore.com>
8798
8799 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8800 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8801
1d801f21
AC
88022011-08-01 Yannick Moy <moy@adacore.com>
8803
8804 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8805 literal or operator symbol which is prefixed
8806 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8807 mode on access attributes.
8808 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8809 that concatenation operands are properly restricted in formal mode
8810 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8811 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8812 result of the concatenation has a type different from String.
8813 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8814 Analyze_Quantified_Expression, Analyze_Slice,
8815 Analyze_Null): issue an error in formal mode on unsupported constructs
8816 * sem_ch5.adb
8817 (Analyze_Block_Statement): only issue error on source block statement
8818 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8819 function which returns the last node in a list of nodes for which
8820 Comes_From_Source returns True, if any
8821 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8822 Last_Source_Node_In_Sequence
8823 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8824 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8825 mode on unsupported constructs
8826 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8827 rest of the actions may be needed later on since the error is marked as
8828 not serious.
8829 * sinfo.ads: Typos in comments.
8830
88312011-08-01 Pascal Obry <obry@adacore.com>
8832
8833 * projects.texi: Minor editing.
8834
53beff22
YM
88352011-08-01 Yannick Moy <moy@adacore.com>
8836
8837 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8838 insertion character ~~
8839 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8840 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8841 with insertion character ~~
8842 (Set_Msg_Text): treat insertion character ~~
8843 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8844 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8845 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8846 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8847 errors related to the formal language restriction not serious
8848 (insertion character |).
8849 * par.adb (Par): set formal language for error messages if needed
8850 * sem_ch6.adb (Check_Missing_Return): take into account possible
8851 generated statements at the end of the function
8852 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8853 enumeration value to define a new pragma SPARK_95
8854 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8855 SPARK_Version): new type and variables to store the SPARK version
8856 (none by default).
8857 (SPARK_Mode): return True when SPARK_Version is set
8858 * par-prag.adb: Correct indentation
8859 (Prag): take Pragma_SPARK_95 into account
8860 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8861 into account.
8862
8d606a78
RD
88632011-08-01 Robert Dewar <dewar@adacore.com>
8864
8865 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8866 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8867 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8868
1982d5a8
PO
88692011-08-01 Pascal Obry <obry@adacore.com>
8870
8871 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8872 Target_Name to Get_Path call.
8873 (Parse_Single_Project): Likewise.
8874 (Post_Parse_Context_Clause): Likewise.
8875 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8876 Call Initialise_Project_Path with the proper Target_Name.
8877 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8878 search path.
8879 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8880 with the proper Target_Name.
8881 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8882 Part.Parse routine.
8883 (Parse_Project_And_Apply_Config): Likewise.
8884 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8885 This is fine as this part of the code is supporting only native
8886 compilation.
8887 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8888 is fine as this part of the code is supporting only native compilation.
8889
0d53d36b
AC
88902011-08-01 Yannick Moy <moy@adacore.com>
8891
8892 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8893 of homonym, unless the homonym is one of the cases allowed in SPARK
8894 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8895 package declaration occurring after a body.
8896
88972011-08-01 Robert Dewar <dewar@adacore.com>
8898
8899 * checks.adb, exp_ch4.adb: Minor reformatting.
8900
89012011-08-01 Javier Miranda <miranda@adacore.com>
8902
8903 * einfo.ads (Access_Disp_Table): Fix documentation.
8904 (Dispatch_Table_Wrappers): Fix documentation.
8905
89062011-08-01 Pascal Obry <obry@adacore.com>
8907
8908 * prj-env.adb, prj-env.ads: Minor reformatting.
8909
8ed68165
AC
89102011-08-01 Yannick Moy <moy@adacore.com>
8911
8912 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8913 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8914 procedures out of these packages.
2c7f9cc0 8915 * errout.ads, errout.adb
8ed68165
AC
8916 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8917 procedures in of this package
8918 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8919 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8920 on misplaced later vs initial declarations, like in Ada 83
8921 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8922 formal mode on attribute of private type whose full type declaration
8923 is not visible
8924 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8925 package declaration inside a package specification
8926 (Analyze_Full_Type_Declaration): issue error in formal mode on
8927 controlled type or discriminant type
8928 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8929 user-defined operator means that it should come from the source
8930 (New_Overloaded_Entity): issue error in formal mode on overloaded
8931 entity.
8932 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8933
89342011-08-01 Thomas Quinot <quinot@adacore.com>
8935
8936 * atree.adb: Minor reformatting.
8937 * checks.adb: Minor reformatting.
8938
4230bdb7
AC
89392011-08-01 Vincent Celier <celier@adacore.com>
8940
8941 * s-parame-vms-ia64.ads: Fix typo in comment
8942 Minor reformatting
8943 * s-parame-vms-restrict.ads: Removed, unused.
8944
89452011-08-01 Javier Miranda <miranda@adacore.com>
8946
8947 * exp_ch3.adb
8948 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8949 * sem_ch3.adb
8950 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8951 * sem_ch3.ads, sem_ch3.adb
8952 (Is_Constant_Bound): New extended version of the subprogram that was
8953 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8954 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8955 * sem_aux.ads (Constant_Value): Fix typo in comment.
8956 * checks.adb (Generate_Index_Checks): New implementation which, for
8957 array objects with constant bounds, generates the runtime check
8958 referencing the bounds of the array type. For other cases this routine
8959 provides its previous behavior obtaining such values from the array
8960 object.
8961 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8962 parent type.
8963 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8964 we cannot have semantic interpretations of the new node.
8965
2010d078
AC
89662011-08-01 Ed Schonberg <schonberg@adacore.com>
8967
8968 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8969 expressions.
8970
89712011-08-01 Arnaud Charlet <charlet@adacore.com>
8972
8973 * sem_ch8.adb: Minor code editing.
8974 * s-vxwext.adb: Remove trailing space.
8975 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8976 consistency with other files.
8977
89782011-08-01 Thomas Quinot <quinot@adacore.com>
8979
8980 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8981
89822011-08-01 Ed Schonberg <schonberg@adacore.com>
8983
8984 * par-ch10.adb: reject parameterized expressions as compilation unit.
8985 * sem_ch4.adb: handle properly conditional expression with overloaded
8986 then_clause and no else_clause.
8987
89882011-08-01 Tristan Gingold <gingold@adacore.com>
8989
8990 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8991 like done by System.Aux_DEC.
8992 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8993
daec8eeb
YM
89942011-08-01 Yannick Moy <moy@adacore.com>
8995
8996 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8997 missing label at end of declaration (subprogram or package)
8998 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8999 of positional and named parameter association
9000 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
9001 Error_Msg_SP which adds a prefix to the error message giving the name
9002 of the formal language analyzed
9003 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
9004 access result type in subprogram, unconstrained array as result type,.
9005 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
9006 procedure
9007 * sem_ch8.adb: Code clean up.
9008
38171f43
AC
90092011-08-01 Javier Miranda <miranda@adacore.com>
9010
9011 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
9012 * einfo.ads (Access_Disp_Table): Fix documentation.
9013 (Dispatch_Table_Wrappers): Fix documentation.
9014 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
9015 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
9016 to enforce the documentation of this attribute.
9017 (Set_Is_Interface): Cleanup the assertion.
9018 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
9019 the Underlying_Type entity before reading attribute Access_Disp_Table.
9020 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
9021 Locate the Underlying_Type before reading attribute Access_Disp_Table.
9022 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9023 the Underlying_Type entity before reading attribute Access_Disp_Table.
9024 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9025 Locate the Underlying_Type entity before reading attribute
9026 Access_Disp_Table.
9027
90282011-08-01 Ed Schonberg <schonberg@adacore.com>
9029
9030 * s-poosiz.ads: Additional overriding indicators.
9031
90322011-08-01 Yannick Moy <moy@adacore.com>
9033
9034 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9035 formal mode.
9036 (Analyze_Iteration_Scheme): issue error in formal mode when loop
9037 parameter specification does not include a subtype mark.
9038 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9039 formal mode on abstract subprogram.
9040 (Analyze_Subprogram_Specification): issue error in formal mode on
9041 user-defined operator.
9042 (Process_Formals): issue error in formal mode on access parameter and
9043 default expression.
9044 * sem_ch9.adb (Analyze_Abort_Statement,
9045 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9046 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9047 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9048 Analyze_Requeue, Analyze_Selective_Accept,
9049 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9050 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9051 issue error in formal mode on user-defined raise statement.
9052
1f250383
AC
90532011-08-01 Thomas Quinot <quinot@adacore.com>
9054
9055 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9056 declaration being hidden when overriding an implicit inherited
9057 subprogram.
9058 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9059 (-gnats), do not complain about a source file that contains only a
9060 pragma No_Body.
9061
90622011-08-01 Ed Schonberg <schonberg@adacore.com>
9063
9064 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9065 variable if already set.
9066
607d0635
AC
90672011-08-01 Arnaud Charlet <charlet@adacore.com>
9068
9069 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9070 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9071 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9072 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9073 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9074 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9075 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9076 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9077 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9078 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9079 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9080 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9081 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9082 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9083 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9084 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9085 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9086 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9087 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9088 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9089 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9090 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9091 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9092 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9093 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9094 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9095 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9096 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9097 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9098 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9099 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9100 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9101 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9102 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9103 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9104 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9105 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9106 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9107 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9108 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9109 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9110 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9111 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9112 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9113 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9114 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9115 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9116 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9117 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9118 Use GNAT instead of GNARL.
9119
91202011-08-01 Bob Duff <duff@adacore.com>
9121
9122 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9123 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9124 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9125 reformatting.
9126
91272011-08-01 Yannick Moy <moy@adacore.com>
9128
9129 * debug.adb (d.D) reverve flag for the SPARK mode
9130 (d.E) reverve flag for SPARK generation mode
9131 (d.F) reverve flag for Why generation mode
2c7f9cc0 9132 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
607d0635
AC
9133 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9134 functions which return True when the corresponding modes are set
9135 (Formal_Language): return "spark" or "alfa" when in formal verification
9136 mode.
9137 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9138 Error_Msg to prefix the error message with a tag giving the formal
9139 language
9140 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9141 message with a tag giving the formal language
9142 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9143 block statement
9144 (Analyze_Case_Statement): issue error in formal mode on case statement
9145 with a single "others" case alternative
9146 (Analyze_Exit_Statement): issue errors in formal mode on exit
9147 statements which do not respect SPARK restrictions
9148 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9149 (Check_Unreachable_Code): always issue an error (not a warning) in
9150 formal mode on unreachable code (concerns both code after an infinite
9151 loop and after an unconditional jump, both not allowed in SPARK)
9152 * sem_ch6.adb (Analyze_Return_Statement): add call to
9153 Set_Return_Present for a procedure containing a return statement
9154 (already done for functions in Analyze_Function_Return)
9155 (Analyze_Function_Return): issue error in formal mode on extended
9156 return or if return is not last statement in function
9157 (Check_Missing_Return): issue error in formal mode if function does
9158 not end with return or if procedure contains a return
9159 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9160 function to detect if there is an inner scope of its parameter S which
9161 is a loop.
9162
91632011-08-01 Thomas Quinot <quinot@adacore.com>
9164
9165 * sem_ch6.ads: Minor reformatting.
9166
d8b3ccb9
AC
91672011-08-01 Javier Miranda <miranda@adacore.com>
9168
9169 * sem_util.adb (Abstract_Interface_List): Complete condition when
9170 processing private type declarations to avoid reading unavailable
9171 attribute.
9172 (Is_Synchronized_Tagged_Type): Complete condition when processing
9173 private extension declaration nodes to avoid reading unavailable
9174 attribute.
9175
91762011-08-01 Thomas Quinot <quinot@adacore.com>
9177
9178 * sem_ch3.adb: Minor reformatting.
9179
91802011-08-01 Thomas Quinot <quinot@adacore.com>
9181
9182 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9183 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9184 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9185 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9186 for VMS, instead parametrize the common implementation with
9187 System.Parameters declarations.
9188
0bb9276c
AC
91892011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9190
9191 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9192
91932011-08-01 Tristan Gingold <gingold@adacore.com>
9194
9195 * seh_init.c: Fix SEH handler installation on win64.
9196
91972011-08-01 Ed Schonberg <schonberg@adacore.com>
9198
9199 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9200 double analysis of an anonymous access to subprogram, because it can
9201 lead to improper sharing of profiles and a back-end crash.
9202
6a2e4f0b
AC
92032011-08-01 Robert Dewar <dewar@adacore.com>
9204
9205 * make.adb, sem_ch4.adb: Minor reformatting.
9206 * gcc-interface/Make-lang.in: Update dependencies.
9207 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9208
92092011-08-01 Arnaud Charlet <charlet@adacore.com>
9210
9211 * gnat_rm.texi: Fix definition of Long_Integer.
9212
92132011-08-01 Ed Schonberg <schonberg@adacore.com>
9214
9215 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9216 to prevent storage exhaustion.
9217 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9218 finalized is a function body, insert the cleanup code before the final
9219 return statement, to prevent spurious warnings.
9220 * s-pooglo.ads: add overriding indicator.
9221
4561baf7
ES
92222011-08-01 Ed Schonberg <schonberg@adacore.com>
9223
9224 * sem_ch4.adb (Operator_Check): improve error message when both a
9225 with_clause and a use_clause are needed to make operator usage legal.
9226 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9227 determine whether a compilation unit is visible within an other,
9228 either through a with_clause in the current unit, or a with_clause in
9229 its library unit or one one of its parents.
9230
383e179e
AC
92312011-08-01 Ed Schonberg <schonberg@adacore.com>
9232
9233 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9234 over an arbitrary expression of an array or container type.
9235 * lib-xref.adb: clarify comment.
9236
92372011-08-01 Bob Duff <duff@adacore.com>
9238
9239 * einfo.ads: Minor reformatting.
9240 * debug.adb: Minor comment improvement.
9241
92422011-08-01 Javier Miranda <miranda@adacore.com>
9243
9244 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9245 consider hidden subprograms as valid candidates.
9246
92472011-08-01 Arnaud Charlet <charlet@adacore.com>
9248
9249 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9250
92512011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9252
9253 * gnat_ugn.texi: Fix typo.
9254
61c161b2
AC
92552011-08-01 Robert Dewar <dewar@adacore.com>
9256
9257 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9258 lib-xref.adb: Minor reformatting
9259
92602011-08-01 Gary Dismukes <dismukes@adacore.com>
9261
9262 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9263 when to generate a call to Move_Final_List.
9264 (Has_Controlled_Parts): Remove this function.
9265
84df40f7
AC
92662011-08-01 Geert Bosch <bosch@adacore.com>
9267
9268 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9269 "," in choice list.
9270
92712011-08-01 Thomas Quinot <quinot@adacore.com>
9272
9273 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9274 explicit raise of a predefined exception as Comes_From_Source if the
9275 original N_Raise_Statement comes from source.
9276
92772011-08-01 Robert Dewar <dewar@adacore.com>
9278
9279 * sinfo.ads: Add comment.
9280 * sem_ch6.adb: Minor reformatting.
9281
92822011-08-01 Robert Dewar <dewar@adacore.com>
9283
9284 * freeze.adb (Freeze_Entity): Refine check for bad component size
9285 clause to avoid rejecting confirming clause when atomic/aliased present.
9286
92872011-08-01 Ed Schonberg <schonberg@adacore.com>
9288
9289 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9290 better determine whether an entity reference is a write.
9291 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9292 subcomponent.
9293 * lib-xref.adb (Output_References): Do no suppress a read reference at
9294 the same location as an immediately preceeding modify-reference, to
9295 handle properly in-out actuals.
9296
92972011-08-01 Tristan Gingold <gingold@adacore.com>
9298
9299 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9300
93012011-08-01 Quentin Ochem <ochem@adacore.com>
9302
9303 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9304 heap to compute the result.
9305
c7f0d2c0
AC
93062011-08-01 Robert Dewar <dewar@adacore.com>
9307
9308 * atree.ads: Minor reformatting.
9309
93102011-08-01 Emmanuel Briot <briot@adacore.com>
9311
9312 * g-expect.adb (Get_Command_Output): Fix memory leak.
9313
93142011-08-01 Geert Bosch <bosch@adacore.com>
9315
9316 * cstand.adb (P_Float_Type): New procedure to print the definition of
9317 predefined fpt types.
9318 (P_Mixed_Name): New procedure to print a name using mixed case
9319 (Print_Standard): Use P_Float_Type for printing floating point types
9320 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9321 precision IEEE float.
9322
93232011-08-01 Thomas Quinot <quinot@adacore.com>
9324
9325 * sem_ch3.adb: Minor reformatting.
9326
93272011-08-01 Ed Schonberg <schonberg@adacore.com>
9328
9329 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9330 the completion of a generic function, insert the new body rather than
9331 rewriting the original.
9332
93332011-08-01 Yannick Moy <moy@adacore.com>
9334
9335 * sinfo.ads, errout.ads: Typos in comments.
9336
1c54829e
AC
93372011-08-01 Robert Dewar <dewar@adacore.com>
9338
9339 * par-endh.adb: Minor reformatting.
9340
93412011-08-01 Robert Dewar <dewar@adacore.com>
9342
9343 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9344 (Pre_Post_Aspects): New subtype.
9345 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9346 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9347 * par-ch7.adb (P_Package): Remove Decl parameter
9348 (P_Package): Handle new syntax for aspects (before IS)
9349 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9350 new aspect syntax
9351 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9352 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9353 (P_Package): Remove Decl parameter
9354 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9355 aspects
9356 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9357 specs
9358 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9359 * sinfo.ads: Document new syntax for aspects in packages etc.
9360 * sprint.adb: Handle new syntax of aspects before IS in package
9361
93622011-08-01 Thomas Quinot <quinot@adacore.com>
9363
9364 * atree.ads: Minor reformatting.
9365 * sem_prag.adb: Minor reformatting.
9366
93672011-08-01 Robert Dewar <dewar@adacore.com>
9368
9369 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9370 case expr alternative.
9371
93722011-08-01 Ed Schonberg <schonberg@adacore.com>
9373
9374 * sem_ch12.adb: Fix typo.
9375
9eea4346
GB
93762011-08-01 Geert Bosch <bosch@adacore.com>
9377
9378 * sem_prag.adb (Check_No_Link_Name): New procedure.
9379 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9380 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9381 instead of Standard_Long_Long_Float_Size global. Preparation for
9382 eventual removal of per type constants.
9383 * exp_util.ads (Get_Stream_Size): New function returning the stream
9384 size value of subtype E.
9385 * exp_util.adb (Get_Stream_Size): Implement new function.
9386 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9387 function.
9388 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9389 * einfo.adb:
9390 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9391
3d6c3bd7
GB
93922011-08-01 Geert Bosch <bosch@adacore.com>
9393
9394 * cstand.adb: Fix comments.
9395 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9396 count of arguments.
9397
e7d897b8
AC
93982011-08-01 Robert Dewar <dewar@adacore.com>
9399
9400 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9401
94022011-08-01 Geert Bosch <bosch@adacore.com>
9403
9404 * atree.ads: Fix comment.
9405
c228a069
AC
94062011-08-01 Robert Dewar <dewar@adacore.com>
9407
9408 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9409 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9410 * par.adb: Add with for Namet.Sp.
9411 * par-tchk.adb: Minor reformatting.
9412
94132011-08-01 Vincent Celier <celier@adacore.com>
9414
9415 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9416 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9417 of the init procedure of a SAL.
9418 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9419 New procedure.
9420
94212011-08-01 Thomas Quinot <quinot@adacore.com>
9422
9423 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9424 reformatting.
9425
94262011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9427
9428 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9429
94302011-08-01 Thomas Quinot <quinot@adacore.com>
9431
9432 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9433 conformant with its spec (return True only for types that have
9434 an overriding Initialize primitive operation that prevents them from
9435 having preelaborable initialization).
9436 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9437 initialization for controlled types in Ada 2005 or later mode.
9438
857ade1b
RD
94392011-08-01 Robert Dewar <dewar@adacore.com>
9440
9441 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9442 Postcondition.
9443 (Same_Aspect): New function.
9444 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9445 Type_Invariant, Precondition, Postcondition.
9446 * snames.ads-tmpl: Add Name_Type_Invariant.
9447
bd949ee2
RD
94482011-08-01 Robert Dewar <dewar@adacore.com>
9449
9450 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9451 here.
9452 (Freeze_All_Ent): Fix error in handling inherited aspects.
9453 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9454 already analyzed, but don't skip entire processing of a declaration,
9455 that's wrong in some cases of declarations being rewritten.
9456 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9457 Don't delay for integer, string literals
9458 Treat predicates in usual manner for delay, remove special case code,
9459 not needed.
9460 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9461 (Build_Predicate_Function): Update saved expression in aspect
9462 (Build_Invariant_Procedure): Update saved expression in aspect
9463 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9464 of replacement of discriminant references if the reference is simple.
9465
f1c952af
RD
94662011-08-01 Robert Dewar <dewar@adacore.com>
9467
9468 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9469 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9470 Static_Predicate and Dynamic_Predicate.
9471 (Build_Predicate_Function): Add processing for Static_Predicate
9472 and Dynamic_Predicate.
9473 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9474 (From_Static_Predicate): New flag
9475 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9476
94772011-08-01 Robert Dewar <dewar@adacore.com>
9478
9479 * usage.adb: Documentation cleanup for Ada version modes in usage.
9480 * expander.adb: Minor reformatting.
9481
47e11d08
AC
94822011-08-01 Robert Dewar <dewar@adacore.com>
9483
9484 * atree.ads: Minor comment fix.
9485 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9486 a-witeio.ads, sem_prag.adb: Minor reformatting.
9487
94882011-08-01 Doug Rupp <rupp@adacore.com>
9489
9490 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9491 pointers. Use descrip.h header file for convenience. Add some
9492 comments.
9493
94942011-08-01 Robert Dewar <dewar@adacore.com>
9495
9496 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9497 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9498 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9499 New procedure.
9500 (Check_Aspect_At_End_Of_Declarations): New procedure
9501 (Analye_Aspect_Specification): Minor changes for above procedures
9502 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9503 specification node as well.
9504
95052011-08-01 Pascal Obry <obry@adacore.com>
9506
9507 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9508 Windows files. Use GetFilesAttributes() in this case to check for file
9509 existence instead of returning with an error code.
9510
a3a16b21
VC
95112011-08-01 Vincent Celier <celier@adacore.com>
9512
9513 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9514 High is above Source length.
9515
ff58cc69
RD
95162011-08-01 Robert Dewar <dewar@adacore.com>
9517
9518 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9519
6bb88533
AC
95202011-08-01 Robert Dewar <dewar@adacore.com>
9521
9522 * aspects.ads (Boolean_Aspects): New subtype.
9523 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9524 for derived types in cases where the parent type and derived type have
9525 aspects.
9526 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9527 with aspects when parent type also has aspects.
9528 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9529 boolean expression at this point).
9530 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9531 accordance with final decision on the Ada 2012 feature.
9532 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9533
95342011-08-01 Matthew Heaney <heaney@adacore.com>
9535
9536 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9537
060a3f28
AC
95382011-08-01 Pascal Obry <obry@adacore.com>
9539
9540 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9541 Fix Replace_Slice when High is above current string size.
9542 (Replace_Slice): Fix DL computation when High is above current
9543 string length.
9544
95452011-08-01 Gary Dismukes <dismukes@adacore.com>
9546
9547 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9548
e7f567a3
AC
95492011-08-01 Matthew Heaney <heaney@adacore.com>
9550
9551 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9552 of node.
9553
95542011-08-01 Pascal Obry <obry@adacore.com>
9555
9556 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9557 reformatting.
9558
1a265e78
AC
95592011-08-01 Ed Schonberg <schonberg@adacore.com>
9560
9561 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9562 access to protected subprograms in generic bodies.
9563 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9564 protected type, indicate that the convention of the subprogram is
9565 Convention_Protected, because it may be used in subsequent declarations
9566 within the protected declaration.
9567
95682011-08-01 Vincent Celier <celier@adacore.com>
9569
9570 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9571 and "final" procedures when the name of the library is "ada", to avoid
9572 duplicate symbols "adainit" and "adafinal" in executables.
9573
67e28ef8
ES
95742011-08-01 Ed Schonberg <schonberg@adacore.com>
9575
9576 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9577 quantified expression that appears within a postcondition and uses the
9578 Ada2012 'Result attribute.
9579
6da2ca7d
RO
95802011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9581
9582 * init.c (__gnat_error_handler): Cast reason to int.
9583 (__gnat_install_handler): Explain sa_sigaction use.
9584
7d5997c6
EB
95852011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9586
9587 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9588 subprogram has copy-in copy-out parameters, try to promote the mode of
9589 the return type if it is passed in registers.
9590
4b4cfdd5
EB
95912011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9592
9593 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9594 left operand as addressable.
9595
f3d34576
EB
95962011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9597
9598 * gcc-interface/gigi.h (build_function_stub): Remove.
9599 (build_return_expr): Likewise.
9600 (convert_vms_descriptor): Declare.
9601 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9602 (build_function_stub): Move to...
9603 * gcc-interface/utils2.c (build_return_expr): Move to...
9604 * gcc-interface/trans.c (build_function_stub): ...here.
9605 (build_return_expr): ...here.
9606 (Subprogram_Body_to_gnu): Add local variable for language_function.
9607 Disconnect the parameter attributes cache, if any, once done with it.
9608 Call end_subprog_body only after setting the end_locus.
9609 Build the stub associated with the function, if any, at the very end.
9610 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9611 variables and streamline control flow.
9612
0a6ecc08
AC
96132011-07-23 Arnaud Charlet <charlet@adacore.com>
9614
9615 PR ada/49819
9616 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9617 g-trasym-dwarf.adb.
9618
5b6d595b
RO
96192011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9620
9621 PR bootstrap/49794
9622 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9623 Assign to act.sa_sigaction.
9624 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9625 current->return_address to char * before arithmetic.
9626
94017021
RO
96272011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9628
9629 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9630 Correct argument types.
9631 Extract code from reason.
9632 (__gnat_install_handler): Assign to act.sa_sigaction.
9633
52fd02bb
EB
96342011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9635
9636 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9637 (GNAT1_OBJS): ...here.
9638
f39a9ca2
EB
96392011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9640
9641 PR ada/48711
9642 * g-socthi-mingw.adb (Fill): Fix formatting.
9643
9e36aa23
EB
9644 * gcc-interface/gigi.h: Move around comment.
9645
e3aca522
JDA
96462011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9647
9648 PR ada/46350
9649 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9650
696b1960
FW
96512011-07-14 Florian Weimer <fw@deneb.enyo.de>
9652
9653 PR ada/48711
9654 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9655
f542c405
EB
96562011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9657
9658 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9659 range comparison if Pmode is SImode.
9660
9e9bd455
LG
96612011-07-12 Laurent GUERBY <laurent@guerby.net>
9662 Eric Botcazou <ebotcazou@adacore.com>
9663
9664 * adadecode.c: Wrap up in extern "C" block.
9665 * adadecode.h: Likewise.
9666 * adaint.c: Likewise. Remove 'const' keyword.
9667 * adaint.h: Likewise.
9668 * argv.c: Likewise.
9669 * atree.h: Likewise.
9670 * cio.c: Likewise.
9671 * cstreams.c: Likewise.
9672 * env.c: Likewise.
9673 * exit.c: Likewise.
9674 * fe.h: Likewise.
9675 * final.c: Likewise.
9676 * init.c: Likewise.
9677 * initialize.c: Likewise.
9678 * link.c: Likewise.
9679 * namet.h: Likewise.
9680 * nlists.h: Likewise.
9681 * raise.c: Likewise.
9682 * raise.h: Likewise.
9683 * repinfo.h: Likewise.
9684 * seh_init.c: Likewise.
9685 * targext.c: Likewise.
9686 * tracebak.c: Likewise.
9687 * uintp.h: Likewise.
9688 * urealp.h: Likewise.
9689 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9690 * xsinfo.adb: Likewise.
9691 * xsnamest.adb: Likewise.
9692 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9693 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9694 * gcc-interface/misc.c: Likewise.
9695 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9696 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9697 ada/targext.o here...
9698 (GNAT_ADA_OBJS): ...and not here.
9699 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9700 (GNATBIND_OBJS): Reorder.
9701
7644b3c7
RH
97022011-07-07 Richard Henderson <rth@redhat.com>
9703
9704 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9705 dwarf2out_frame_init.
9706
8384ac41
EB
97072011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9708
9709 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9710
fbdd5d87
RO
97112011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9712
9713 PR target/39150
9714 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9715
1a072294
RG
97162011-07-06 Richard Guenther <rguenther@suse.de>
9717
8384ac41
EB
9718 * gcc-interface/misc.c (gnat_init): Merge calls to
9719 build_common_tree_nodes and build_common_tree_nodes_2.
1a072294
RG
9720 Re-initialize boolean_false_node.
9721
bc712852
EB
97222011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9723 Olivier Hainque <hainque@adacore.com>
9724 Nicolas Setton <setton@adacore.com>
9725
9726 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9727 the type according to the ARTIFICIAL_P parameter.
9728 (create_type_decl): Likewise.
9729 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9730
2eb22389
EB
97312011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9732
9733 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9734 (gnatbind): Likewise.
9735
4bdaaf2f
RO
97362011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9737
9738 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9739
c020c92b
EB
97402011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9741
9742 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9743 local variable throughout. Remove useless call to Base_Type.
9744 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9745 Take it also into account for the volatileness of the field. Set the
9746 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9747
96769d32
EB
97482011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9749
9750 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9751 on a dereference built for a by-ref object if it has an address clause.
9752
7e4680c1
EB
97532011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9754
9755 * einfo.ads (Address_Taken): Document use for the second argument of
9756 Asm_Input and Asm_Output attributes.
9757 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9758 argument is an entity name, then set Address_Taken on it.
9759 <Attribute_Asm_Output>: Likewise.
9760 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9761 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9762 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9763 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9764
97652011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
d5cc9181
JR
9766
9767 PR middle-end/46500
9768 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9769
677f3fa8
JM
97702011-06-14 Joseph Myers <joseph@codesourcery.com>
9771
9772 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9773 (ada/utils.o): Update dependencies.
9774 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9775 ../../../libcpp/libcpp.a.
9776 * gcc-interface/utils.c: Include common/common-target.h.
9777 (process_attributes): Use targetm_common.have_named_sections.
9778
009db074
RG
97792011-06-07 Richard Guenther <rguenther@suse.de>
9780
0bad0e23
EB
9781 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9782 set_sizetype.
009db074 9783
3bfc61cf
EB
97842011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9785
0bad0e23 9786 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
3bfc61cf
EB
9787 TREE_THIS_NOTRAP flag.
9788
5c4a1c7b
EB
97892011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9790
9791 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9792 Fix thinko.
9793
e9f57686
EB
97942011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9795
9796 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9797 constants whose full view has discriminants specially.
9798
10e4d056
EB
97992011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9800
9801 * gcc-interface/utils.c: Include diagnostic.h.
9802 (gnat_write_global_declarations): Output debug information for all
9803 global type declarations before finalizing the compilation unit.
9804 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9805
0957c029
JJ
98062011-05-25 Jakub Jelinek <jakub@redhat.com>
9807
9808 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9809
52d0a7ac
KT
98102011-05-25 Kai Tietz <ktietz@redhat.com>
9811
9812 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9813 initialization instead of const/none-const pointer assignment.
9814
1ed1641d
JM
98152011-05-24 Joseph Myers <joseph@codesourcery.com>
9816
9817 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9818 $(EXTRA_GNAT1_OBJS).
9819 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9820 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9821 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9822 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9823 libcommon-target.a instead of prefix.o.
9824
9fe72ebd
JM
98252011-05-21 Joseph Myers <joseph@codesourcery.com>
9826
9827 PR ada/49097
0bad0e23 9828 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9fe72ebd 9829
2691e6d7
JM
98302011-05-20 Joseph Myers <joseph@codesourcery.com>
9831
0bad0e23
EB
9832 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9833 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9834 instead of version.o.
2691e6d7 9835
bf6490b5
KT
98362011-05-18 Kai Tietz <ktietz@redhat.com>
9837
9838 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9839 boolean_false_node instead of integer_zero_node.
9840 (convert_with_check): Likewise.
9841 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9842
7bf9a5ac
EB
98432011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9844
9845 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9846 type of the parameter is an unconstrained array, convert the actual to
9847 the type of the formal in the In Out and Out cases as well.
9848
e5b00edf
NF
98492011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9850
9851 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9852 call build_function_type_array or build_varargs_function_type_array
9853 instead.
9854 (create_subprog_type): Don't call build_function_type; call
9855 build_function_type_vec instead.
9856
51545682
NF
98572011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9858
9859 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9860 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9861 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9862
c99c0026
EB
98632011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9864
f620bd21
EB
9865 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9866
c99c0026
EB
9867 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9868 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9869
3d528853
NF
98702011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9871
c99c0026 9872 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
3d528853 9873
d7d058c5
NF
98742011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9875
9876 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9877 instead of accessing TYPE_ARG_TYPES directly.
9878 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9879
805e60a0
EB
98802011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9881
9882 PR ada/48844
9883 * gcc-interface/gigi.h (get_variant_part): Declare.
9884 * gcc-interface/decl.c (get_variant_part): Make global.
9885 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9886 types have the same constant size, are record types and T1 has a
9887 variant part while T2 doesn't.
9888
907a08d9
EB
98892011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9890
9891 * gcc-interface/utils.c (begin_subprog_body): Do not call
9892 get_pending_sizes.
9893 (end_subprog_body): Likewise.
9894
d35936ab
RG
98952011-05-04 Richard Guenther <rguenther@suse.de>
9896
9897 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9898 int_const_binop.
9899 (pos_to_constructor): Likewise.
9900
c1fd8753 99012011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 9902 Eric Botcazou <ebotcazou@adacore.com>
c1fd8753
NF
9903
9904 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9905 of build_function_type. Adjust calls to...
9906 (build_raise_check): ...this. Do not take a void_tree parameter.
9907 Call build_function_type_list instead of build_function_type.
9908 Fix head comment and swap couple of conditional blocks.
9909
4fb87d2b
EB
99102011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9911
9912 * gnatvsn.ads (Library_Version): Bump to 4.7.
9913 (Current_Year): Bump to 2011.
9914
fa5e5a76
MM
99152011-04-29 Michael Matz <matz@suse.de>
9916
9917 * gcc-interface/misc.c (gnat_handle_option): Set
9918 warn_maybe_uninitialized.
9919
8d6a2f69
GP
99202011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9921
9922 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9923 the Watson/McCabe paper.
9924
770937fd
JM
99252011-04-23 Jim Meyering <meyering@redhat.com>
9926
9927 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9928
eb601ae1
EB
99292011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9930
9931 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9932 onto the new type.
9933
7d7fcb08
EB
99342011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9935
9936 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9937 parameter.
9938 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9939 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9940 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9941 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9942 <all>: Do not set flags on the reused DECL node coming from an alias.
9943 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9944 don't need debug info here...
9945 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9946 (gigi): Adjust calls to create_subprog_decl.
9947 (build_raise_check): Likewise.
9948 (establish_gnat_vms_condition_handler): Likewise.
9949 (Compilation_Unit_to_gnu): Likewise.
9950 (gnat_to_gnu): Likewise.
9951
e1876cac
EB
99522011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9953
9954 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9955 (NO_REORDER_ADAFLAGS): New variable.
9956 (EXTRA_GNATTOOLS): Always define.
9957 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9958 Clean up and adjust list of files compiled with special options.
9959 * gcc-interface/Make-lang.in: Likewise.
9960 (ada/decl.o): Cosmetical change.
9961 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9962
04695783
JM
99632011-04-20 Jim Meyering <meyering@redhat.com>
9964
9965 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9966
23399579
EB
99672011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9968
9969 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9970 $(CFLAGS) on the link line.
9971
51c5169c
EB
99722011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9973
9974 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9975 padded type built for the return type if it is unconstrained.
9976
61e46a7d
NF
99772011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9978
9979 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9980
81f653d6
NF
99812011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9982
b4867846
EB
9983 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9984 before calling TREE_CHAIN.
81f653d6
NF
9985 * gcc-interface/misc.c (gnat_init_ts): New function.
9986 (LANG_HOOKS_INIT_TS): Define.
9987
a358e188
MJ
99882011-04-12 Martin Jambor <mjambor@suse.cz>
9989
b4867846
EB
9990 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9991 instead of cgraph_node.
a358e188 9992
29b1c5a4
EB
99932011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9994
9995 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9996 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9997 mechanism.
9998
88872b00
EB
99992011-04-08 Eric Botcazou <ebotcazou@adacore.com>
10000
10001 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
10002 of aggregate types that contain a placeholder.
10003
dcf0c47e
NF
100042011-04-08 Nathan Froyd <froydnj@codesourcery.com>
10005
10006 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
b4867846 10007 TYPE_ARG_TYPES.
dcf0c47e
NF
10008 (handle_type_generic_attribute): Likewise.
10009
53e3000c
EB
100102011-04-04 Eric Botcazou <ebotcazou@adacore.com>
10011
10012 PR ada/47163
10013 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
10014
ab380bb4
KT
100152011-04-04 Kai Tietz <ktietz@redhat.com>
10016
10017 PR ada/47163
0bad0e23
EB
10018 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
10019 to flag value.
ab380bb4 10020
8ffac116
EB
100212011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10022
10023 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10024 type case, do not strip a padding type around the array type.
10025
de9528f0
EB
100262011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10027
10028 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10029 types.
10030
d9d7a26c
EB
100312011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10032
10033 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10034 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
de9528f0 10035 code for -feliminate-unused-debug-types.
d9d7a26c
EB
10036 (gnat_post_options): Likewise.
10037
4cb12a90
EB
100382011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10039
10040 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10041 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10042 distinct copy.
10043
acccc61c
EB
100442011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10045
10046 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10047 DECL_ARTIFICIAL flag on enumeration types.
10048
583eb0c9
EB
100492011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10050
10051 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10052 fat pointer types artificial unconditionally.
10053 <E_Array_Subtype>: Attach the base array type as a parallel type if it
10054 isn't artificial.
10055
e3edbd56
EB
100562011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10057
10058 * gcc-interface/gigi.h (get_dummy_type): Declare.
10059 (build_dummy_unc_pointer_types): Likewise.
10060 (finish_fat_pointer_type): Likewise.
10061 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10062 fat pointer type has been built, complete it in place.
10063 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10064 and thin pointers. Remove useless variable.
10065 (finish_fat_pointer_type): Make global and move to...
10066 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10067 (get_dummy_type): New function.
10068 (build_dummy_unc_pointer_types): Likewise.
10069 (gnat_pushdecl): Propage the name to the anonymous variants only.
10070 (update_pointer_to): Only adjust the pointer types in the unconstrained
10071 array case.
10072
65444786
EB
100732011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10074
10075 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10076 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10077 if this is a Taft amendment type and the full declaration is available.
10078 * gcc-interface/trans.c (process_type): Likewise.
10079 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10080 (process_freeze_entity): Likewise.
10081 * gcc-interface/utils.c (dummy_global): New static variable.
10082 (gnat_write_global_declarations): If there are types declared as used
10083 at the global level, insert them in the global hash table.
10084
1aeb40dd
EB
100852011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10086
10087 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10088 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10089 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10090 copy.
10091 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
10092 flag of the type accordingly.
10093 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10094
80ec8b4c
EB
100952011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10096
10097 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10098 finalizing types when updating the pointers to the designated type.
10099 <all>: Finalize the deferred types even if we didn't defer processing
10100 of incomplete types in this invocation.
10101
2a9d769a 101022011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
10103 Nicolas Setton <setton@adacore.com>
10104 Eric Botcazou <ebotcazou@adacore.com>
2a9d769a
OH
10105
10106 * gcc-interface/misc.c (gnat_descriptive_type): New function.
10107 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10108
2438d7a6
KT
101092011-03-28 Kai Tietz <ktietz@redhat.com>
10110
333d8aff 10111 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
80ec8b4c
EB
10112 Windows targets.
10113 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10114 * system-mingw.ads (System): Change ZCX_By_Default default to True.
333d8aff 10115
80ec8b4c 10116 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
2438d7a6 10117
8ad150f6
TG
101182011-03-28 Tristan Gingold <gingold@adacore.com>
10119
10120 PR ada/44431
80ec8b4c
EB
10121 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10122 Use ada output of gnatbind.
8ad150f6
TG
10123 (ada/b_gnatb.adb): Ditto.
10124 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10125 (ada.mostlyclean, ada.stage1)
10126 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10127 (ada.stagefeedback): Adjust.
80ec8b4c 10128 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8ad150f6
TG
10129 Use ada output of gnatbind.
10130 (b_gnatm.adb): Ditto.
10131 (b_gnatl.o, b_gnatm.o): New rules.
10132
51c7954d
EB
101332011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10134
10135 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10136 for the padded type built to support a specified size or alignment.
10137
6ddf9843
EB
101382011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10139
10140 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10141 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10142 unconditionally to the end of the unit when the designated type is
10143 limited_with'ed.
10144 <all>: Rename local variable. Attempt to un-defer types only and do it
10145 for limited_with'ed types as well.
10146 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10147 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10148 consistently and remove redundant call to finalize_from_with_types.
10149
5daed84a
EB
101502011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10151
10152 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10153 subprograms without a previous spec declared in the same unit.
10154 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10155 subprograms at the end of the unit instead of at the beginning.
10156 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10157 isn't public for the special handling of non-inline functions nested
10158 inside inline external functions.
10159
0edf1bb2
JL
101602011-03-25 Jeff Law <law@redhat.com>
10161
5daed84a 10162 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
0edf1bb2 10163
e3c4580e
EB
101642011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10165
10166 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10167 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10168 to compute Set_Size_Depends_On_Discriminant.
10169 (Layout_Type): Call it on array types in back-end layout mode.
10170 * sem_util.adb (Requires_Transient_Scope): Return true for array
10171 types only if the size depends on the value of discriminants.
10172 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10173 type if the RHS is a call to a function that returns an unconstrained
10174 type with default discriminant.
10175
abbc8c7b
EB
101762011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10177
10178 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10179 non-conversion to the nominal result type at the end.
10180
ddb5a105
EB
101812011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10182
10183 * gcc-interface/trans.c (create_temporary): New function taken from...
10184 (create_init_temporary): ...here. Call it.
10185 (call_to_gnu): Create the temporary for the return value early, if any.
10186 Create it for a function with copy-in/copy-out parameters if there is
10187 no target; in other cases of copy-in/copy-out, use another temporary.
10188 Push the new binding level lazily. Add and rename local variables.
10189
0d853156
EB
101902011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10191
10192 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10193 error message.
10194 (set_rm_size): Likewise.
10195
4184ef1b
EB
101962011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10197
10198 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10199 for the padded type built in order to support a specified alignment.
10200 Fix incorrect formatting.
10201
bf7eefab
EB
102022011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10203
10204 PR bootstrap/48216
10205 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10206
ef0feeb2
EB
102072011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10208
10209 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10210 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10211 to the end of the list. Adjust recursive call. Rename local variable.
10212 If REORDER is true, reorder components of the record type.
10213 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10214 components_to_record and adjust the parameter list.
10215
646f9414
EB
102162011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10217
10218 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10219 disabled, use the variable for bounds of loop iteration scheme.
10220
62d784f7
KT
102212011-03-21 Kai Tietz <ktietz@redhat.com>
10222
10223 PR target/12171
0bad0e23 10224 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
62d784f7 10225
f230d759
EB
102262011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10227
10228 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10229 out whether the expression is read-only. Short-circuit placeholder
10230 case and rename a couple of local variables.
10231
bb1f7929
EB
102322011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10233
10234 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10235 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10236 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10237 (convert): Deal with conversions from a smaller form type specially.
10238
400a2d24
EB
102392011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10240
10241 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10242 its argument, except for the special -I- switch.
10243
c26bc3ad
GP
102442011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10245
0bad0e23
EB
10246 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10247 "Ada Issues".
c26bc3ad 10248
07b8e910
EB
102492011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10250
10251 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10252
31a5a547
EB
102532011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10254
10255 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10256 GNAT_FORMAL.
10257 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10258 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10259 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10260 Do not generate the check directly, instead instantiate the template
10261 check present in the descriptor.
10262 (make_descriptor_field): Move around.
10263 (build_vms_descriptor32): Build a template check in the POINTER field.
10264 (build_vms_descriptor): Remove useless suffixes.
10265 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10266
dcf25f59
EB
102672011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10268
10269 PR bootstrap/47467
10270 * targext.c: Include target files if IN_RTS is defined.
10271
0418e131
RG
102722011-01-26 Richard Guenther <rguenther@suse.de>
10273
10274 PR bootstrap/47467
10275 * targext.c: Include config.h.
10276 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10277 dependency.
10278
c6eecbd8 102792011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 10280 Eric Botcazou <ebotcazou@adacore.com>
c6eecbd8
PO
10281
10282 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10283
2d3c7e4f
EB
102842011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10285
10286 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10287 end-of-case on the end label and its associated gotos, if any.
10288
0394741f
EB
102892011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10290
10291 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10292 expressions of the parameter cache within the statement group of
10293 the CICO mechanism.
10294
2a02d090 102952011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 10296 Eric Botcazou <ebotcazou@adacore.com>
2a02d090
OH
10297
10298 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10299 (set_end_locus_from_node): New function.
10300 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10301 make and the function end_locus.
10302 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10303 for the elaboration subprogram.
10304 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10305 set the end_locus of the expression as well.
10306
89f5e978
EB
103072011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10308
10309 PR ada/47131
10310 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10311 variables that are referenced in exception handlers volatile.
10312
10313
ad41bd84 10314\f
797103eb 10315Copyright (C) 2011 Free Software Foundation, Inc.
ad41bd84
JM
10316
10317Copying and distribution of this file, with or without modification,
10318are permitted in any medium without royalty provided the copyright
10319notice and this notice are preserved.