]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ada/ChangeLog
pr23455.c: Adjust testcases for LLP64 for x86_64 mingw target.
[thirdparty/gcc.git] / gcc / ada / ChangeLog
CommitLineData
28d711bf
NR
12011-08-05 Nicolas Roche <roche@adacore.com>
2
3 * gcc-interface/Makefile.in: Don't use directly ../xgcc to build shared
4 libgnat. Use rather the value of GCC_FOR_TARGET. Fix issue with
5 canadian cross.
6 * gcc-interface/Make-lang.in: Add support for canadian cross setting.
7
993f8920
AC
82011-08-05 Matthew Heaney <heaney@adacore.com>
9
10 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Child_Count, Child_Depth):
11 subprogram bodies declared out-of-order.
12
132011-08-05 Yannick Moy <moy@adacore.com>
14
15 * sem_util.adb (Unique_Name): only prefix with "standard" the names of
16 entities directly in package Standard, otherwise skip the standard
17 prefix.
18
9b3956dd
RD
192011-08-05 Robert Dewar <dewar@adacore.com>
20
21 * a-cbmutr.adb: Minor reformatting
22 (Allocate_Node): refactor node allocation algorithm
23
242011-08-05 Robert Dewar <dewar@adacore.com>
25
26 * opt.ads, opt.adb (Debug_Pragmas_Disabled): New switch.
27 * sem_prag.adb (Analyze_Pragma, case Debug_Policy): Implement Disable
28 mode.
29 (Analyze_Pragma, case Check_Policy): Ditto.
30 * sem_prag.ads (Check_Disabled): New function
31 * snames.ads-tmpl: Add Name_Disable.
32
332011-08-05 Robert Dewar <dewar@adacore.com>
34
35 * gnat_rm.texi: Document implementation-defined policy DISABLE for
36 pragmas Assertion_Policy, Check_Policy, Debug_Policy.
37
79e705d6
AC
382011-08-05 Ed Schonberg <schonberg@adacore.com>
39
40 * sem_prag.adb (Analyze_Pragma, case Inline): reject an Inline pragma
41 that appears in a generic formal part and applies to a formal
42 subprogram.
43
442011-08-05 Robert Dewar <dewar@adacore.com>
45
46 * a-cbmutr.ads: Minor reformatting.
47
23b6deca
AC
482011-08-05 Matthew Heaney <heaney@adacore.com>
49
50 * a-comutr.adb, a-cimutr.adb, a-cbmutr.adb (Read): do not use T'Valid
51 to check count, check sign of value instead.
52 * a-comutr.adb, a-cimutr.adb (Write): return immediately if tree empty
53 (Copy_Subtree): allocate copy of source element
54 (Equal_Subtree): compare elements, not access objects
55
562011-08-05 Vincent Celier <celier@adacore.com>
57
58 * gnat_ugn.texi: Fix VMS alternative.
59
a2773bd3
AC
602011-08-05 Thomas Quinot <quinot@adacore.com>
61
62 * sem_ch11.adb: Add comment.
63
642011-08-05 Robert Dewar <dewar@adacore.com>
65
66 * exp_util.adb: Minor comment fix.
67
682011-08-05 Robert Dewar <dewar@adacore.com>
69
70 * scng.adb (Error_Unterminated_String): Improve flag position when
71 comma present.
72
732011-08-05 Matthew Heaney <heaney@adacore.com>
74
75 * Makefile.rtl, impunit.adb: Added a-cbmutr.ad[sb] (bounded multiway
76 tree containers).
77 * a-cbmutr.ads, a-cbmutr.adb: This is the new Ada 2012 unit for bounded
78 multiway tree containers.
79
802011-08-05 Robert Dewar <dewar@adacore.com>
81
82 * styleg.adb (Check_Comment): Implement comment spacing of 1 or 2
83 * stylesw.adb: Implement -gnatyC to control comment spacing
84 * stylesw.ads (Style_Check_Comments_Spacing): New switch (set by
85 -gnatyc/C).
86 * usage.adb: Add line for -gnatyC.
87
882011-08-05 Robert Dewar <dewar@adacore.com>
89
90 * gnat_ugn.texi: Document -gnatyC for J505-006
91 * vms_data.ads: Implement COMMENTS1/COMMENTS2 (retaining COMMENTS as a
92 synonym for COMMENTS2).
93
dedac3eb
RD
942011-08-05 Robert Dewar <dewar@adacore.com>
95
96 * par_sco.adb, sem_ch3.adb, scos.ads, a-iteint.ads, sem_ch12.adb,
97 a-cimutr.adb, a-cimutr.ads, sem_util.ads, sem_res.adb, a-fihema.adb,
98 sem_ch4.adb, lib-xref-alfa.adb, exp_disp.adb, a-comutr.adb,
99 a-comutr.ads, lib-xref.adb: Minor reformatting.
100
1012011-08-05 Robert Dewar <dewar@adacore.com>
102
103 * sem_ch11.adb (Analyze_Raise_Statement): Kill assignment to formal
104 warning if there is an exception handler present.
105
7c62a85a
AC
1062011-08-05 Pascal Obry <obry@adacore.com>
107
108 * a-iteint.ads: Fix copyright year.
109
1102011-08-05 Thomas Quinot <quinot@adacore.com>
111
112 * par_sco.adb (Traverse_Declarations_Or_Statements): Do not generate a
113 statement SCO for a USE clause or a representation clause.
114
1152011-08-05 Yannick Moy <moy@adacore.com>
116
117 * lib-xref-alfa.adb (Collect_ALFA): generate the proper relation
118 between body and spec for stub.
119 (Detect_And_Add_ALFA_Scope): take into account subprogram stub
120 * lib-xref.adb (Enclosing_Subprogram_Or_Package): in the case of a
121 pragma precondition or postcondition, for which the enclosing
122 subprogram or package in the AST is not the desired one, return empty.
123
e49208a9
AC
1242011-08-05 Thomas Quinot <quinot@adacore.com>
125
126 * g-expect.adb: Minor reformatting.
127
1282011-08-05 Bob Duff <duff@adacore.com>
129
130 * a-fihema.adb: Comment out OS_Lib.
131
1322011-08-05 Matthew Heaney <heaney@adacore.com>
133
134 * Makefile.rtl, impunit.adb: Added a-c[oi]mutr.ad[sb]
135 (unbounded multiway tree containers) and a-iteint.ads.
136 * a-comutr.ads, a-comutr.adb:
137 This is the new Ada 2012 unit for unbounded multiway tree containers
138 * a-cimutr.ads, a-cimutr.adb
139 This is the new Ada 2012 unit for indefinite multiway tree containers
140 * a-iteint.ads: New file.
141
201cdb74
RO
1422011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
143
144 * gcc-interface/Makefile.in (raise-gcc.o): Search
145 $(srcdir)/../libgcc.
146
d50f4827
AC
1472011-08-05 Bob Duff <duff@adacore.com>
148
149 * sinfo.ads, sinfo.adb (Subpool_Handle_Name): New attribute for
150 subpools.
151 * par-ch4.adb (P_Allocator): Parse new subpool specification syntax.
152
1532011-08-05 Ed Schonberg <schonberg@adacore.com>
154
155 * sem_ch4.adb (Try_Container_Indexing): New procedure to implement the
156 general indexing aspects of Ada2012. Called when analyzing indexed
157 components when other interpretations fail.
158 * sem_ch8.adb (Find_Direct_Name): check for implicit dereference only
159 in an expression context where overloading is meaningful. This excludes
160 the occurrence in an aspect specification (efficiency only).
161 * sem_attr.adb (Analyze_Attribute): indicate that the attributes
162 related to iterators can be set by an attribute specification, but
163 cannot be queried.
164 * sem_ch13.adb (Analyze_Aspect_Specifications): handle
165 Constant_Indexing and Variable_Indexing.
166 (Check_Indexing_Functions): New procedure to perform legality checks.
167 Additional semantic checks at end of declarations.
168
efe05dfc
AC
1692011-08-05 Sergey Rybin <rybin@adacore.com>
170
171 * tree_io.ads: Update ASIS_Version_Number because of the change of the
172 order of calling Tree_Write/Tree_Read routines made for aspects.
173
1742011-08-05 Bob Duff <duff@adacore.com>
175
176 * a-fihema.adb (Finalize): Fix race condition.
177
5f9cdefe
AC
1782011-08-05 Yannick Moy <moy@adacore.com>
179
180 * sem_ch12.adb (Analyze_Package_Instantiation,
181 Need_Subprogram_Instance_Body): do not generate instance bodies in ALFA
182 mode.
183
1842011-08-05 Ed Schonberg <schonberg@adacore.com>
185
186 * sem_type.adb (Specific_Type): in an instance, the type-specific
187 operand of an equality check that involves null may have a private
188 type. Use full view to determine legality of construct.
189
822868aa
AC
1902011-08-05 Vincent Celier <celier@adacore.com>
191
192 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
193 delete or close the file when the call to gnatmake was successful.
194
1952011-08-05 Yannick Moy <moy@adacore.com>
196
197 * gnat1drv.adb (Adjust_Global_Switches): in ALFA mode, set
198 Global_Discard_Names.
199
2002011-08-05 Ed Schonberg <schonberg@adacore.com>
201
202 * sinfo.ads: comments on use of entity field for aspect specifications.
203
2042011-08-05 Ed Schonberg <schonberg@adacore.com>
205
206 * sem_ch12.adb (Reset_Entity): If the entity field of the associated
207 node is not itself an entity but a selected component, it is a
208 rewritten parameterless call to an en enclosing synchronized operation,
209 and this expansion will be performed again in the instance, so there is
210 no global information to preserve.
211
44a10091
AC
2122011-08-05 Javier Miranda <miranda@adacore.com>
213
214 * exp_disp.adb (Set_All_DT_Position): Cleanup code and improve support
215 for renamings of predefined primitives.
216 (In_Predef_Prims_DT): New subprogram.
217
2182011-08-05 Ed Schonberg <schonberg@adacore.com>
219
220 * sem_util.adb, sem_util.ads (Check_Implicit_Dereference): If a
221 possible interpretation of name is a reference type, add an
222 interpretation that is the designated type of the reference
223 discriminant of that type.
224 * sem_res.adb (resolve): If the interpretation imposed by context is an
225 implicit dereference, rewrite the node as the deference of the
226 reference discriminant.
227 * sem_ch3.adb (Analyze_Subtype_Declaration, Build_Derived_Record_Type,
228 Build_Discriminated_Subtype): Inherit Has_Implicit_Dereference from
229 parent type or base type.
230 * sem_ch4.adb (Process_Indexed_Component,
231 Process_Overloaded_Indexed_Component, Indicate_Name_And_Type,
232 Analyze_Overloaded_Selected_Component, Analyze_Selected_Component):
233 Check for implicit dereference.
234 (List_Operand_Interps): Indicate when an implicit dereference is
235 ambiguous.
236 * sem_ch8.adb (Find_Direct_Name): Check for implicit dereference.
237
2382011-08-05 Thomas Quinot <quinot@adacore.com>
239
240 * scos.ads: Update documentation of SCO table. Pragma statements can now
241 be marked as disabled (using 'p' instead of 'P' as the statement kind).
242 * par_sco.ads, par_sco.adb: Implement the above change.
243 (Process_Decisions_Defer): Generate a P decision for the first parameter
244 of a dyadic pragma Debug.
245 * sem_prag.adb (Analyze_Pragma, case Debug): Mark pragma as enabled if
246 necessary.
247 * put_scos.adb: Code simplification based on above change.
248
bb3c784c
AC
2492011-08-05 Robert Dewar <dewar@adacore.com>
250
251 * sem_ch3.adb, gnatcmd.adb, switch-c.adb, exp_attr.adb, make.adb,
252 bindgen.adb, einfo.adb, sem_ch12.adb, sem_attr.adb, a-fihema.adb,
253 a-fihema.ads, sem_elab.adb, sem_elab.ads, aspects.adb, opt.ads,
254 prj-conf.adb, sem_ch13.adb, s-ficobl.ads: Minor reformatting
255
2562011-08-05 Bob Duff <duff@adacore.com>
257
258 * a-stunau.ads, g-spipat.adb: Update comments.
259
36f686f9
BD
2602011-08-05 Bob Duff <duff@adacore.com>
261
262 * a-fihema.ads: Minor comment fix.
263 * a-fihema.adb (Allocate, Deallocate): Assert that the alignment is
264 correct.
265 (Attach, Detach): Remove some unnecessary code.
266 (Finalize): Remove Node_Ptr_To_Address, replace with a constant.
267
7882673f
BD
2682011-08-05 Bob Duff <duff@adacore.com>
269
270 * a-fihema.ads, a-fihema.adb (Finalization_Collection): Avoid heap
271 allocation for Objects component. This simplifies the code somewhat. It
272 is also a little more efficient in the not-so-unusual case where there
273 are no controlled objects allocated.
274 Make Finalization_Started flag atomic.
275 (Finalize): Avoid unnecessary detachment of items from the list.
276 (pcol): Minor cleanup.
277
d34cd274
AC
2782011-08-05 Ed Schonberg <schonberg@adacore.com>
279
280 * sem_ch12.adb (Analyze_Formal_Package_Declaration): reject a formal
281 package whose name is the same as that of the generic unit, or its
282 ultimate prefix.
283
2842011-08-05 Bob Duff <duff@adacore.com>
285
286 * a-fihema.adb, a-fihema.ads: Minor comment improvements.
287 * sem_ch3.adb, exp_ch5.adb, exp_ch7.adb, exp_ch7.ads, exp_util.adb:
288 Minor comment fixes.
289
00332244
AC
2902011-08-05 Arnaud Charlet <charlet@adacore.com>
291
292 * make.adb (Linking_Phase): No longer need to set source search path
293 before calling gnatlink in CodePeer mode.
294 * gnatlink.adb (Gnatlink): No longer pass -gnat83/95/05/12 switch to
295 gcc in CodePeer mode, since the binder generated file no longer has a
296 'with Main'.
297 * switch.ads, switch.adb (Is_Language_Switch): Removed.
298 * switch-c.adb: Update comment.
299
3002011-08-05 Thomas Quinot <quinot@adacore.com>
301
302 * exp_strm.adb, bindgen.adb, s-ficobl.ads: Minor reformatting.
303
3042011-08-05 Nicolas Roche <roche@adacore.com>
305
306 * gnat_ugn.texi: Fix minor syntax error issue.
307
3082011-08-05 Vincent Celier <celier@adacore.com>
309
310 * gnatcmd.adb (Get_Closure): Do not crash when it is not possible to
311 delete or close the file when the call to gnatmake returns a non
312 successful return code.
313
3142011-08-05 Ed Schonberg <schonberg@adacore.com>
315
316 * exp_ch4.adb (Expand_N_Type_Conversion): When expanding a predicate
317 check, indicate that the copy of the original node does not come from
318 source, to prevent an infinite recursion of the expansion.
319
3202011-08-05 Johannes Kanig <kanig@adacore.com>
321
322 * debug.adb: document switch -gnatd.G for gnat2why, which deactivates
323 VC generation for subprogram bodies.
324
3252011-08-05 Yannick Moy <moy@adacore.com>
326
327 * einfo.ads: Typo.
328 * sem_ch3.adb (Signed_Integer_Type_Declaration): in ALFA mode, define
329 the base type with the smallest allowed base type.
330
3312011-08-05 Sergey Rybin <rybin@adacore.com>
332
333 * tree_gen.adb, tree_in.adb, aspects.adb: Fix tree read-write for
334 aspects.
335
3362011-08-05 Ed Schonberg <schonberg@adacore.com>
337
338 * sem_ch12.ads: minor comment updates.
339
3402011-08-05 Ed Schonberg <schonberg@adacore.com>
341
342 * sem_ch12.adb (Analyze_Formal_Package_Declaration): in an
343 instantiation and a formal package the compiler generates a package
344 renaming declaration so that the generic name within the declaration
345 is interpreted as a renaming of the instance. At the end of a formal
346 package declaration, this renaming must become invisible.
347
0da80d7d
AC
3482011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
349
350 * exp_ch7.adb (Is_Init_Call): Reimplemented to avoid character
351 comparison and rely on concrete entities instead.
352
3532011-08-05 Ed Schonberg <schonberg@adacore.com>
354
355 * einfo.ads, einfo.adb (Has_Implicit_Dereference): new flag on types
356 and discriminants, to indicate that the type has an access discriminant
357 that supports implicit dereference.
358 * snames.ads-tmpl: Add names of aspects and attributes related to
359 Ada2012 iterators: constant_indexing, default_iterator,
360 iterator_element, implicit_dereference, variable_indexing.
361 * aspects.ads, aspects.adb: entries for iterator-related aspects.
362 * sem_ch13.adb (Analyze_aspect_specifications): dummy entries for
363 iterator-related aspects.
364 * sem_attr.adb, exp_attr.adb Dummy entries for iterator-related aspects.
365
3662011-08-05 Sergey Rybin <rybin@adacore.com>
367
368 * gnat_ugn.texi, vms_data.ads: Extend the subsection about coupling
369 metrics in gnatmetric to cover new kinds of coupling mentrics.
370
3712011-08-05 Steve Baird <baird@adacore.com>
372
373 * bindgen.adb (Gen_CodePeer_Wrapper): Call Ada_Main_Program instead
2c7f9cc0 374 of calling the user-defined main subprogram.
0da80d7d
AC
375 (Gen_Main): Declare Ada_Main_Program and (if CodePeer_Mode
376 is set) Call_Main_Subprogram ahead of, as opposed to
377 inside of, Main.
378 (Gen_Output_File_Ada): Remove CodePeer_Mode-conditional
379 generation of a "with" of the user-defined main subprogram.
380 Remove CodePeer_Mode-conditional call to Gen_CodePeer_Wrapper
381 (which is now called from Gen_Main instead).
382
73242473
AC
3832011-08-05 Emmanuel Briot <briot@adacore.com>
384
385 * projects.texi: Added reference to the Makefile package.
386
3872011-08-05 Thomas Quinot <quinot@adacore.com>
388
389 * exp_ch7.adb: Minor comment rewording.
390
3912011-08-05 Ed Falis <falis@adacore.com>
392
393 * env.c: Fix comment.
394
3952011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
396
397 * sem_elab.adb (Is_Finalization_Procedure): Reimplemented to avoid
398 character comparison and rely on concrete entities instead.
399
97ed5872
AC
4002011-08-05 Ed Schonberg <schonberg@adacore.com>
401
402 * sem_ch3.adb: (Check_Private_Overriding): better error message,
403 suggested by AI95-0068.
404
4052011-08-05 Hristian Kirtchev <kirtchev@adacore.com>
406
407 * exp_ch7.adb (Find_Last_Init): Use Next_Suitable_Statement to retrieve
408 the two potential initialization calls. This accounts for any
409 access-before-elaboration checks which may precede the initialization
410 calls.
411 (Next_Suitable_Statement): New routine. Returns the next real statement
412 after the input node while skipping generated checks.
413 * sem_elab.adb (Check_A_Call): New formal parameter In_Init_Proc along
414 with comment on usage.
415 Do not generate Elaborate_All when the trigger is a finalization call
416 coming from a type init proc.
417 (Check_Elab_Call): Propagate the initialization procedure context to
418 subsequent calls to Check_A_Call.
419 (Check_Internal_Call_Continue): Propagate the initialization procedure
420 context to subsequent calls to Check_Elab_Call.
421 (Is_Finalization_Procedure): New routine. Returns True if the input
422 entity denotes a [Deep_]Finalize routine.
423 * sem_elab.ads (Check_Elab_Call): New formal parameter In_Init_Proc
424 along with comment on usage.
425
4262011-08-05 Vadim Godunko <godunko@adacore.com>
427
428 * s-atocou.ads: Add list of supported platforms.
429
4302011-08-05 Yannick Moy <moy@adacore.com>
431
432 * sem_prag.adb, restrict.adb: Correct style for or'ing Boolean variables
433
434 * opt.ads (Disable_ALI_File): new Boolean flag
435 * lib-writ.adb (Write_ALI): when Disable_ALI_File is set, do nothing
436
4372011-08-05 Ed Falis <falis@adacore.com>
438
439 * env.c (__gnat_environ): Fix includes for RTPs and VTHREADS so that
440 environ is properly defined.
441
4422011-08-05 Vincent Celier <celier@adacore.com>
443
444 * make.adb (Compilation_Phase): Exit immediately when all objects have
445 been found up to date, to avoid multiple exit messages.
446 * prj-nmsc.adb (Add_Source): Allow duplicate source file names in the
447 same project for languages with no compiler.
448 * gnat_ugn.texi: Document compiler switch -gnateI and gnatmake switch
449 -eI.
9aff36e9
RD
4502011-08-05 Robert Dewar <dewar@adacore.com>
451
452 * exp_ch7.ads, sem_type.adb, make.adb, sem_prag.adb, sem_util.adb,
453 sem_util.ads, sem_attr.adb, restrict.ads, sem_ch6.adb, prj-conf.adb,
454 prj-conf.ads, s-atocou.ads, s-atocou.adb, s-atocou-x86.adb,
455 s-atocou-builtin.adb: Minor reformatting.
456
406935b6
AC
4572011-08-05 Yannick Moy <moy@adacore.com>
458
459 * exp_ch7.adb (Establish_Transient_Scope): in formal verification mode,
460 if the node to wrap is a pragma check, this node and enclosed
461 expression are not expanded, so do not apply any transformations here.
462 * exp_prag.adb (Expand_Pragma_Check): document the need to avoid
463 introducing transient scopes.
464
4652011-08-05 Jose Ruiz <ruiz@adacore.com>
466
467 * adaint.c (__gnat_set_writable, __gnat_set_readable,
468 __gnat_set_executable, __gnat_set_non_writable, __gnat_set_non_readable,
469 __gnat_copy_attribs): On VxWorks 6.x and later, the required chmod
470 routine is available, so we use the default implementation of these
471 functions.
472 * s-os_lib.ads (Copy_File, Copy_Time_Stamps): Document that there is
473 support for copying attributes on VxWorks 6.
474
4752011-08-05 Yannick Moy <moy@adacore.com>
476
477 * debug.adb: Remove use of -gnatd.D.
478 * gnat1drv.adb (Adjust_Global_Switches): adjust switches for ALFA mode
479 * opt.ads: Simplify variables for ALFA mode, to keep one only
480 * restrict.adb, sem_prag.adb: Adapt treatment done for CodePeer mode
481 to ALFA mode.
482
4832011-08-05 Vincent Celier <celier@adacore.com>
484
485 * prj-conf.adb (Do_Autoconf): Look also for --RTS in
486 Builder'Default_Switches.
487
4882011-08-05 Vincent Celier <celier@adacore.com>
489
490 * makeusg.adb: Add lines for --create-map-file switches.
491
4922011-08-05 Ed Schonberg <schonberg@adacore.com>
493
494 * freeze.adb (Freeze_Entity): For a subprogram, if a type in the
495 profile is incomplete and the full view is available, replace it with
496 the full view.
497 * sem_ch6.adb (Possible_Freeze): if a type in the profile is
498 incomplete, freezing the subprogram is delayed until the full view is
499 frozen.
500 * sem_type.adb (Disambiguate): an ambiguity between a user-defined
501 fixed-point multiplication operator and the predefined operator is
502 resolved in favor of the user-defined one.
503
96c891b3
RO
5042011-08-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
505
506 * init.c [__alpha__ && __osf__] (__gnat_error_handler): Use
507 CONST_CAST.
508
276e7ed0
AC
5092011-08-04 Ed Schonberg <schonberg@adacore.com>
510
511 * sem_util.ads, sem_unit.adb (Type_Without_Stream_Operation): determine
512 whether a type lacks user-defined Read or Write operations, or has a
513 component that lacks them.
514 * sem_attr.adb (Check_Stream_Attribute): if restriction
515 No_Default_Stream_Attributes is active, verify that all subcomponent
516 types of the target have user-defined stream operations, and report
517 error otherwise.
518 * exp_ch3.adb (Stream_Operqtion_OK): use Type_Without_Stream_Operation.
519 * exp_strm.adb: Build_Elementary_Input_Call,
520 Build_Elementary_Write_Call): remove checks for restriction
521 No_Default_Stream_Attributes, now checked in semantics.
522
5232011-08-04 Vincent Celier <celier@adacore.com>
524
525 * prj-conf.ads, prj-conf.adb (Do_Autoconf): If there is no --RTS
526 switches on the command line, look for all valid --RTS switches in the
527 Builder switches and for each language use the first runtime name found
528 to invoke gprconfig.
529 (Get_Or_Create_Configuration_File): Warn if --RTS is specified on the
530 command line and there is no auto-configuration.
531 (Runtime_Name_Set_For): New function.
532
5332011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
534
535 * exp_ch7.adb (Build_Object_Declarations): Do not generate the
536 elaborate initialization expression for variable Abort when processing
537 a package body or a declaration.
538 (Create_Finalizer): Propagate the package context when creating the
539 exception-related variables.
540 * exp_ch7.ads (Build_Object_Declarations): New formal parameter
541 For_Package along with usage comment.
542
19172ae9
AC
5432011-08-04 Arnaud Charlet <charlet@adacore.com>
544
545 * gcc-interface/Makefile.in: Clean up targets.
546 Enable new package for atomic counters and copy-on-write implementation
547 of unbounded strings on x86 platforms.
548 * gcc-interface/Make-lang.in: Update dependencies.
549
0319cacc
AC
5502011-08-04 Robert Dewar <dewar@adacore.com>
551
552 * exp_ch7.adb: Minor reformatting.
553
5542011-08-04 Robert Dewar <dewar@adacore.com>
555
556 * exp_strm.adb: Minor reformatting.
557
5582011-08-04 Vadim Godunko <godunko@adacore.com>
559
560 * s-atocou.adb: Replace by dummy version and use on targets where atomic
561 operations are not supported.
562 * s-atocou-builtin.adb: Renamed from s-atocou.adb.
563 * s-atocou-x86.adb: New file.
564 * Makefile.rtl: Add s-atocou.o file
565
5662011-08-04 Arnaud Charlet <charlet@adacore.com>
567
568 * make.adb (Compile): Move setting of CodePeer_Mode to ...
569 (Compilation_Phase): ... here.
570 (Scan_Make_Arg): Now bind and link by default in CodePeer mode.
571
5722011-08-04 Thomas Quinot <quinot@adacore.com>
573
574 * Make-generated.in: Fix minor typo in comment.
575
26e7e1a0
AC
5762011-08-04 Thomas Quinot <quinot@adacore.com>
577
578 * gnatls.adb: Use Prj.Env.Initialize_Default_Project_Path to retrieve
579 the project path.
580
5812011-08-04 Robert Dewar <dewar@adacore.com>
582
583 * a-coinho.adb: Minor reformatting.
584
5852011-08-04 Robert Dewar <dewar@adacore.com>
586
587 * a-coinho.ads: Minor reformatting.
588
5892011-08-04 Vadim Godunko <godunko@adacore.com>
590
591 * s-atocou.ads, s-atocou.adb: New files.
592 * a-strunb-shared.ads, a-strunb-shared.adb, a-stwiun-shared.ads,
593 a-stwiun-shared.adb, a-stzunb-shared.ads, a-stzunb-shared.adb: Remove
594 direct use of GCC's atomic builtins and replace them by use of new
595 atomic counter package.
596
5972011-08-04 Ed Schonberg <schonberg@adacore.com>
598
599 * exp_strm.adb: better error message for No_Default_Stream_Attributes.
600
6012011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
602
603 * a-tags.adb (Unregister_Tag): Replace the complex address arithmetic
604 with a call to Get_External_Tag.
605 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on
606 subprogram usage. Remove the guard against package declarations and
607 bodies since Build_Cleanup_Statements is no longer invoked in that
608 context.
609 (Build_Components): Initialize Tagged_Type_Stmts when the context
610 contains at least one library-level tagged type.
611 (Build_Finalizer): New local variables Has_Tagged_Types and
612 Tagged_Type_Stmts along with associated comments on usage. Update the
613 logic to include tagged type processing.
614 (Create_Finalizer): Insert all library-level tagged type unregistration
615 code before the jump block circuitry.
616 (Expand_N_Package_Body): Remove the call to Build_Cleanup_Statements.
617 (Expand_N_Package_Declaration): Remove the call to
618 Build_Cleanup_Statements.
619 (Process_Tagged_Type_Declaration): New routine. Generate a call to
620 unregister the external tag of a tagged type.
621 (Processing_Actions): Reimplemented to handle tagged types.
622 (Process_Declarations): Detect the declaration of a library-level
623 tagged type and carry out the appropriate actions.
624 (Unregister_Tagged_Types): Removed. The machinery has been directly
625 merged with Build_Finalizer.
626
7483c888
AC
6272011-08-04 Robert Dewar <dewar@adacore.com>
628
629 * bindgen.ads, gnatlink.adb, sem_ch4.adb, gnatbind.adb, put_alfa.adb,
630 gnatls.adb, exp_ch3.adb: Minor reformatting.
631
6322011-08-04 Marc Sango <sango@adacore.com>
633
634 * sem_attr.adb (Analyze_Attribute): Replace the message
635 "invisible attribute of}" of the spark restriction violation in
636 attribute reference by the simple message "invisible attribute of type".
637 Indeed, the node value Error_Msg_Node_1 used is in conflit with the
638 two insertion characters: '&' and '}'.
639
6402011-08-04 Vadim Godunko <godunko@adacore.com>
641
642 * impunit.adb (Non_Imp_File_Names_12): Add "a-coinho".
643 * a-coinho.ads, a-coinho.adb: New file.
644 * Makefile.rtl: Add Ada.Containers.Indefinite_Holders.
645
5207696c
AC
6462011-08-04 Nicolas Roche <roche@adacore.com>
647
648 * alfa_test.adb: Not all ali files are containing alfa information even
649 if compiled with -gnatd.F. So suppress warning about missing ALFA
650 information.
651
6522011-08-04 Yannick Moy <moy@adacore.com>
653
654 * lib-xref-alfa.adb (Add_ALFA_Scope): use non-empty unique name for
655 scope.
656 * put_alfa.adb: Check that scope name is not empty.
657
6582011-08-04 Ed Schonberg <schonberg@adacore.com>
659
660 * exp_ch3.adb (Stream_Operation_Ok): new predicate
661 Needs_Elementary_Stream_Operation, to determine whether user-defined
662 Read and Write attributes are available for the elementary components
663 of the given type. If only the predefined attributes are available,
664 then when restriction No_Default_Stream_Attributes is active the
665 predefined stream attributes for the composite type cannot be created.
666
6672011-08-04 Robert Dewar <dewar@adacore.com>
668
669 * bindgen.adb: Fix obsolete comments and names from Ada/C days.
670 Put routines in alpha order
671
2bd2d858
JR
6722011-08-04 Jose Ruiz <ruiz@adacore.com>
673
674 * gcc-interface/Makefile.in: Remove xenomai specific versions of system.
675 * gcc-interface/Make-lang.in: Update dependencies.
676
8fae6016
AC
6772011-08-04 Arnaud Charlet <charlet@adacore.com>
678
679 * gcc-interface/lang.opt: Add AdaWhy language, simimlar to Ada.
680 * gcc-interface/lang-specs.h: Add handling of AdaWhy specs (calls
681 gnat1why).
682
a54d0eb4
AC
6832011-08-04 Robert Dewar <dewar@adacore.com>
684
685 * sem_ch3.adb, make.adb, a-cohata.ads, sem_prag.adb, makeutl.adb,
686 lib-xref-alfa.adb: Minor reformatting.
687
6882011-08-04 Marc Sango <sango@adacore.com>
689
690 * sem_ch12.adb (Analyze_Generic_Package_Declaration,
691 Analyze_Generic_Subprogram_Declaration, Analyze_Package_Instantiation,
692 Analyze_Subprogram_Instantiation): Check absence of generic in SPARK
693 mode.
694
6952011-08-04 Tristan Gingold <gingold@adacore.com>
696
697 * bindgen.adb (Gen_Adainit_C): Remove.
698 (Gen_Adafinal_C): Ditto.
699 (Gen_Elab_Externals_C): Ditto.
700 (Gen_Elab_Calls_C): Ditto.
701 (Gen_Elab_Order_C): Ditto.
702 (Gen_Elab_Defs_C): Ditto.
703 (Gen_Finalize_Library_C): Ditto.
704 (Gen_Finalize_Library_Defs_C): Ditto.
705 (Gen_Main_C): Ditto.
706 (Gen_Output_File_C): Ditto.
707 (Gen_Restrictions_C): Ditto.
708 (Gen_Versions_C): Ditto.
709 (Write_Info_Ada_C): Ditto.
710 (Gen_Object_Files_Options): Call WBI instead of Write_Info_Ada_C
711 (Gen_Output_File): Do not force Ada_Bind_File anymore.
712 Always call Gen_Output_File_Ada.
713 * gnatlink.adb (Begin_Info): Now a constant.
714 (End_Info): Ditto.
715 (Ada_Bind_File): Remove
716 (Process_Args): Do not handle -A/-C. Remove not Ada_Bind_File cases.
717 * switch-b.adb (Scan_Binder_Switches): Do not handle -C.
718 * gnatbind.adb (Gnatbind): Remove not Ada_Bind_File cases.
719 * opt.ads (Ada_Bind_File): Remove.
720
7212011-08-04 Thomas Quinot <quinot@adacore.com>
722
723 * projects.texi: Document target-specific directory in default project
724 path for gnatmake.
725
7262011-08-04 Thomas Quinot <quinot@adacore.com>
727
728 * gnatls.adb, prj-env.adb: Add $prefix/share/gpr to default project
729 path in all cases .
730
24558db8
AC
7312011-08-04 Yannick Moy <moy@adacore.com>
732
733 * sem_ch3.adb, sem_ch5.adb, sem_util.adb, sem_ch4.adb, sem_ch8.adb,
734 opt.ads, lib-xref.ads: Code clean up.
735
7362011-08-04 Yannick Moy <moy@adacore.com>
737
738 * gnat_rm.texi: Update description of Test_Case
739 * gnat_ugn.texi: Typo.
740
7412011-08-04 Ed Falis <falis@adacore.com>
742
743 * adaint.c (__gnat_get_number_of_cpus): fix typo in last checkin.
744
7452011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
746
747 * exp_ch4.adb (Suitable_Element): Skip field _parent on .NET/JVM when
748 it is of type Root_Controlled. This action eliminates fields Prev and
749 Next from type equality.
750
7512011-08-04 Yannick Moy <moy@adacore.com>
752
753 * lib-xref-alfa.adb: Correct typo.
754
7552011-08-04 Matthew Heaney <heaney@adacore.com>
756
757 * a-cohata.ads (Hash_Table_Type): default-initialize the Nodes
758 component.
759
1f9939b5
AC
7602011-08-04 Yannick Moy <moy@adacore.com>
761
762 * sem_prag.adb (Check_Arg_Is_String_Literal): remove useless procedure
763 (Analyze_Pragma): allow static string expression for name of Test_Case,
764 instead of simply string literals.
765 * sem_util.adb (Get_Name_From_Test_Case_Pragma): adapt to static string
766 expressions.
767
7682011-08-04 Vincent Celier <celier@adacore.com>
769
770 * makeutl.adb (Complete_Mains.Find_File_Add_Extension): Use canonical
771 case suffixes to find truncated main sources.
772
7732011-08-04 Tristan Gingold <gingold@adacore.com>
774
775 * impunit.adb (Non_Imp_File_Names_95): Add g-tastus.
776 s-stusta.adb (Compute_All_Task): Use Put_Line instead of Put.
777 (Compute_Current_Task): Ditto.
778
7792011-08-04 Tristan Gingold <gingold@adacore.com>
780
781 * gnat_ugn.texi: Mention GNAT.Task_Stack_Usage.
782
7832011-08-04 Yannick Moy <moy@adacore.com>
784
785 * lib-xref-alfa.adb (Is_Global_Constant): new function that detects
786 library-level constant.
787 (Add_ALFA_Xrefs): ignore global constants in ALFA xref.
788 * sem_res.adb (Resolve_Actuals): do not add cross-reference to Formal
789 used as selector of parameter association, in ALFA mode.
790
15d8a51d
AC
7912011-08-04 Robert Dewar <dewar@adacore.com>
792
793 * exp_ch5.adb, exp_ch7.adb, exp_util.adb, bindgen.adb, sem_prag.adb,
794 s-tassta.adb, exp_ch4.adb, exp_disp.adb, s-stausa.adb: Minor
795 reformatting.
796
7972011-08-04 Arnaud Charlet <charlet@adacore.com>
798
799 * make.adb (Linking_Phase): Set source search path before calling
800 gnatlink in CodePeer mode.
801
f46faa08
AC
8022011-08-04 Javier Miranda <miranda@adacore.com>
803
804 * exp_ch7.adb (Expand_N_Package_Body, Expand_N_Package_Declaration):
805 Remove code which takes care of building TSDs.
806 * rtsfind.ads (RE_Check_Interface_Conversion): New entity.
807 * exp_ch4.adb (Apply_Accessibility_Check): Add support for generating
808 the accessibility check in VM targets.
809 * exp_disp.adb (Make_VM_TSD): Spec moved to exp_disp.ads
810 (Building_Static_DT): Now returns false for VM targets.
811 (Build_VM_TSDs): Removed.
812 (Expand_Interface_Conversion): Generate missing runtime check for
813 conversions to interface types whose target type is unknown at compile
814 time.
815 (Make_VM_TSD): Add missing code to disable the generation of calls to
816 Check_TSD if the tagged type is not defined at library level, or not
817 has a representation clause specifying its external tag, or -gnatdQ is
818 active.
819 * exp_disp.ads (Build_VM_TSDs): Removed.
820 (Make_VM_TSDs): Spec relocated from exp_disp.adb
821 * sem_disp.adb (Check_Dispatching_Operation): No code required to
822 register primitives in the dispatch tables in VM targets.
823 * exp_ch3.adb (Expand_N_Object_Declaration): Remove wrong expansion of
824 initialization of class-wide interface objects in VM targets.
825 (Expand_Freeze_Record_Type): For VM targets call Make_VM_TSD (instead
826 of Make_DT).
827
8282011-08-04 Jerome Lambourg <lambourg@adacore.com>
829
830 * gnatlink.adb (Gnatlink): Correct missleading error message displayed
831 when dotnet-ld cannot be found.
832
8332011-08-04 Arnaud Charlet <charlet@adacore.com>
834
835 * bindgen.adb: Simplify significantly generation of binder body file in
836 CodePeer mode.
837 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Prevent assert failure
838 when compiling binder generated file in CodePeer mode (xxx'Elab_Spec
839 not expanded).
840
2ba7e31e
AC
8412011-08-04 Yannick Moy <moy@adacore.com>
842
843 * sem_prag.adb, sem.ads: Code cleanup.
844
8452011-08-04 Tristan Gingold <gingold@adacore.com>
846
847 * s-tassta.adb (Task_Wrapper): Rewrite the dynamic stack usage part.
848 * s-stausa.adb, s-stausa.ads: Major rewrite. Now provides accurate
849 results if possible.
850 * s-stusta.adb (Print): Adjust after changes in s-stausa.
851 * gnat_ugn.texi: Update dynamic stack usage section.
852
8532011-08-04 Steve Baird <baird@adacore.com>
854
855 * bindgen.adb (Gen_CodePeer_Wrapper): new procedure.
856 Generate (if CodePeer_Mode is set) a "wrapper" subprogram which
857 contains only a call to the user-defined main subprogram.
858 (Gen_Main_Ada) - If CodePeer_Mode is set, then
859 call the "wrapper" subprogram instead of directly
860 calling the user-defined main subprogram.
861
8622011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
863
864 * exp_ch5.adb (Expand_N_Case_Statement): Check the statements of all
865 alternatives of a case statement for controlled objects. Rename local
866 variable A to Dead_Alt.
867 (Expand_N_If_Statement): Check the then and else statements of an if
868 statement for controlled objects. Check the then statements of all
869 elsif parts of an if statement for controlled objects.
870 (Expand_N_Loop_Statement): Check the statements of a loop for controlled
871 objects.
872 * exp_ch7.adb (Process_Transient_Objects): Rewrite the condition which
873 detects a loop associated with the expansion of an array object.
874 Augment the processing of the loop statements to account for a possible
875 wrap done by Process_Statements_For_Controlled_Objects.
876 * exp_ch9.adb (Expand_N_Asynchronous_Select): Check the triggering
877 statements and abortable part of an asynchronous select for controlled
878 objects.
879 (Expand_N_Conditional_Entry_Call): Check the else statements of a
880 conditional entry call for controlled objects.
881 (Expand_N_Selective_Accept): Check the alternatives of a selective
882 accept for controlled objects.
883 (Expand_N_Timed_Entry_Call): Check the entry call and delay
884 alternatives of a timed entry call for controlled objects.
885 * exp_ch11.adb (Expand_Exception_Handlers): Check the statements of an
886 exception handler for controlled objects.
887 * exp_util.adb (Requires_Cleanup_Actions (List_Id, Boolean, Boolean)):
888 Add formal parameter Nested_Constructs along with its associated
889 comment.
890 (Requires_Cleanup_Actions (Node_Id)): Update all calls to
891 Requires_Cleanup_Actions.
892 (Process_Statements_For_Controlled_Objects): New routine.
893 * exp_util.ads (Process_Statements_For_Controlled_Objects): New
894 routine. Inspect a node which contains a non-handled sequence of
895 statements for controlled objects. If such an object is found, the
896 statements are wrapped in a block.
897
1bf773bb
AC
8982011-08-04 Bob Duff <duff@adacore.com>
899
900 * sem_type.adb (Covers): If T2 is a subtype of a class-wide type, we
901 need to compare with Class_Wide_Type (T2), in order to get at the
902 original class-wide type node.
903 * sem_type.ads (Covers): Improve the comment.
904 * einfo.ads (Class_Wide_Type): Improve the comment.
905 * exp_intr.adb (Expand_Unc_Deallocation): Remove unnecessary setting of
906 the type of the Deref.
907
9082011-08-04 Yannick Moy <moy@adacore.com>
909
910 * gnat_rm.texi: Document that Test_Case pragma can only appear on
911 separate declarations.
912 * sem_prag.adb (procedure Check_Identifier_Is_One_Of): new procedure to
913 check identifier of pragma argument.
914 (Chain_TC): check that no other test case associated to the same entity
915 share the same name.
916 (Check_Test_Case): disallow test case inside subprogram body
917 (Analyze_Pragma): correct call to check identifier and not argument
918 * sem_util.adb, sem_util.ads (Get_Name_From_Test_Case_Pragma): new
919 function gets name from test case pragma.
920
dac3bede
YM
9212011-08-04 Yannick Moy <moy@adacore.com>
922
923 * gnat_rm.texi: Document new pragma and aspect.
924 * aspects.adb, aspects.ads (Aspect_Id): new value Aspect_Test_Case
925 (No_Duplicates_Allowed): new constant array defining whether duplicates
926 aspects of each kind can appear on the same declaration.
927 * einfo.adb, einfo.ads (Spec_PPC_List): replace field with Contract
928 field, which points to a node holding the previous Spec_PPC_List.
929 * exp_ch9.adb, sem_ch6.adb, sem_prag.adb: Reach to Spec_PPC_List
930 through the indirection with Contract.
931 * exp_util.adb (Insert_Actions): raise Program_Error on N_Contract node
932 * par-prag.adb (Prag): do nothing on Test_Case pragma
933 * sem.adb (Analyze): abort on N_Contract, on which Analyze should not
934 be called directly.
935 * sem_attr.adb (Analyze_Attribute): allow attribute 'Result in
936 component Ensures of Test_Case.
937 * sem_ch12.adb, sem_ch6.adb, sem_ch9.adb
938 (Analyze_Generic_Subprogram_Declaration,
939 Analyze_Subprogram_Instantiation,
940 Analyze_Abstract_Subprogram_Declaration,
941 Analyze_Subprogram_Body_Helper,
942 Analyze_Subprogram_Specification, Analyze_Entry_Declaration):
943 insert contract in subprogram node at point of definition
944 * sem_ch13.adb
945 (Aspect_Loop): do not raise error on duplicate Test_Case aspect
946 (Analyze_Aspect_Specifications): analyze Test_Case aspect and create
947 corresponding pragma
948 (Check_Aspect_At_Freeze_Point): raise Program_Error on Test_Case aspect
949 * sem_ch3.adb (Analyze_Declarations): insert analysis of test-cases,
950 similar to the analysis of pre/post
951 (Derive_Subprogram): insert contract in subprogram node at point of
952 derivation.
953 * sem_prag.adb, sem_prag.ads
954 (Check_Arg_Is_String_Literal, Check_Identifier):
955 new checking procedures to be called in treatment of pragmas
956 (Check_Test_Case): new procedure to check that a Test_Case aspect or
957 pragma is well-formed. This does not check currently that 'Result is
958 used only in the Ensures component of a Test_Case.
959 (Analyze_Pragma): add case for Test_Case
960 (Analyze_TC_In_Decl_Part): pre-analyze the Requires and Ensures
961 components of a Test_Case.
962 (Preanalyze_TC_Args): new procedure to preanalyze the boolean
963 expressions in the 3rd (and 4th if present) arguments of a Test_Case
964 pragma, treated as spec expressions.
965 (Sig_Flags): add value -1 for Test_Case.
966 * sem_util.adb, sem_util.ads (Get_Ensures_From_Test_Case_Pragma,
967 Get_Requires_From_Test_Case_Pragma): getters for both expression
968 components of a Test_Case.
969 * sinfo.adb, sinfo.ads (N_Contract): new kind of node used as
970 indirection between an entry or [generic] subprogram entity and its
971 pre/post + test-cases.
972 (Spec_PPC_List, Spec_TC_List, Set_Spec_PPC_List, Set_Spec_TC_List):
973 get/set for fields of an N_Contract node.
974 * snames.ads-tmpl (Name_Test_Case, Name_Ensures, Name_Mode,
975 Name_Normal, Name_Requires, Name_Robustness, Pragma_Test_Case): new
976 names and pragma for Test_Case.
977 * sprint.adb (Sprint_Node): raise Program_Error on N_Contract node
978
6a2e5d0f
AC
9792011-08-04 Vincent Celier <celier@adacore.com>
980
981 * gnat_ugn.texi: Improve documentation of gnatmake switch
982 --source-info-file=.
983
9842011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
985
986 * exp_ch7.adb (Make_Final_Call): Add local variable Atyp (assertion
987 type). Initialize Atyp to the appropriate type which is later checked
988 for completion. Rewrite the assertion associated with private type
989 completion.
990
9912011-08-04 Ed Falis <falis@adacore.com>
992
993 * adaint.c: Add call to vxCpuConfiguredGet for VxWorks SMP to
994 initialize the number of CPUs.
995
9962011-08-04 Ed Schonberg <schonberg@adacore.com>
997
998 * sem_type.adb (Disambiguate): New subsidiary routine
999 In_Same_Declaration_List, to implement AI05-0020: a user-defined
1000 equality on an anonymous access type whose designated type is private
1001 does not lead to an ambiguity with the universal access equality
1002 operator in the body or child units of the defining package. The same
1003 is true for a multiplication operator on a private type completed with
1004 a fixed-point-type.
1005
10062011-08-04 Javier Miranda <miranda@adacore.com>
1007
1008 * opt.ads (Init_Or_Norm_Scalars_Config): Removed.
1009 (Normalize_Scalars_Config): Removed.
1010 * opt.adb
1011 (Register_Opt_Config_Switches): Remove registering config values of
1012 Init_Or_Norm_Scalars_Config and Normalize_Scalars_Config.
1013 (Restore_Opt_Config_Switches): Remove code which restores the values of
1014 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1015 Init_Or_Norm_Scalars.
1016 (Save_Opt_Config_Switches): Remove code which saves values of
1017 Init_Or_Norm_Scalars and Normalize_Scalars.
1018 (Set_Opt_Config_Switches): Remove code which restores config values of
1019 Init_Or_Norm_Scalars and Normalize_Scalars. Recalculate value of
1020 Init_Or_Norm_Scalars.
1021
10222011-08-04 Yannick Moy <moy@adacore.com>
1023
1024 * frontend.adb (Frontend): remove previous patch to avoid full
1025 qualification in ALFA mode.
1026 * lib-xref-alfa.adb (Add_ALFA_Xrefs): use unique name for variables.
1027 * sem_util.adb, sem_util.ads (Unique_Name): new function to define a
1028 unique name for an entity, which could be used to identify the entity
1029 across compilation units.
1030
10312011-08-04 Thomas Quinot <quinot@adacore.com>
1032
1033 * prj-env.adb
1034 (Initialize_Default_Project_Path): Add target specific directory
1035 ($prefix/$target/lib/gnat) in front of project path in all cases
1036 (making gnatmake's behaviour consistent with gprbuild).
1037 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb:
1038 Pass target name from Sdefault to project subsystem.
1039 * gnatls.adb: Show new target specific default project directory.
1040
10412011-08-04 Johannes Kanig <kanig@adacore.com>
1042
1043 * cstand.adb: Add Information to Identifier in Standard
1044 (Identifer_For): Set Entity to the corresponding entity
1045
483361a6
AC
10462011-08-04 Sergey Rybin <rybin@adacore.com>
1047
1048 * gnat_ugn.texi: Update doc on gnatcheck.
1049
10502011-08-04 Yannick Moy <moy@adacore.com>
1051
1052 * lib-xref-alfa.adb (Add_ALFA_Xrefs): correct definition of ranges of
1053 xrefs in a scope.
1054
10552011-08-04 Yannick Moy <moy@adacore.com>
1056
1057 * exp_prag.adb (Expand_Pragma_Check): in ALFA mode, return without
1058 performing expansion.
1059 * sem_ch6.adb (Analyze_Subprogram_Body_Helper,
1060 Analyze_Generic_Subprogram_Body): protect call to Process_PCCs so that
1061 it is not called in ALFA mode.
1062
ef5569c6
AC
10632011-08-04 Emmanuel Briot <briot@adacore.com>
1064
1065 * make.adb, osint.adb, osint.ads (Reset_Command_Line_Files): not used
1066 after all, so removed.
1067
10682011-08-04 Sergey Rybin <rybin@adacore.com>
1069
1070 * vms_data.ads: Add missing VMS qualifiers.
1071
1ab4a286
EB
10722011-08-04 Emmanuel Briot <briot@adacore.com>
1073
1074 * make.adb, makeutl.adb, osint.adb, osint.ads (Check_Mains): rebuild
1075 the list of files on the command line after processing it through
1076 Complete_Mains.
1077
7ae0d98c
AC
10782011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1079
1080 * exp_ch7.adb (Build_Raise_Statement): Remove the specialized
1081 processing for .NET/JVM. These targets can now benefit from
1082 Raise_From_Controlled_Operation and they share the same processing with
1083 standard targets.
1084 (Establish_Transient_Scope): Remove the restriction for .NET/JVM.
1085 These targets need transient scopes in order to properly finalize short
1086 lived controlled objects.
1087 (Make_Handler_For_Ctrl_Operation): Remove the specialized processing for
1088 NET/JVM. These targets can now benefit from
1089 Raise_From_Controlled_Operation and they share the same processing with
1090 standard targets.
1091
10922011-08-04 Geert Bosch <bosch@adacore.com>
1093
1094 * tracebak.c (STOP_FRAME): Stop at any next pointer outside the stack
1095
10962011-08-04 Ed Schonberg <schonberg@adacore.com>
1097
1098 * exp_aggr.adb (Has_Visible_Private_Ancestor): subsidiary routine to
1099 Expand_Record_Aggregate, to determine whether aggregate must be
1100 expanded into assignments. This is the case if the ancestor part is
1101 private, regarless of the setting of the flag Has_Private_Ancestor.
1102
11032011-08-04 Ed Falis <falis@adacore.com>
1104
1105 * vxaddr2line.adb: Add support for e500v2 and for Linux hosts
1106
11072011-08-04 Bob Duff <duff@adacore.com>
1108
1109 * sinfo.ads: Fix comment.
1110
11112011-08-04 Steve Baird <baird@adacore.com>
1112
1113 * bindgen.adb (Get_Ada_Main_Name): If CodePeer_Mode is set, then
1114 choose a package name in much the same way as is
1115 done for JGNAT when VM_Target /= No_VM, except that
1116 a slightly more distinctive prefix string is used.
1117
11182011-08-04 Emmanuel Briot <briot@adacore.com>
1119
1120 * makeutl.adb (Complete_Mains): no longer accept unit names on the
1121 gnatmake command line.
1122 This behavior was never documented (and was supported only because of
1123 an early bug in the code). This case might lead to ambiguous cases
1124 (between unit names and truncated base names without suffixes).
1125
87729e5a
AC
11262011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1127
1128 * a-tags.ads, a-tags.adb (Unregister_Tag): New routine.
1129 Remove the external tag of a tagged type from the internal hash table.
1130 * exp_ch7.adb (Build_Cleanup_Statements): Update the comment on the
1131 expanded usage of the routine. Strenghten the check for Is_Master. Add
1132 processing for tagged types.
1133 (Build_Finalizer): Create all the necessary lists used in finalizer
1134 creation when the processed context is a package that may contain
1135 tagged types.
1136 (Expand_Cleanup_Actions): Rename the call to Has_Controlled_Objects to
1137 Requires_Cleanup_Actions.
1138 (Expand_N_Package_Body): Package bodies may need clean up code
1139 depending on whether they contain tagged types.
1140 (Expand_N_Package_Declaration): Package declarations may need clean up
1141 code depending on whether they contain tagged types.
1142 (Unregister_Tagged_Types): New routine. Search through a list of
1143 declarations or statements, looking for non-abstract Ada tagged types.
1144 For each such type, generate code to unregister the external tag.
1145 * exp_util.adb (Has_Controlled_Objects (Node_Id)): Renamed to
1146 Requires_Cleanup_Actions.
1147 (Requires_Cleanup_Actions (List_Id, Boolean)): New routine. Search
1148 through a list of declarations or statements looking for non-abstract
1149 Ada tagged types or controlled objects.
1150 * exp_util.ads (Has_Controlled_Objects (Node_Id)): Renamed to
1151 Requires_Cleanup_Actions.
1152 (Has_Controlled_Objects (List_Id, Boolean)): Removed.
1153 * rtsfind.ads: Add entry RE_Unregister_Tag to tables RE_Id and
1154 RE_Unit_Table.
1155
11562011-08-04 Vincent Celier <celier@adacore.com>
1157
1158 * prj-env.adb (For_All_Source_Dirs.For_Project): Check if project Prj
1159 has Ada sources, not project Project, because if the root project
1160 Project has no sources of its own, all projects will be deemed without
1161 sources.
1162
11632011-08-04 Gary Dismukes <dismukes@adacore.com>
1164
1165 * bindgen.adb (Gen_Adainit_Ada): Move the generation of the declaration
1166 of the No_Param_Proc acc-to-subp type used for initialization of
1167 __gnat_finalize_library_objects so that it's declared at library level
1168 rather than nested inside of the adainit routine.
1169
11702011-08-04 Javier Miranda <miranda@adacore.com>
1171
1172 * exp_disp.adb (Make_DT): Generate code to check the external tag ONLY
1173 if the tagged type has a representation clause which specifies its
1174 external tag.
1175
11762011-08-04 Ed Schonberg <schonberg@adacore.com>
1177
1178 * einfo.ads, einfo.adb (Has_Private_Ancestor): now a flag on types.
1179 Remove previous procedure with that name.
1180 * sem_ch3.adb (Build_Derived_Record_Type): set Has_Private_Ancestor
1181 when appropriate.
1182 * sem_aggr.adb (Resolve_Extension_Aggregate): if the ancestor part is a
1183 subtype mark, the ancestor cannot have unknown discriminants.
1184 (Resolve_Record_Aggregate): if the type has invisible components
1185 because of a private ancestor, the aggregate is illegal.
1186
11872011-08-04 Vincent Celier <celier@adacore.com>
1188
1189 * switch-m.adb (Normalize_Compiler_Switches): Recognize and take into
1190 account switches -gnat2005, -gnat12 and -gnat2012.
1191
11922011-08-04 Bob Duff <duff@adacore.com>
1193
1194 * s-tasdeb.ads: Minor comment fix.
1195
11962011-08-04 Arnaud Charlet <charlet@adacore.com>
1197
1198 * gnatlink.adb (Gnatlink): Pass -gnat83/95/05/12 switch to gcc in
1199 CodePeer mode.
1200 * switch.ads, switch.adb (Is_Language_Switch): New function.
1201
12022011-08-04 Vincent Celier <celier@adacore.com>
1203
1204 * switch-c.adb: Minor comment addition.
1205
12062011-08-04 Vincent Celier <celier@adacore.com>
1207
1208 * vms_conv.adb (Process_Argument): Fail graciously when qualifier
1209 ending with '=' is followed by a space (missing file name).
1210
12112011-08-04 Pascal Obry <obry@adacore.com>
1212
1213 * g-regist.ads: Fix size of HKEY on x86_64-windows.
1214
12152011-08-04 Ed Schonberg <schonberg@adacore.com>
1216
1217 * sem_ch12.adb (Analyze_Associations): New routine
1218 Check_Overloaded_Formal_Subprogram to reject a formal package when
1219 there is a named association or a box initialisation for an overloaded
1220 formal subprogram of the corresponding generic.
1221
12222011-08-04 Yannick Moy <moy@adacore.com>
1223
1224 * alfa.ads (ALFA_Xref_Record): add component for type of entity
1225 * get_alfa.adb, put_alfa.adb: Read and write new component of
1226 cross-reference.
1227 * lib-xref-alfa.adb (Collect_ALFA): generate new component.
1228
88f47280
AC
12292011-08-04 Pascal Obry <obry@adacore.com>
1230
1231 * urealp.adb: Minor reformatting.
1232
12332011-08-04 Tristan Gingold <gingold@adacore.com>
1234
1235 * exp_ch7.adb (build_finalizer.process_declarations.processing_actions):
1236 Handle the case when Cleanup_Protected_Object returns Empty.
1237
12382011-08-04 Yannick Moy <moy@adacore.com>
1239
1240 * frontend.adb (Frontend): only qualify names in non-ALFA mode
1241
12422011-08-04 Ed Schonberg <schonberg@adacore.com>
1243
1244 * sem_ch4.adb (Try_Class_Wide_Operation): if the context is a procedure
1245 call, ignore functions.
1246
05c53a69
GB
12472011-08-04 Geert Bosch <bosch@adacore.com>
1248
1249 * urealp.adb (Equivalent_Decimal_Exponent): Avoid the use of floating
1250 point.
1251
23cc1ace
EB
12522011-08-04 Emmanuel Briot <briot@adacore.com>
1253
1254 * makeutl.adb (Compute_Builder_Switches): no longer accept a unit name
1255 as an index for Builder'Switches. This conforms to the documentation.
1256 * make.adb (Insert_Project_Sources): avoid duplicate code
1257
cef14201
AC
12582011-08-04 Emmanuel Briot <briot@adacore.com>
1259
1260 * makeutl.adb (Complete_Mains): if the user has passed a relative file
1261 name on the command line (for instance "../dummy"), never assume it can
1262 be a unit name.
1263
12642011-08-04 Tristan Gingold <gingold@adacore.com>
1265
1266 * bindgen.adb: Remove code the reference or create the
1267 Break_Start/__gnat_break_start procedure.
1268 * s-stalib.adb (Break_Start): Removed.
1269
e2fee30d
EB
12702011-08-04 Emmanuel Briot <briot@adacore.com>
1271
1272 * make.adb, makeutl.adb, makeutl.ads (Compute_Builder_Switches): now
1273 shared with gprbuild.
1274
2d395256
AC
12752011-08-04 Yannick Moy <moy@adacore.com>
1276
1277 * par-ch4.adb (P_Primary): preferentially issue an error message about
1278 a missing parenthesis arount a conditional or case expression in Ada
1279 2012 mode, if we detect that the alignment is not correct for a
1280 statement.
1281
12822011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1283
1284 * exp_ch7.adb (Process_Declarations): Do not consider the result of a
1285 tag-to-class-wide conversion as needing finalization actions.
1286 * exp_util.adb (Has_Controlled_Objects): Do not consider the result of
1287 a tag-to-class-wide conversion as needing finalization actions.
1288 (Is_Finalizable_Transient): The result of a tag-to-class-wide
1289 conversion does not need finalization actions.
1290 (Is_Tag_To_CW_Conversion): New routine.
1291 * exp_util.ads (Is_Tag_To_CW_Conversion): New routine. Determines
1292 whether an object is the result of a tag-to-class-wide conversion.
1293
12942011-08-04 Yannick Moy <moy@adacore.com>
1295
1296 * sem_ch13.adb (Analyze_Aspect_Specifications): correct order in which
1297 the left-hand-side and right-hand-side of a conjunct are inserted when
1298 translating a pre- or postcondition
1299 * sem_ch6.adb: Correct typo in comment
1300
13012011-08-04 Ed Schonberg <schonberg@adacore.com>
1302
1303 * gnat_rm.texi: Ravenscar does not prohibit dependence on
1304 Unchecked_Conversion and Unchecked_Deallocation.
1305
13062011-08-04 Thomas Quinot <quinot@adacore.com>
1307
1308 * make.adb: Minor reformatting.
1309
767ab2fd
EB
13102011-08-04 Emmanuel Briot <briot@adacore.com>
1311
1312 * prj.adb, prj.ads, makeutl.adb (Complete_Mains): search for the
1313 sources in the project and its imported projects, but not in the whole
1314 tree.
1315
8fb3f5df
AC
13162011-08-04 Emmanuel Briot <briot@adacore.com>
1317
1318 * make.adb: Remove debug trace.
1319
13202011-08-04 Vincent Celier <celier@adacore.com>
1321
1322 * makeutl.adb (Do_Complete): Get the absolute path name of a relative
1323 path in canonical form, to be able to compare path names on platforms
1324 such as Windows or Darwin.
1325
13262011-08-04 Thomas Quinot <quinot@adacore.com>
1327
1328 * par_sco.adb (Traverse_Declarations_Or_Statements.Set_Statement_Entry):
1329 For a pragma (statement with C1 = 'P'), record the sloc of the pragma.
1330 * scos.ads: Update documentation accordingly.
1331 * put_scos.adb (Output_SCO_Line): Omit statement SCOs for disabled
1332 pragmas.
1333
9515740f
AC
13342011-08-04 Ed Schonberg <schonberg@adacore.com>
1335
1336 * sem_attr.adb (Bad_Attribute_For_Predicate): flag illegal use of
1337 attribute only if prefix type is scalar.
1338
13392011-08-04 Emmanuel Briot <briot@adacore.com>
1340
1341 * make.adb, makeutl.adb, prj-env.adb (Check_Mains): put back support
1342 in gnatmake for specifying mains on the command line that do not belong
1343 to the main project. These mains must currently all belong to the same
1344 project, though.
1345 (Ultimate_Extension_Of): removed, since duplicated
1346 Ultimate_Extending_Project.
1347
92966893
AC
13482011-08-04 Arnaud Charlet <charlet@adacore.com>
1349
1350 * make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
1351 instead.
1352 (CodePeer_Mode_String): New.
1353 (Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
1354 CodePeer mode.
1355 (Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
1356 * bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
1357 mode, since no useful elaboration subprogram is needed by CodePeer.
1358 * gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
1359 In this mode, compile binder file with -gnatC and do stop after this
1360 step.
1361
13622011-08-04 Vincent Celier <celier@adacore.com>
1363
1364 * exp_ch7.adb: Minor comment fix.
1365
5969611f
RD
13662011-08-04 Robert Dewar <dewar@adacore.com>
1367
1368 * exp_ch7.adb, make.adb, sem_ch10.adb, bindgen.adb, sem_res.adb,
1369 exp_ch4.adb, makeutl.adb: Minor reformatting.
1370
6367dd30
AC
13712011-08-04 Emmanuel Briot <briot@adacore.com>
1372
1373 * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring.
1374 Create several new subprograms to move code out of Make. This makes the
1375 code more readable, removes code duplication, and is a preparation work
1376 for adding support for aggregate projects.
1377
13782011-08-04 Tristan Gingold <gingold@adacore.com>
1379
1380 * s-po32gl.ads, s-po32gl.adb: New files.
1381 * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function.
1382 * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function.
1383 (Build_Finalization_Collection): Use it.
1384 * exp_ch4.adb (Complete_Controlled_Allocation): Ditto.
1385 * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New
1386 literals.
1387 * gcc-interface/Makefile.in: Use s-po32gl.o on VMS.
1388 * gcc-interface/Make-lang.in: Update dependencies.
1389
cd8bfe35
EB
13902011-08-04 Emmanuel Briot <briot@adacore.com>
1391
1392 * makeutl.adb (Complete_Mains): add support for specs with no suffix on
1393 the command line.
1394
7db29ea7
EB
13952011-08-04 Emmanuel Briot <briot@adacore.com>
1396
1397 * make.adb, makeutl.adb (Complete_Mains): if a main specified on the
1398 command line is not a file name, also check whether it could be a unit
1399 name.
1400
d9b056ea
AC
14012011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1402
1403 * bindgen.adb (Gen_Finalize_Library_Ada): Factor out code to generate
1404 the header of the finalization routine.
1405 If the unit has no finalizer but is a body whose spec has one, then
1406 generate the decrement of the elaboration entity only.
1407 If the unit has a finalizer and is a spec, then do not generate the
1408 decrement of the elaboration entity.
1409 (Gen_Finalize_Library_C): Likewise.
1410
14112011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1412
1413 * exp_ch7.adb (Alignment_Of): New subsidiary routine.
1414 (Bounds_Size_Expression): Removed.
1415 (Double_Alignment_Of): New subsidiary routine.
1416 (Make_Finalize_Address_Stmts): New local variable Index_Typ. Account
1417 for a hole in the dope vector of unconstrained arrays due to different
1418 index and element alignments.
1419
14202011-08-04 Ed Schonberg <schonberg@adacore.com>
1421
1422 * sem_res.adb (Resolve_Allocator): diagnose task allocator that will
1423 raise program_error because body has not been seen yet.
1424
14252011-08-04 Ed Schonberg <schonberg@adacore.com>
1426
1427 * sem_ch10.adb (Analyze_With_Clause): Protect against child unit with
1428 an unresolved name.
1429
14302011-08-04 Vincent Celier <celier@adacore.com>
1431
1432 * makeutl.adb (Do_Complete): Check absolute paths in canonical forms
1433
14342011-08-04 Yannick Moy <moy@adacore.com>
1435
1436 * alfa.adb, alfa.ads (Unique_Defining_Entity): move function from here
1437 * sem_util.adb, sem_util.ads (Unique_Defining_Entity): ...to here
1438
14392011-08-04 Thomas Quinot <quinot@adacore.com>
1440
1441 * sem_ch12.adb (Analyze_Package_Instantiation): Do not omit body for
1442 instantiation in RCI.
1443
14442011-08-04 Emmanuel Briot <briot@adacore.com>
1445
1446 * make.adb: Share more code with gprbuild
1447
f5fc5b9d
AC
14482011-08-04 Emmanuel Briot <briot@adacore.com>
1449
1450 * projects.texi: Added documentation for the IDE'Gnat project file
1451 attribute.
1452
14532011-08-04 Nicolas Roche <roche@adacore.com>
1454
1455 * gnat_rm.texi: Minor editing.
1456
14572011-08-04 Javier Miranda <miranda@adacore.com>
1458
1459 * bindgen.adb (Gen_Adafinal_Ada): Do not differentiate the main case
1460 and the library case for VM targets.
1461 (Gen_Adainit_Ada): Likewise.
1462
14632011-08-04 Robert Dewar <dewar@adacore.com>
1464
1465 * g-altive.ads: Minor comment updates.
1466 * prj-nmsc.adb: Minor reformatting.
1467
14682011-08-04 Javier Miranda <miranda@adacore.com>
1469
1470 * opt.ads
1471 (Normalize_Scalars_Config): Value of the configuration switch set by
1472 pragma Normalize_Scalars when it appears in the gnat.adc file.
1473 (Normalize_Scalars): New field for record Config_Switches_Type. Used
1474 to save and restore settings of this pragma.
1475 * opt.adb
1476 (Register_Opt_Config_Switches, Save_Opt_Config_Switches,
1477 Restore_Opt_Config_Switches): Add missing support for Normalize_Scalars.
1478
14792011-08-04 Vincent Celier <celier@adacore.com>
1480
1481 * gnat_ugn.texi: Document gnatlink options -M and -M=mapfile
1482
0c4683cf
AC
14832011-08-04 Arnaud Charlet <charlet@adacore.com>
1484
1485 * makeutl.adb: Minor reformatting.
1486
14872011-08-04 Olivier Hainque <hainque@adacore.com>
1488
1489 * g-altive.ads: Update comments to reflect that only the soft
1490 binding is available today.
1491
2598ee6d
RD
14922011-08-04 Robert Dewar <dewar@adacore.com>
1493
1494 * bindgen.adb, einfo.adb, sem_ch12.adb, s-tasren.adb, sem_res.adb,
1495 makeutl.adb, prj-nmsc.adb, opt.ads, prj-env.adb: Minor reformatting
1496 * gcc-interface/Make-lang.in: Update dependencies.
1497
c2db4b32
AC
14982011-08-04 Arnaud Charlet <charlet@adacore.com>
1499
1500 * prj-env.adb: Remove local debug traces.
1501
15022011-08-04 Yannick Moy <moy@adacore.com>
1503
1504 * checks.adb (Apply_Float_Conversion_Check): correct a typo where Lo_OK
1505 was used instead of Hi_OK, which could cause a read of an uninitialized
1506 value later on. Detected while working on the new warning.
1507 * exp_ch9.adb (Expand_N_Entry_Declaration): remove useless assignment
1508 to local variable.
1509 * sem_ch5.adb (Analyze_Assignment): set the last assignment component
1510 in more cases, in order to detect more unreferenced values.
1511 * sem_util.adb, sem_util.ads (Get_Enclosing_Object): return enclosing
1512 object for expression, if any.
1513
15142011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1515
1516 * exp_intr.adb (Expand_Binary_Operator_Call): Look at the RM size of
1517 the operand types instead of the Esize.
1518
15192011-08-04 Steve Baird <baird@adacore.com>
1520
1521 * switch-b.adb (Scan_Binder_Switches): Add -P binder switch, used to
1522 enable CodePeer_Mode.
1523 * bindusg.adb (Display): Add help message describing -P binder switch.
1524 * gnat_ugn.texi: Document -P binder switch.
1525 * bindgen.adb (Gen_Main_Ada): If CodePeer_Mode is set, then call the
1526 user-defined main program directly.
1527 (Gen_Output_File_Ada): If CodePeer_Mode is set, generate a with of the
1528 user-defined main program in the context clause of the package body.
1529
ad05f2e9
AC
15302011-08-04 Yannick Moy <moy@adacore.com>
1531
1532 * alfa.adb, alfa.ads (Get_Entity_For_Decl): remove function, partial
1533 duplicate of Defining_Entity
1534 (Get_Unique_Entity_For_Decl): rename function into
1535 Unique_Defining_Entity
1536 * einfo.adb, einfo.ads (Is_In_ALFA, Body_Is_In_ALFA): remove flags
1537 (Formal_Proof_On): remove synthesized flag
1538 * cstand.adb, sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1539 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_res.adb, sem_util.adb,
1540 sem_util.ads, stand.ads: Remove treatment associated to entities in ALFA
1541 * sem_prag.adb (Analyze_Pragma): remove special treatment for pragma
1542 Annotate (Formal_Proof)
1543
15442011-08-04 Emmanuel Briot <briot@adacore.com>
1545
1546 * prj-env.adb (Create_Config_Pragmas_File): fix handling of multi-unit
1547 source files with non-standard naming schemes, in imported projects
1548
756ef2a0
AC
15492011-08-04 Emmanuel Briot <briot@adacore.com>
1550
1551 * makeutl.adb (Complete_Mains): when a multi-unit source file is
1552 specified on the gprbuild command line, we need to compile all units
1553 within that file, not just the first one we find
1554 Fix error message for mains that are not found.
1555
15562011-08-04 Thomas Quinot <quinot@adacore.com>
1557
1558 * sem_ch6.adb: Update comment.
1559 * sem_ch12.adb: Minor reformatting.
1560
15612011-08-04 Bob Duff <duff@adacore.com>
1562
1563 * s-tasren.adb (Task_Do_Or_Queue): Previous code was reading
1564 Acceptor.Terminate_Alternative without locking Acceptor, which causes a
1565 race condition whose symptom is to fail to lock Parent. That, in turn,
1566 causes Parent.Awake_Count to be accessed without locking Parent, which
1567 causes another race condition whose symptom is that Parent.Awake_Count
1568 can be off by 1 (either too high or too low). The solution is to lock
1569 Parent unconditionally, and then lock Acceptor, before reading
1570 Acceptor.Terminate_Alternative.
1571
4fdebd93
AC
15722011-08-04 Arnaud Charlet <charlet@adacore.com>
1573
1574 * debug.adb: Update comment.
1575
15762011-08-04 Robert Dewar <dewar@adacore.com>
1577
1578 * par_sco.adb, exp_util.adb, make.adb, a-tags.adb, sem_prag.adb,
1579 sem_util.adb, sem_attr.adb, exp_ch4.adb, g-comlin.adb, g-comlin.ads,
1580 exp_ch6.adb: Minor reformatting.
1581
15822011-08-04 Gary Dismukes <dismukes@adacore.com>
1583
1584 * gnat_ugn.texi: Add sentence about the case of compile-time-detected
1585 checks for -gnateE.
1586
15872011-08-04 Ed Schonberg <schonberg@adacore.com>
1588
1589 * gnat_rm.texi: update Ravenscar desription to reflect Ada2012 RM.
1590
15912011-08-04 Thomas Quinot <quinot@adacore.com>
1592
1593 * sinfo.ads: Minor reformatting.
1594
15952011-08-04 Emmanuel Briot <briot@adacore.com>
1596
1597 * makeutl.adb, makeutl.ads, prj-nmsc.adb (Complete_Mains): report error
1598 even if there is no location.
1599
6aaa0587
ES
16002011-08-04 Ed Schonberg <schonberg@adacore.com>
1601
1602 * sem_res.adb, sem_ch4.adb: move check for restriction
1603 No_Task_Hierarchy to resolve_allocator.
1604
35a1c212
AC
16052011-08-04 Thomas Quinot <quinot@adacore.com>
1606
1607 * sinfo.adb, sinfo.ads, sem_prag.adb, sem_ch12.adb (Pragma_Enabled):
1608 This flag of N_Pragma nodes is not used, remove it as well as all of
1609 the associated circuitry.
1610
16112011-08-04 Javier Miranda <miranda@adacore.com>
1612
1613 * exp_disp.adb (Make_DT): Switch -gnatdQ disables the generation of the
1614 runtime check on duplicated externa tags
1615 * debug.adb Document switch -gnatdQ.
1616
16172011-08-04 Gary Dismukes <dismukes@adacore.com>
1618
1619 * a-fihema.ads: Minor typo fix.
1620
16212011-08-04 Yannick Moy <moy@adacore.com>
1622
1623 * sem_ch10.adb: Minor comment update.
1624
16252011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1626
1627 * einfo.adb: Update the node field usage to reflect the renaming of
1628 Return_Flag to Return_ Flag_Or_Transient_Decl.
1629 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl.
1630 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl.
1631 (Write_Field15_Name): Change Return_Flag to
1632 Return_Flag_Or_Transient_Decl.
1633 * einfo.ads: Rename node field Return_Flag to
1634 Return_Flag_Or_Transient_Decl. Update the associated comment and all
1635 occurrences in entities.
1636 (Return_Flag): Renamed to Return_Flag_Or_Transient_Decl. Update
1637 associated Inline pragma.
1638 (Set_Return_Flag): Renamed to Set_Return_Flag_Or_Transient_Decl. Update
1639 associated Inline pragma.
1640 * exp_ch4.ads, exp_ch4.adb (Expand_N_Expression_With_Actions): New
1641 routine.
1642 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Update the calls to
1643 Return_Flag and Set_Return_Flag.
1644 * exp_ch7.adb (Process_Declarations): Add code to recognize hook
1645 objects generated for controlled transients declared inside an
1646 Exception_With_Actions. Update the calls to Return_Flag.
1647 (Process_Object_Declaration): Add code to add a null guard for hook
1648 objects generated for controlled transients declared inside an
1649 Exception_With_Actions. Update related comment.
1650 * exp_util.adb (Has_Controlled_Objects): Add code to recognize hook
1651 objects generated for controlled transients declared inside an
1652 Exception_With_Actions. Update the calls to Return_Flag.
1653 * expander.adb (Expand): Add new case for N_Expression_With_Actions.
1654
16552011-08-04 Ed Schonberg <schonberg@adacore.com>
1656
1657 * sem_util.adb:(Wrong_Type): Improve error message on a one-element
1658 positional aggregate.
1659
16602011-08-04 Vincent Celier <celier@adacore.com>
1661
1662 * par_sco.adb (Process_Decisions.Output_Header): Check and record pragma
1663 SLOC only for pragmas.
1664
16652011-08-04 Emmanuel Briot <briot@adacore.com>
1666
1667 * projects.texi: Minor typo fix.
1668
16692011-08-04 Emmanuel Briot <briot@adacore.com>
1670
1671 * prj-nmsc.adb (Check_File): Minor change to traces, to help debugging
1672 on case-sensitive file systems.
1673
c2873f74
TQ
16742011-08-04 Thomas Quinot <quinot@adacore.com>
1675
1676 * put_scos.adb (Put_SCOs): Do not emit decision SCO for an X decision
1677 nested in a disabled pragma.
1678 * scos.ads, scos.adb, par_sco.ads, par_sco.adb: Record sloc of
1679 enclosing pragma, if any, for X decisions.
1680
16812011-08-04 Thomas Quinot <quinot@adacore.com>
1682
1683 * sem_prag.adb: Minor reformatting.
1684
46414266
VC
16852011-08-04 Vincent Celier <celier@adacore.com>
1686
1687 * a-tags.adb (Check_TSD): Avoid concatenation of strings, as it is not
1688 allowed in no run time mode.
1689
16902011-08-04 Vincent Celier <celier@adacore.com>
1691
1692 * make.adb (Check): When -gnatc is used, check for the source file
1693 inside the ALI file with a canonical case file name.
1694
afab164f
EB
16952011-08-04 Emmanuel Briot <briot@adacore.com>
1696
1697 * g-comlin.adb, g-comlin.ads (Add_Switch): Put back support for
1698 overriding the separator.
1699
fe0ec02f
AC
17002011-08-04 Robert Dewar <dewar@adacore.com>
1701
1702 * sem_aggr.adb, par_sco.adb, sem_type.adb, exp_util.adb, exp_ch9.adb,
1703 prj-nmsc.adb, sem_ch13.adb, exp_strm.adb: Minor reformatting.
1704
17052011-08-04 Robert Dewar <dewar@adacore.com>
1706
1707 * gnat_rm.texi: Minor documentation fix for pragma Annotate.
1708
17092011-08-04 Yannick Moy <moy@adacore.com>
1710
1711 * sem_attr.adb (Analyze_Attribute): add check during pre-analysis that
1712 'Result only appears in postcondition of function.
1713
17142011-08-04 Thomas Quinot <quinot@adacore.com>
1715
1716 * a-tags.adb (Check_TSD): When raising PROGRAM_ERROR for a duplicated
1717 external tag, include the value of the external tag in the exception
1718 message.
1719
0180fd26
AC
17202011-08-04 Yannick Moy <moy@adacore.com>
1721
1722 * sem_attr.adb (Result): modify error message for misplaced 'Result
1723
17242011-08-04 Sergey Rybin <rybin@adacore.com>
1725
1726 * gnat_rm.texi (pragma Annotate): Fix syntax description to make it
1727 clear that the second argument must be an identifier.
1728
17292011-08-04 Thomas Quinot <quinot@adacore.com>
1730
1731 * exp_ch9.adb (Build_Barrier_Function): When compiling with
1732 -fpreserve-control-flow, insert an IF statement on the barrier
1733 condition to ensure that a conditional branch instruction is generated.
1734
17352011-08-04 Emmanuel Briot <briot@adacore.com>
1736
1737 * prj-part.adb, prj.adb, prj.ads, prj-tree.ads
1738 (Processing_Flags.Ignore_Missing_With): new flag.
1739
17402011-08-04 Emmanuel Briot <briot@adacore.com>
1741
1742 * prj-nmsc.adb (Find_Sources, Path_Name_Of): Fix handling of
1743 Source_List_File on case-insensitive systems where the file is actually
1744 on a case-sensitive file system (NFS,...).
1745
17462011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1747
1748 * sem_ch6.adb (Analyze_Function_Return): In a rare case where a
1749 function return contains a controlled [extension] aggregate and the
1750 return statement is not part of a handled sequence of statements, wrap
1751 the return in a block. This ensures that all controlled temporaries
1752 generated during aggregate resolution will be picked up by the
1753 finalization machinery.
1754
17552011-08-04 Ed Schonberg <schonberg@adacore.com>
1756
1757 * sem_aggr.adb (Resolve_Aggregate): If aggregate has box-initialized
1758 components, freeze type before resolution, to ensure that default
1759 initializations are present for all components.
1760 * sem_res.adb (Resolve_Actuals): the designated object of an
1761 accces-to-constant type is a legal actual in a call to an
1762 initialization procedure.
1763
17642011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1765
1766 * exp_util.adb (Extract_Renamed_Object): Add N_Type_Conversion and
1767 N_Unchecked_Type_Conversion to the possible containers of a renamed
1768 transient variable.
1769
78efd712
AC
17702011-08-04 Yannick Moy <moy@adacore.com>
1771
1772 * par-ch13.adb (Aspect_Specifications_Present): recognize
1773 "with Identifier'Class =>" as an aspect, so that a meaningful warning
1774 is issued in Strict mode.
1775 * par.adb: Fix typos in comments.
1776
17772011-08-04 Yannick Moy <moy@adacore.com>
1778
1779 * sem_attr.adb (Result): modify error message to take into account Post
1780 aspect when compiling Ada 2012 (or newer) code.
1781
17822011-08-04 Nicolas Roche <roche@adacore.com>
1783
1784 * env.c (__gnat_clearenv): Avoid use of dynamic size array in order to
2c7f9cc0 1785 remove need for GCC exceptions.
78efd712
AC
1786
17872011-08-04 Vincent Celier <celier@adacore.com>
1788
1789 * makeutl.adb (Do_Complete): Call Debug_Output with the name of the
1790 project, not the source file name.
1791 * prj.adb (Find_Sources.Look_For_Sources): If the source has been
1792 excluded, continue looking. This excluded source will only be returned
1793 if there is no other source with the same base name that is not locally
1794 removed.
1795
17962011-08-04 Ed Schonberg <schonberg@adacore.com>
1797
1798 * sem_res.adb (Resolve_Intrinsic_Operator): if the result type is
1799 private and one of the operands is a real literal, use a qualified
1800 expression rather than a conversion which is not meaningful to the
1801 back-end.
1802
0170a691
AC
18032011-08-04 Yannick Moy <moy@adacore.com>
1804
1805 * sem_ch13.adb (Aspect_Loop): when an aspect X and its classwise
1806 corresponding aspect X'Class are allowed, proceed with analysis of the
1807 aspect instead of skipping it.
1808
18092011-08-04 Tristan Gingold <gingold@adacore.com>
1810
1811 * s-flocon.adb, s-flocon.ads: Add a body for s-flocon.ads
1812 This will allow to have an Ada implementation for the subprogram.
1813
deb4f5ba
ES
18142011-08-04 Ed Schonberg <schonberg@adacore.com>
1815
1816 * sem_ch3.adb (Analyze_Full_Type_Declaration): If the declaration is a
1817 completion and aspects are present, apply them to the entity for the
1818 type which is currently the partial view, but which is the one that
1819 will be frozen.
1820 * sem_ch13.adb (Analyze_Aspect_Specifications): if the predicate
1821 applies to a partial view, indicate that the full view has predicates
1822 and delayed aspects.
1823 (Replace_Type_Reference): Handle properly predicates that apply to the
1824 full view of a private completion.
1825
fc893455
AC
18262011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1827
1828 * layout.adb (Layout_Type): For composite types, do not set Esize.
1829 * freeze.adb (Set_Small_Size): Remove test on alignment and do not
1830 set Esize.
1831 (Size_Known): Look at the RM size of components instead of the Esize.
1832 (Freeze_Record_Type): Look at the RM size instead of the Esize to
1833 issue warning and activate Implicit_Packing.
1834 (Freeze_Entity): Likewise. Do not issue a warning for alias/atomic
1835 if the Esize is not known.
1836 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: Set Esize
1837 for elementary types only.
1838 (Analyze_Record_Representation_Clause): Look at the RM size instead
1839 of the Esize to issue errors.
1840 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not set Esize if it
1841 is not known.
1842 <E_Record_Type>: Look at the RM size instead of the Esize. Remove
2c7f9cc0 1843 obsolete block.
fc893455
AC
1844 Look at the RM size instead of the Esize for types if the latter is
1845 not known.
1846 (gnat_to_gnu_field): Use Known_Esize instead of Known_Static_Esize.
1847
18482011-08-04 Ed Schonberg <schonberg@adacore.com>
1849
1850 * sem_type.adb: proper handling of equality not involving anonymous
1851 access types.
1852
b37d5bc6
AC
18532011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1854
1855 * exp_ch7.adb (Create_Finalizer): Remove local variables Spec_Nod and
1856 Vis_Decls. When creating a library-level finalizer for a package spec,
1857 both the declaration and body of the finalizer are inserted either in
1858 the visible or private declarations of the package spec.
1859
18602011-08-04 Javier Miranda <miranda@adacore.com>
1861
1862 * sem_ch3.adb (Derive_Subprograms): Complete assertion to request the
1863 use of the full-view of a type when invoking Is_Ancestor.
1864 * sem_type.adb (Is_Ancestor): For consistency, when the traversal of
1865 the full-view of private parents is requested, then use also the
1866 full-view of the parent of the first derivation.
1867
7ab4d95a
AC
18682011-08-04 Tristan Gingold <gingold@adacore.com>
1869
1870 * s-taprop-vxworks.adb (Enter_Task): Use System.Float_Control.Reset
1871 instead of the locally imported procedure.
1872 * s-taprop-mingw.adb (Enter_Task): Ditto.
1873 * s-valrea.adb (Scan_Real): Ditto.
1874 * s-imgrea.adb (Set_Image_Real): Ditto.
1875 * s-flocon.ads: Make the package pure.
1876
18772011-08-04 Thomas Quinot <quinot@adacore.com>
1878
1879 * sinfo.ads, sinfo.adb (Debug_Statement, Set_Debug_Statement): Remove.
1880 * tbuild.ads, tbuild.adb (Make_Pragma): Adjust accordingly.
1881 * sinfo-cn.ads, sinfo-cn.adb (Change_Name_To_Procedure_Call_Statement):
1882 New subprogram, moved here from...
1883 * par.adb, par-ch5.adb (P_Statement_Name): ... here.
1884 * par-prag.adb (Par.Prag, case Pragma_Debug): Do not perform any
1885 rewriting of the last argument into a procedure call statement here...
1886 * sem_prag.adb (Analyze_Pragma, case Pragma_Debug): ...do it there
1887 instead.
1888
18892011-08-04 Thomas Quinot <quinot@adacore.com>
1890
1891 * par_sco.adb: Minor reformatting.
1892
51c400f5
AC
18932011-08-04 Robert Dewar <dewar@adacore.com>
1894
1895 * erroutc.adb: Minor reformatting.
1896
18972011-08-04 Thomas Quinot <quinot@adacore.com>
1898
1899 * par_sco.adb: Comment update.
1900
19012011-08-04 Tristan Gingold <gingold@adacore.com>
1902
1903 * s-flocon.ads: New file.
1904 * g-flocon.ads: Now a renaming of s-flocon.
1905 * Makefile.rtl: Add s-flocon.o
1906
6a49f110
AC
19072011-08-04 Javier Miranda <miranda@adacore.com>
1908
1909 * exp_strm.adb (Build_Array_Input_Function): if the array type is
1910 constrained, do not attempt to build a subtype of it.
1911
19122011-08-04 Yannick Moy <moy@adacore.com>
1913
1914 * errout.ads Change comments: remove 'R'M as an example where quotes
1915 are needed; add ALFA as another case where quotes are not needed
1916 * erroutc.adb (Set_Msg_Insertion_Reserved_Word): add ALFA as another
1917 case where quotes are not needed.
1918 * sem_ch11.adb, sem_ch13.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb,
1919 sem_ch5.adb, sem_ch6.adb, sem_ch9.adb, sem_prag.adb, sem_res.adb:
1920 Remove all occurrences of 'A'L'F'A
1921
19222011-08-04 Ed Schonberg <schonberg@adacore.com>
1923
1924 * sem_ch13.adb: check legality of invariant pragma.
1925
a4640a39
AC
19262011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1927
1928 * bindgen.adb: Add comments.
1929
19302011-08-04 Yannick Moy <moy@adacore.com>
1931
1932 * einfo.adb, einfo.ads: Free Flag254 and make Formal_Proof_On a
1933 synthesized flag.
1934 * sem_prag.adb (Analyze_Pragma): record the pragma Annotate
1935 (Formal_Proof, On/Off) in the Rep_Item list of the current subprogram.
1936
19372011-08-04 Robert Dewar <dewar@adacore.com>
1938
1939 * exp_ch7.adb, exp_ch6.adb, sem_ch3.adb, layout.adb, sem_ch5.adb,
1940 osint-c.ads, sem_util.ads, gnat1drv.adb, targparm.ads, sem_ch6.adb,
1941 sem_ch13.adb, s-pooloc.adb: Minor reformatting.
1942
39ade2f9
AC
19432011-08-04 Thomas Quinot <quinot@adacore.com>
1944
1945 * s-pooloc.ads, s-pooglo.ads: Minor reformatting
1946
19472011-08-04 Thomas Quinot <quinot@adacore.com>
1948
1949 PR ada/47880
1950 * s-pooloc.adb (Deallocate): Fix the case of deallocating the only
1951 allocated object.
1952
19532011-08-04 Robert Dewar <dewar@adacore.com>
1954
1955 * einfo.ads, exp_ch4.adb: Minor reformatting.
1956
19572011-08-04 Jerome Lambourg <lambourg@adacore.com>
1958
1959 * back_end.ads (Gen_Or_Update_Object_File): Add more comments.
1960
7efc3f2d
AC
19612011-08-04 Ed Schonberg <schonberg@adacore.com>
1962
1963 * exp_ch4.adb (Expand_Composite_Equality): code cleanup: use component
1964 type in all cases to compute list of primitive operations, because full
1965 view may be an itype that is not attached to the list of declarations.
1966
19672011-08-04 Eric Botcazou <ebotcazou@adacore.com>
1968
1969 * bindgen.adb (Gen_Adafinal_Ada): Generate an early return if the
1970 library has already been finalized.
1971 (Gen_Adafinal_C): Likewise.
1972 (Gen_Adainit_Ada): Generate an early return if the library has
1973 already been elaborated.
1974 (Gen_Adainit_C): Likewise.
1975 (Gen_Output_File_Ada): Generate an elaboration flag.
1976 (Gen_Output_File_C): Likewise.
1977
f65df609
HK
19782011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1979
1980 * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
1981 Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
1982 built in the first place.
1983 (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
1984 for CodePeer because Finalize_Address was not built to begin with.
1985 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
1986
a0fb8fe8
AC
19872011-08-04 Pascal Obry <obry@adacore.com>
1988
1989 * adaint.c (__gnat_tmp_name): Use current process id to create temp
1990 filenames, this ensures unicity of filenames across processes.
1991
19922011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1993
1994 * bindgen.adb (Gen_Finalize_Library_Ada): Rename generated routine
1995 Raise_Controlled to Raise_From_Controlled_Operation. Update the
1996 signature of Raise_From_Controlled_Operation by adding flag From_Abort.
1997 Add False as the actual to From_Abort in the generated call to
1998 Raise_From_Controlled_Operation.
1999
20002011-08-04 Jerome Lambourg <lambourg@adacore.com>
2001
2002 * osint-c.ads, osint-c.adb (Set_Library_Info_Name): Move to declaration
2003 so that the ali file name can be retrieved from outside of this package.
2004 * back_end.ads, back_end.adb (Gen_Or_Update_Object_File): New method
2005 doing nothing in the general case, but used to update the object file
2006 timestamp if directly generated by the backend.
2007 * gnat1drv.adb (Gnat1drv): Make sure the object file's timestamp is set
2008 to a later time than the ali file one.
2009
9534ab17
AC
20102011-08-04 Yannick Moy <moy@adacore.com>
2011
2012 * einfo.adb, einfo.ads (Formal_Proof_On): new flag set on subprogram
2013 entities whose body contains an Annotate pragma which forces formal
2014 proof on this body.
2015 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2016 sem_ch6.adb, sem_ch9.adb, sem_res.adb: Adapt call to
2017 Mark_Non_ALFA_Subprogram to pass in a message and node.
2018 * sem_prag.adb (Analyze_Pragma): add treatment of pragma Annotate
2019 (Forma_Proof, On) which sets the flag Formal_Proof_On in the
2020 surrounding subprogram.
2021 * sem_util.adb, sem_util.ads (Mark_Non_ALFA_Subprogram,
2022 Mark_Non_ALFA_Subprogram_Unconditional): if the subprogram being marked
2023 as not in ALFA is annotated with Formal_Proof being On, then an error
2024 is issued based on the additional parameters for message and node.
2025 * snames.ads-tmpl (Name_Formal_Proof): new name for annotation.
2026 * gcc-interface/Make-lang.in: Update dependencies.
2027
20282011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2029
2030 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Do not generate
2031 Finalize_Address when CodePeer is enabled.
2032
20332011-08-04 Pascal Obry <obry@adacore.com>
2034
2035 * adaint.c (__gnat_tmp_name): Use _tempnam() instead of tempnam() as
2036 the latter returns a pointer to a static buffer which is deallocated
2037 at the end of the routine.
2038
5c0e97dd
AC
20392011-08-04 Yannick Moy <moy@adacore.com>
2040
2041 * sem_ch3.adb (Array_Type_Declaration): move test for type in ALFA
2042 after index creation; mark unconstrained base array type generated as
2043 being in/not in ALFA as well
2044 (Make_Index): mark subtype created as in/not in ALFA
2045 * sem_ch5.adb (Analyze_Iteration_Scheme): mark entity for iterating
2046 over a loop as in/not in ALFA, depending on its type and form of loop
2047 iteration.
2048
20492011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2050
2051 * exp_ch7.adb (Build_Object_Declarations): Initialize flag Abort
2052 directly to False on .NET and JVM.
2053
7a93c64b
YM
20542011-08-04 Yannick Moy <moy@adacore.com>
2055
2056 * sem_ch3.adb (Constrain_Enumeration, Constrain_Integer): remove
2057 constraint that subtype must come from source code to be in ALFA, so
2058 that anonymous subtypes can be in ALFA too.
2059
e9a1ed9b
YM
20602011-08-04 Yannick Moy <moy@adacore.com>
2061
2062 * sem_ch3.adb (Analyze_Object_Declaration): remove obsolete addition of
2063 reference for ALFA mode.
2064 * lib-xref-alfa.adb, lib-xref.ads (Traverse_Compilation_Unit): make
2065 procedure public so as to use it from formal verification back-end.
2066
8e293fbd
AC
20672011-08-04 Jerome Lambourg <lambourg@adacore.com>
2068
2069 * g-comlin.adb (For_Each_Simple_Switch.Is_In_Config): Remove the
2070 invalid checks of the Parameter, making Remove_Switch not working
2071 correctly.
2072
20732011-08-04 Arnaud Charlet <charlet@adacore.com>
2074
2075 * targparm.ads: Update header: no run-time exception is needed on this
2076 file.
2077
20782011-08-04 Vincent Celier <celier@adacore.com>
2079
2080 * a-fihema.adb: Use System.IO instead of GNAT.IO
2081
20822011-08-04 Thomas Quinot <quinot@adacore.com>
2083
2084 * sem_ch3.adb (Access_Definition): Anonymous access to subprogram types
2085 are forbidden in Compiler_Unit mode.
2086
cfae2bed
AC
20872011-08-04 Robert Dewar <dewar@adacore.com>
2088
2089 * sem_util.adb: Minor reformatting.
2090
20912011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2092
2093 * bindgen.adb (Gen_Finalize_Library_Ada): Update the import string for
2094 library-level finalizers.
2095 (Gen_Finalize_Library_C): Update the import string for library-level
2096 finalizers.
2097 (Gen_Finalize_Library_Defs_C): Update the definition name of a
2098 library-level finalizer.
2099 * exp_ch7.adb: Remove with and use clauses for Stringt.
2100 (Create_Finalizer): Remove local variables Conv_Name, Prag_Decl,
2101 Spec_Decl. Add local variable Body_Id. The names of library-level
2102 finalizers are now manually fully qualified and are no longer external.
2103 A single name is now capable of servicing .NET, JVM and non-VM targets.
2104 Pragma Export is no longer required to provide visibility for the name.
2105 (Create_Finalizer_String): Removed.
2106 (New_Finalizer_Name): New routine which mimics New_..._Name.
2107
01f0729a
AC
21082011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2109
2110 * sem_elab.adb (Check_Internal_Call_Continue): Change the type of the
2111 elaboration counter to Standard_Short_Integer.
2112 * sem_util.adb (Build_Elaboration_Entity): Likewise.
2113 * bindgen.adb (Gen_Elab_Externals_Ada): Adjust to above change.
2114 (Gen_Elab_Externals_C): Likewise.
2115
21162011-08-04 Ed Falis <falis@adacore.com>
2117
2118 * system-vxworks-arm.ads, system-vxworks-sparcv9.ads,
2119 system-vxworks-ppc.ads, system-vxworks-m68k.ads,
2120 system-vxworks-mips.ads, system-vxworks-x86.ads
2121 (Always_Compatible_Rep): set to False for all VxWorks targets.
2122
2c1b72d7
AC
21232011-08-04 Robert Dewar <dewar@adacore.com>
2124
2125 * par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
2126 makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
2127 exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
2128 exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
2129 exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
2130 sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
2131 sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
2132 Minor reformatting and code reorganization.
2133
21342011-08-04 Emmanuel Briot <briot@adacore.com>
2135
2136 * projects.texi: Added doc for aggregate projects.
2137
824e9320
AC
21382011-08-04 Emmanuel Briot <briot@adacore.com>
2139
2140 * prj-proc.adb, prj-nmsc.adb, prj-env.adb (Process_Declarative_Items):
2141 Add support for overriding the Project_Path in aggregate projects.
2142
21432011-08-04 Robert Dewar <dewar@adacore.com>
2144
2145 * a-cofove.ads: Minor reformatting.
2146
21472011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2148
2149 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Update the comment
2150 on the generated code.
2151 (Build_Finalize_Statements): Update the comment on the generated code.
2152 (Build_Initialize_Statements): Update the comment on the generated code.
2153 (Build_Object_Declarations): Add local variable Result. The object
2154 declarations are now built in sequence.
2155 * rtsfind.ads: Add RE_Exception_Occurrence_Access to tables RE_Id and
2156 RE_Unit_Table.
2157
21582011-08-04 Robert Dewar <dewar@adacore.com>
2159
2160 * checks.adb, alfa.adb, alfa.ads: Minor reformatting.
2161
21622011-08-04 Eric Botcazou <ebotcazou@adacore.com>
2163
2164 * einfo.ads (Elaboration_Entity): Document new definition and use.
2165 (Elaboration_Entity_Required): Adjust to above change.
2166 * exp_attr.adb (Expand_N_Attribute_Reference): Likewise.
2167 * exp_ch12.adb: And with and use for Snames.
2168 (Expand_N_Generic_Instantiation): Test 'Elaborated attribute.
2169 * exp_util.adb (Set_Elaboration_Flag): Likewise.
2170 * sem_attr.adb (Analyze_Attribute) <Check_Library_Unit>: Delete.
2171 <Check_Unit_Name>: Deal with N_Expanded_Name.
2172 <Attribute_Elaborated>: Extend to all unit names.
2173 * sem_elab.adb: And with and use for Uintp.
2174 (Check_Internal_Call_Continue): Adjust to Elaboration_Entity change.
2175 * sem_util.ads (Build_Elaboration_Entity): Adjust comment.
2176 * sem_util.adb (Build_Elaboration_Entity): Change type to Integer.
2177 * bindgen.adb (Gen_Elab_Externals_Ada): New local subprogram taken
2178 from Gen_Adainit_Ada.
2179 (Gen_Elab_Externals_C): Likewise, but taken from Gen_Adainit_C.
2180 (Gen_Adafinal_Ada): Remove redundant test. In the non-main program
2181 case, do not call System.Standard_Library.Adafinal; instead call
2182 finalize_library if needed.
2183 (Gen_Adafinal_C): Likewise.
2184 (Gen_Adainit_Ada): Do not set SSL.Finalize_Library_Objects in the
2185 non-main program case.
2186 (Gen_Adainit_C): Generate a couple of external declarations here.
2187 In the main program case, set SSL.Finalize_Library_Objects.
2188 (Gen_Elab_Calls_Ada): Adjust to Elaboration_Entity change.
2189 (Gen_Elab_Calls_C): Likewise.
2190 (Gen_Finalize_Library_Ada): Likewise. Skip SAL interface units.
2191 (Gen_Finalize_Library_C): Likewise. Generate a full function.
2192 (Gen_Main_C): Put back call to Ada_Final and don't finalize library
2193 objects here.
2194 (Gen_Output_File_Ada): Generate pragma Linker_Destructor for Ada_Final
2195 if -a is specified. Call Gen_Elab_Externals_Ada. Move around call to
2196 Gen_Adafinal_Ada.
2197 (Gen_Output_File_C): Generate __attribute__((destructor)) for Ada_Final
2198 if -a is specified. Call Gen_Elab_Externals_C. Remove useless couple
2c7f9cc0 2199 of external declarations. Call Gen_Finalize_Library_C.
824e9320 2200
316d9d4f
EB
22012011-08-04 Emmanuel Briot <briot@adacore.com>
2202
2203 * prj.adb, prj.ads, makeutl.adb, makeutl.ads (Complete_Mains,
2204 Compute_Compilation_Phases): new subprogram.
2205 (Builder_Data, Builder_Project_Tree_Data): new subprogram and type
2206 The number of mains as well as the various compilation phases that
2207 need to be run are now project tree specific, since various
2208 aggregated trees might have different requirements. In particular,
2209 they do not all require bind or link phases.
2210
9434c32e
EB
22112011-08-04 Emmanuel Briot <briot@adacore.com>
2212
2213 * prj.adb, prj.ads, makeutl.adb, makeutl.ads, prj-env.adb
2214 (Project_Tree_Appdata): New type.
2215 It is now possible to associate application-specific data to a project
2216 tree. In particular, this is used in the gprbuild builder to avoid a
2217 number of global tables and htables, especially now that there can be
2218 several project trees loaded at once because of aggregate projects.
2219 (Debug_Name): new procedure.
2220 * projects.texi: Clarify syntax of "**" for Source_Dirs
2221
41ba34db
EB
22222011-08-03 Emmanuel Briot <briot@adacore.com>
2223
2224 * prj.ads, makeutl.adb, makeutl.ads (Queue.Insert): now also inserts
2225 the "roots" for a main.
2226 (Fill_From_Project): add support for aggregate projects. Main units
2227 in aggregated projects are now automatically added in the list of
2228 files to build (although this fails later on in gprbuild, because
2229 these files are not using the root proejct tree, so this needs
2230 further cleanup)
2231 * gcc-interface/Make-lang.in: Update dependencies.
2232
fccd42a9
AC
22332011-08-03 Yannick Moy <moy@adacore.com>
2234
2235 * sem_ch4.adb (Analyze_Conditional_Expression): only allow boolean
2236 conditional expression in ALFA.
2237 * sem_res.adb (Resolve_Conditional_Expression): mark non-boolean
2238 expressions as not in ALFA.
2239
22402011-08-03 Robert Dewar <dewar@adacore.com>
2241
2242 * a-cofove.adb: Minor reformatting.
2243
22442011-08-03 Emmanuel Briot <briot@adacore.com>
2245
2246 * make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads
2247 (Insert_Project_Sources, Insert_withed_Sources_For): moved from the
2248 gprbuild sources.
2249 These packages are more logically placed in the Queue package, since
2250 they manipulate the queue. It is also likely that they can be adapted
2251 for gnatmake, thus sharing more code.
2252 (Finish_Program, Fail_Program): moved from the gprbuild sources, so
2253 that we could move the above.
2254
22552011-08-03 Emmanuel Briot <briot@adacore.com>
2256
2257 * errutil.adb (Finalize): clean up the list of error messages on exit.
2258 Calling this subprogram multiple times will no longer show duplicate
2259 error messages on stderr.
2260
22612011-08-03 Emmanuel Briot <briot@adacore.com>
2262
2263 * g-comlin.adb, g-comlin.ads (Set_Command_Line): ignore the parameter
2264 Getopt_Switches when we have already define a command line
2265 configuration.
2266
5e8c8e44
YM
22672011-08-03 Yannick Moy <moy@adacore.com>
2268
2269 * sem_ch11.adb (Analyze_Raise_xxx_Error): do not mark such nodes as not
2270 in ALFA. Instead, they are considered as assertions to prove.
2271 * sem_ch4.adb (Analyze_Conditional_Expression): do not always mark such
2272 nodes as not in ALFA. Instead, include conditional expressions in ALFA
2273 if they have no ELSE part, or if they occur in pre- and postconditions,
2274 where the Condition cannot have side-effects in ALFA
2275 (Analyze_Membership_Op): do not mark such nodes as not in ALFA
2276 (Analyze_Type_Conversion): do not always mark such nodes as not in ALFA.
2277 Instead, include type conversion between scalar types in ALFA.
2278 * sem_ch6.adb (Process_Formals): correctly mark a parameter in ALFA
2279 if-and-only-if its type is in ALFA.
2280
5ffe0bab
AC
22812011-08-03 Thomas Quinot <quinot@adacore.com>
2282
2283 * scos.adb, get_scos.adb, put_scos.adb
2284 New code letter for decisions: G (entry guard)
2285 * par_sco.adb
2286 (Traverse_Subprogram_Body): Rename to...
2287 (Traverse_Subprogram_Or_Task_Body): New subrpogram.
2288 (Traverse_Protected_Body): New subprogram
2289 (Traverse_Declarations_Or_Statements): Add traversal of task bodies,
2290 protected bodies and entry bodies.
2291
22922011-08-03 Yannick Moy <moy@adacore.com>
2293
2294 * einfo.adb, einfo.ads (Is_Postcondition_Proc): new flag for procedure
2295 entities with get/set subprograms, which is set on procedure entities
2296 generated by the compiler for a postcondition.
2297 * sem_ch6.adb (Process_PPCs): set new flag on postcondition procedures
2298 * alfa.adb, alfa.ads (Get_Entity_For_Decl): new function returning the
2299 entity for a declaration
2300 (Get_Unique_Entity_For_Decl): new function returning an entity which
2301 represents a declaration, so that matching spec and body have the same
2302 entity.
2303
23042011-08-03 Robert Dewar <dewar@adacore.com>
2305
2306 * a-except-2005.adb, a-cfhama.adb, a-cfhase.adb, a-cfhase.ads,
2307 a-cforma.adb, a-cforse.ads, a-cforse.adb: Minor reformatting
2308
23092011-08-03 Yannick Moy <moy@adacore.com>
2310
2311 * lib-xref-alfa.adb (Detect_And_Add_ALFA_Scope): make the subprogram
2312 library-level because retriction No_Implicit_Dynamic_Code in the
2313 front-end prevents its definition as a local subprogram
2314 (Traverse_Compilation_Unit): extract new procedure from Add_ALFA_File,
2315 for reuse in other contexts
2316 (Traverse_Declarations_Or_Statements,
2317 Traverse_Handled_Statement_Sequence, Traverse_Package_Body,
2318 Traverse_Package_Declaration, Traverse_Subprogram_Body): make all these
2319 procedures take a callback parameter to be called on all declarations
2320 * lib-xref.ads
2321 (Traverse_All_Compilation_Units): new generic function to traverse a
2322 compilation unit and call a callback parameter on all declarations
2323
f9ad6b62
AC
23242011-08-03 Javier Miranda <miranda@adacore.com>
2325
2326 * sem_prag.adb (Process_Interface_Name): Allow duplicated export names
2327 in Java since they are always enclosed in a namespace that
2328 differentiates them, and overloaded entities are supported by the VM.
2329
23302011-08-03 Ed Schonberg <schonberg@adacore.com>
2331
2332 * checks.adb (Determine_Range): If a computed bound of an operation is
2333 outside the range of the base type of the expression, and overflow
2334 checks are enabled, the result is unknown and cannot be used for any
2335 subsequent constant folding.
2336 * sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
2337 unknown, so is the result of the comparison.
2338
23392011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2340
2341 * a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
2342 From_Abort. When finalization was triggered by an abort, propagate
2343 Standard'Abort_Signal rather than Program_Error.
2344 * a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
2345 From_Abort.
2346 * a-except.adb (Raise_From_Controlled_Operation): Add new formal
2347 From_Abort. When finalization was triggered by an abort, propagate
2348 Standard'Abort_Signal rather than Program_Error.
2349 * a-except.ads:(Raise_From_Controlled_Operation): Add new formal
2350 From_Abort.
2351 * exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
2352 Abort_Id. Update the calls to Build_Object_Declarations and
2353 Build_Raise_Statement to include Abort_Id.
2354 (Build_Adjust_Statements): New local variable Abort_Id. Update the
2355 calls to Build_Object_Declarations and Build_Raise_Statement to include
2356 Abort_Id.
2357 (Build_Finalize_Statements): New local variable Abort_Id. Update the
2358 calls to Build_Object_Declarations and Build_Raise_Statement to include
2359 Abort_Id.
2360 (Build_Components): Create an entity for Abort_Id when exceptions are
2361 allowed on the target.
2362 (Build_Finalizer): New local variable Abort_Id.
2363 (Build_Initialize_Statements): New local variable Abort_Id. Update the
2364 calls to Build_Object_Declarations and Build_Raise_Statement to include
2365 Abort_Id.
2366 (Build_Object_Declarations): Add new formal Abort_Id. Create the
2367 declaration of flag Abort_Id to preserve the original abort status
2368 before finalization code is executed.
2369 (Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
2370 runtime routine Raise_From_Controlled_Operation.
2371 (Create_Finalizer): Update the call to Build_Raise_Statement to include
2372 Abort_Id. Update the call to Build_Object_Declarations to include
2373 Abort_Id. Update the layout of the finalizer body.
2374 (Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
2375 (Process_Transient_Objects): New local variable Abort_Id. Remove the
2376 clunky code to create all flags and objects related to
2377 exception propagation and replace it with a call to
2378 Build_Object_Declarations. Update the call to Build_Raise_Statement to
2379 include Abort_Id.
2380 * exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
2381 Add new formal Abort_Id and associated comment on its use.
2382 (Build_Raise_Statement): Add new formal Abort_Id and associated comment
2383 on its use.
2384 * exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
2385 Remove the clunky code to create all flags and objects related to
2386 exception propagation and replace it with a call to
2387 Build_Object_Declarations. Update the call to Build_Raise_Statement.
2388
23892011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2390
2391 * s-tassta.adb: Fix minor typos.
2392
23932011-08-03 Robert Dewar <dewar@adacore.com>
2394
2395 * rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
2396 lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.
2397
1cdfa9be
AC
23982011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2399
2400 * exp_ch7.adb (Create_Finalizer): Treat freeze nodes in similar fashion
2401 to packages. This ensures that the finalizer body will not end up
2402 inside the freeze node.
2403 (Process_Declarations): Add code to detect whether a freeze node has a
2404 nested finalization collection.
2405
24062011-08-03 Pascal Obry <obry@adacore.com>
2407
2408 * g-awk.adb, g-awk.ads: Make GNAT.AWK API compatible with Ada 2005.
2409 (Current_Session): Return a not null access to Session_Type.
2410 (Default_Session): Likewise.
2411
243cae0a
AC
24122011-08-03 Robert Dewar <dewar@adacore.com>
2413
2414 * a-cfdlli.adb, bindgen.adb, exp_ch4.adb, exp_ch13.adb, sem_warn.adb,
2415 exp_ch3.adb, exp_ch3.ads: Minor reformatting.
2416
24172011-08-03 Pascal Obry <obry@adacore.com>
2418
2419 * g-awk.ads: Minor comment fix.
2420
24212011-08-03 Sergey Rybin <rybin@adacore.com>
2422
2423 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
2424 the tree structure related to discriminant constraints.
2425 Original_Discriminant cannot be used any more for computing the
2426 defining name for the reference to a discriminant.
2427
24282011-08-03 Ed Schonberg <schonberg@adacore.com>
2429
2430 * sem_disp.adb (Is_Tag_Indeterminate): If the return type of the
2431 function is not visibly tagged, this is not a dispatching call and
2432 therfore is not Tag_Indeterminate, even if the function is marked as
2433 dispatching on result.
2434
f553e7bc
AC
24352011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2436
2437 * exp_ch13.adb: Add with and use clauses for Restrict and Rident.
2438 (Expand_N_Free_Statement): Add a guard to protect against run-times
2439 which do not support controlled types.
2440 * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect
2441 against run-times which do not support controlled types.
2442 * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect
2443 against run-times which do not support controlled types.
2444 * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect
2445 against run-times which do not support controlled types.
2446 * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to
2447 protect against run-times which do not support controlled types.
2448
24492011-08-03 Eric Botcazou <ebotcazou@adacore.com>
2450
2451 * exp_intr.adb: Put back with and use clauses for Exp_Ch11.
2452 (Expand_Unc_Deallocation): Expand the AT_END handler at the very end.
2453
e4982b64
AC
24542011-08-03 Ed Schonberg <schonberg@adacore.com>
2455
2456 * exp_ch5.adb (Expand_Iterator_Loop): indicate that the cursor is
2457 modified in the source, to prevent spurious warnings when compiling
2458 with -gnatg.
2459
24602011-08-03 Thomas Quinot <quinot@adacore.com>
2461
2462 * a-except-2005.adb: Minor reformatting.
2463
24642011-08-03 Ed Schonberg <schonberg@adacore.com>
2465
2466 * sem_warn.adb (Check_One_Unit): if the only mention of a withed unit
2467 is a renaming declaration in the private part of a package, do not emit
2468 a warning that the with_clause could be moved because the renaming may
2469 be used in the body or in a child unit.
2470
24712011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2472
2473 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
2474 Propagate the Comes_From_Source attribute from the original return
2475 object to the renaming.
2476
24772011-08-03 Jose Ruiz <ruiz@adacore.com>
2478
2479 * exp_ch7.adb (Build_Raise_Statement): Do not call
2480 Raise_From_Controlled_Operation when this routine is not present in
2481 the run-time library.
2482 (Cleanup_Protected_Object, Cleanup_Task): For restricted run-time
2483 libraries (Ravenscar), tasks are non-terminating, and protected objects
2484 and tasks can only appear at library level, so we do not want
2485 finalization of protected objects nor tasks.
2486 * exp_intr.adb: Minor clarification in comment.
2487 bindgen.adb (Gen_Adainit_Ada, Gen_Main_C, Gen_Output_File_Ada,
2488 Gen_Output_File_C): Remove references to finalization of library-level
2489 objects when using restricted run-time libraries.
2490
24912011-08-03 Ed Schonberg <schonberg@adacore.com>
2492
2493 * sem_ch3.adb (Build_Discriminant_Constraints): Set
2494 Original_Discriminant only if the parent type is a generic formal.
2495
deb8dacc
HK
24962011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2497
2498 * exp_ch13.adb: Add with and use clause for Targparm;
2499 (Expand_N_Free_Statement): Prevent the generation of a custom
2500 Deallocate on .NET/JVM targets since this requires pools and address
2501 arithmetic.
2502 * exp_ch4.adb (Expand_Allocator_Expression): When compiling for
2503 .NET/JVM targets, attach the newly allocated object to the access
2504 type's finalization collection. Do not generate a call to
2505 Set_Finalize_Address_Ptr on .NET/JVM because this routine does not
2506 exist in the runtime.
2507 (Expand_N_Allocator): When compiling for .NET/JVM targets, do not
2508 create a custom Allocate for object that do not require initialization.
2509 Attach a newly allocated object to the access type's finalization
2510 collection on .NET/JVM.
2511 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add special processing for
2512 assignment of controlled types on .NET/JVM. The two hidden pointers
2513 Prev and Next and stored and later restored after the assignment takes
2514 place.
2515 * exp_ch6.adb (Expand_Call): Add local constant Curr_S. Add specialized
2516 kludge for .NET/JVM to recognize a particular piece of code coming from
2517 Heap_Management and change the call to Finalize into Deep_Finalize.
2518 * exp_ch7.adb (Build_Finalization_Collection): Allow the creation of
2519 finalization collections on .NET/JVM only for types derived from
2520 Controlled. Separate the association of storage pools with a collection
2521 and only allow it on non-.NET/JVM targets.
2522 (Make_Attach_Call): New routine.
2523 (Make_Detach_Call): New routine.
2524 (Process_Object_Declarations): Suppress the generation of
2525 build-in-place return object clean up code on .NET/JVM since it uses
2526 pools.
2527 * exp_ch7.ads (Make_Attach_Call): New routine.
2528 (Make_Detach_Call): New routine.
2529 * exp_intr.adb Add with and use clause for Targparm.
2530 (Expand_Unc_Deallocation): Detach a controlled object from a collection
2531 on .NET/JVM targets.
2532 * rtsfind.ads: Add entries RE_Attach, RE_Detach and
2533 RE_Root_Controlled_Ptr to tables RE_Id and RE_Unit_Table.
2534 * snames.ads-tmpl: Add name Name_Prev. Move Name_Prev to the special
2535 names used in finalization.
2536
25372011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2538
2539 * a-fihema.adb: Add with and use clauses for System.Soft_Links.
2540 (Attach, Detach): Lock the current task when chaining an object onto a
2541 collection.
2542
df3e68b1
HK
25432011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
2544
2545 * a-except.adb, a-except-2005.adb (Raise_From_Controlled_Operation):
2546 Rewritten to create the message strings when the exception is not
2547 raised by an abort during finalization.
2548 * a-except.ads, a-except-2005.ads: Add pragma Export for procedure
2549 Raise_From_Controlled_Operation and update its associated comment.
2550 * a-fihema.ads, a-fihema.adb: New GNAT unit.
2551 Ada.Finalization.Heap_Management provides key functionality
2552 associated with controlled objects on the heap, their creation,
2553 finalization and reclamation. Type Finalization_Collection is
2554 effectively a wrapper which sits ontop of a storage pool and performs
2555 all necessary bookkeeping for all the objects it contains. Each
2556 access-to-controlled or access-to-class-wide type receives a collection
2557 as part of its expansion. The compiler generates buffer code and
2558 invokes Allocate / Deallocate to create and destroy allocated
2559 controlled objects.
2560 * a-finali.adb ("="): Removed.
2561 * a-finali.ads ("="): Removed. Controlled types no longer carry hidden
2562 fields Prev and Next.
2563 * ali.adb (Scan_ALI): Add parsing code to process PF / Has_Finalizer.
2564 A library unit with at least one controlled object on the library level
2565 has a special finalizer which is invoked by the binder. To signal this,
2566 ali files carry field PF.
2567 * ali.ads: New field in type Unit_Record called Has_Finalizer. Add
2568 associated comment on field usage.
2569 * a-tags.adb (Get_RC_Offset): Removed.
2570 (Needs_Finalization): New routine.
2571 * a-tags.ads: Update the structure of the GNAT dispatch tables.
2572 Dispatch tables now carry field Needs_Finalization which provides
2573 runtime indication whether a type is controlled or has controlled
2574 components or both. Remove field RC_Offset.
2575 (Get_RC_Offset): Removed along with its associated pragma Export.
2576 Since tagged types with controlled components no longer carry hidden
2577 field _controller, the special mechanism to retrieve its location is no
2578 longer needed.
2579 (Needs_Finalization): New routine.
2580 * atree.ads, atree.adb (Elist24): New routine.
2581 (Set_Elist24): New routine.
2582 * atree.h: Add a define clause for Elist24.
2583 * bindgen.adb New library-level variable Lib_Final_Built.
2584 (Gen_Adafinal_Ada): Reimplemented. Depending on the restrictions or the
2585 presence of a VM target, the routine generates calls to the proper
2586 library finalization routine.
2587 (Gen_Adainit_Ada): Import Finalize_Library_Objects only on non-VM
2588 targets. Set the correct library finalization routine depending on
2589 whether the library has controlled objects or this is a VM compilation.
2590 (Gen_Finalize_Library_Ada): New routine. This procedure generates calls
2591 to library-level finalizers of compiled units in reverse order of
2592 elaboration. It also produces exception management code and reraises a
2593 potential exception after all units have been finalized.
2594 (Gen_Finalize_Library_C): New routine. This procedure generates calls to
2595 library-level finalizers of compiled units in reverse order of
2596 elaboration.
2597 (Gen_Finalize_Library_Defs_C): New routine. This procedure generates the
2598 definitions of all library-level finalizers available to the compilation
2599 (Gen_Main_Ada): Directly call Adafinal which now contails all target
2600 dependent code.
2601 (Gen_Main_C): Add new local constant Needs_Library_Finalization. Call
2602 System.Standard_Library.Adafinal directly. If the library needs
2603 finalization actions, create the sequence of finalization calls.
2604 (Gen_Output_File_Ada): Alphabetize local variables and constants.
2605 Generate a with clause for System.Soft_Links when compiling for a VM.
2606 Remove the code which imports System.Standard_Library.Adafinal as
2607 Do_Finalize. Generate the library finalization routine.
2608 (Gen_Output_File_C): Add new local constant Needs_Library_Finalization.
2609 If the library needs finalization actions, create all the definitions
2610 of library- level finalizers.
2611 (Has_Finalizer): New routine. Determines whether at least one compiled
2612 unit has a library-level finalizer.
2613 Add type Qualification_Mode.
2614 (Set_Unit_Name): Add a formal which controls the replacement of a dot.
2615 * einfo.adb: New usage of field 15 as Return_Flag.
2616 Remove Finalization_Chain_Entity from the usages of field 19.
2617 Remove Associated_Final_Chain from the usages of field 23.
2618 New usage of field 23 as Associated_Collection.
2619 New usage of field 24 as Finalizer.
2620 New usage of flag 252 as Is_Processed_Transient.
2621 (Associated_Final_Chain): Removed.
2622 (Associated_Collection): New routine.
2623 (Finalization_Chain_Entity): Removed.
2624 (Finalizer): New routine.
2625 (Is_Finalizer): New routine.
2626 (Is_Processed_Transient): New routine.
2627 (Return_Flag): New routine.
2628 (Set_Associated_Final_Chain): Removed.
2629 (Set_Associated_Collection): New routine.
2630 (Set_Finalization_Chain_Entity): Removed.
2631 (Set_Finalizer): New routine.
2632 (Set_Is_Processed_Transient): New routine.
2633 (Set_Return_Flag): New routine.
2634 (Write_Entity_Flags): Include Is_Processed_Transient to the list of
2635 displayed flags.
2636 (Write_Field8_Name): Alphabetize the output.
2637 (Write_Field11_Name): Alphabetize the output.
2638 (Write_Field12_Name): Alphabetize the output.
2639 (Write_Field13_Name): Alphabetize the output.
2640 (Write_Field14_Name): Alphabetize the output.
2641 (Write_Field15_Name): Alphabetize the output.
2642 (Write_Field16_Name): Alphabetize the output.
2643 (Write_Field17_Name): Alphabetize the output.
2644 (Write_Field18_Name): Alphabetize the output.
2645 (Write_Field19_Name): Alphabetize the output. Remove the output of
2646 Finalization_Chain_Entity.
2647 (Write_Field20_Name): Alphabetize the output.
2648 (Write_Field21_Name): Alphabetize the output.
2649 (Write_Field22_Name): Alphabetize the output.
2650 (Write_Field23_Name): Alphabetize the output. Remove the output of
2651 Associated_Final_Chain. Add output for Associated_Collection.
2652 (Write_Field24_Name): Alphabetize the output.
2653 (Write_Field25_Name): Add output for Finalizer.
2654 (Write_Field26_Name): Alphabetize the output.
2655 (Write_Field27_Name): Alphabetize the output.
2656 (Write_Field28_Name): Alphabetize the output.
2657 * einfo.ads: Add new field description for Associated_Collection and
2658 its uses in nodes.
2659 Remove Associated_Final_Chain and its uses in nodes.
2660 Remove Finalization_Chain_Entity and its uses in nodes.
2661 Add new field description for Finalizer and its uses in nodes.
2662 Add new synthesized attribute Is_Finalizer.
2663 Add new flag description for Is_Processed_Transient and its uses in
2664 nodes.
2665 Add new field description for Return_Flag and its uses in nodes.
2666 (Associated_Final_Chain): Removed along with its pragma Inline.
2667 (Associated_Collection): New routine and pragma Inline.
2668 (Finalization_Chain_Entity): Removed along with its pragma Inline.
2669 (Finalizer): New routine and pragma Inline.
2670 (Is_Finalizer): New routine and pragma Inline.
2671 (Is_Processed_Transient): New routine and pragma Inline.
2672 (Return_Flag): New routine and pragma Inline.
2673 (Set_Associated_Final_Chain): Removed along with its pragma Inline.
2674 (Set_Associated_Collection): New routine and pragma Inline.
2675 (Set_Finalization_Chain_Entity): Removed along with its pragma Inline.
2676 (Set_Finalizer): New routine and pragma Inline.
2677 (Set_Is_Processed_Transient): New routine and pragma Inline.
2678 (Set_Return_Flag): New routine and pragma Inline.
2679 * exp_aggr.adb: Alphabetize subprograms.
2680 (Build_Array_Aggr_Code): Remove formal Flist and its associated comment.
2681 (Build_Record_Aggr_Code): Remove formals Flist and Obj along with their
2682 associated comments. Remove local variables External_Final_List and
2683 Attach.
2684 Rename Ctrl_Stuff_Done to Finalization_Done. Rename local variable A to
2685 Ancestor. Remove the retrieval of finalization lists. Update the call to
2686 Make_Adjust_Call.
2687 (Convert_Aggr_In_Allocator): Remove the retrieval of finalization
2688 lists. Update the call to Late_Expansion.
2689 (Convert_Aggr_In_Assignment): Update the call to Late_Expansion.
2690 (Convert_Aggr_In_Object_Decl): Update the call to Late_Expansion.
2691 (Gen_Assign): Remove the retrieval of the finalization list used to
2692 build the assignment. Update the calls to Make_Init_Call and
2693 Make_Adjust_Call.
2694 (Gen_Ctrl_Actions_For_Aggr): Renamed to Generate_Finalization_Actions.
2695 Remove the mechanism to determine attachment levels and finalization
2696 list retrieval. Remove the processing for coextensions.
2697 (Init_Controller): Removed. Controllers no longer exist.
2698 (Late_Expansion): Remove formals Flist and Obj along with their
2699 associated comments. Update the calls to Build_Record_Aggr_Code and
2700 Build_Array_Aggr_Code.
2701 * exp_ch13.adb (Expand_N_Free_Statement): New routine.
2702 (Expand_N_Freeze_Entity): Add special processing for finalizers which
2703 appear in entry bodies, protected subprograms and task bodies.
2704 * exp_ch13.ads (Expand_N_Free_Statement): New routine.
2705 * exp_ch3.adb (Add_Final_Chain): Removed.
2706 (Build_Array_Init_Proc): Alphabetize local variables.
2707 (Build_Assignment): Alphabetize local variables. Update the call to
2708 Maked_Adjust_Call.
2709 (Build_Class_Wide_Master): Rename local variables to better reflect
2710 their role.
2711 (Build_Discriminant_Assignments): Code reformatting.
2712 (Build_Init_Call_Thru): Code reformatting.
2713 (Build_Init_Procedure): Code reformatting. Generate a special version
2714 of Deep_Finalize which is capable of finalizing all initialized
2715 components and ignore the rest.
2716 (Build_Init_Statements): Rename local variables to better reflect their
2717 role.
2718 Reimplement the mechanism to include the creation and update of an index
2719 variable called a "counter". It is used as a bookmark for tracing
2720 initialized and non-initialized components.
2721 (Build_Initialization_Call): Remove local variable Controller_Typ.
2722 Alphabetize all local variables. Remove the initialization of the
2723 record controller and update the call to Make_Init_Call.
2724 (Build_Record_Init_Proc): Rename formal Pe to Rec_Ent.
2725 New local variable Counter.
2726 (Constrain_Array): Alphabetize.
2727 (Expand_Freeze_Array_Type): Create a collection instead of a
2728 finalization list.
2729 (Expand_Freeze_Class_Wide_Type): New routine. Creates TSS primitive
2730 Finalize_Address which is used in conjunction with allocated controlled
2731 objects.
2732 (Expand_N_Object_Declaration): Remove the creation of a finalization
2733 list for anonymous access types. Update the calls to Make_Init_Call and
2734 Make_Adjust_Call.
2735 (Expand_Freeze_Record_Type): Remove local variable Flist. Remove the
2736 retrieval of finalization lists. Remove the expansion of the record
2737 controller. Create TSS primitive Finalize_Address used in conjunction
2738 with controlled objects on the heap. Create finalization collections
2739 for access-to-controlled record components.
2740 (Expand_Record_Controller): Removed.
2741 (Freeze_Type): Remove the freezing of record controllers. Freezing of
2742 class-wide types now requires additional processing. Create
2743 finalization collections for access-to-controlled types.
2744 (Increment_Counter): New routine.
2745 (Make_Counter): New routine.
2746 (Make_Eq_If): Remove the mention of Name_uController.
2747 (Make_Predefined_Primitive_Specs): There is no longer need to skip
2748 types coming from System.Finalization_Root.
2749 (Predef_Deep_Spec): Reimplemented to reflect the new parameter profiles.
2750 (Predefined_Primitive_Bodies): There is no longer need to skip types
2751 coming from System.Finalization_Root.
2752 (Stream_Operation_OK): Do not generate stream routines for
2753 type Ada.Finalization.Heap_Management.Finalization_Collection.
2754 * exp_ch3.ads: Alphabetize subprograms.
2755 * exp_ch4.adb: Remove with and use clause for Sem_Ch8.
2756 Add with and use clause for Lib.
2757 (Complete_Coextension_Finalization): Removed.
2758 (Complete_Controlled_Allocation): New routine. Create a finalization
2759 collection for anonymous access-to-controlled types. Create a custom
2760 Allocate which interfaces with the back end and the machinery in
2761 Heap_Management.
2762 (Expand_Allocator_Expression): Add necessary calls to
2763 Complete_Controlled_Allocation. Remove the retrieval of finalization
2764 lists. Update the calls to Make_Adjust_Call. Generate a call to
2765 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2766 the associated collection.
2767 (Expand_N_Allocator): Remove the processing for dynamic coextensions.
2768 Code clean up. Remove the retrieval of finalization lists and
2769 attachment levels.
2770 Update the call to Make_Init_Call. Generate a call to
2771 Ada.Finalization.Heap_Management.Set_Finalize_Address_Ptr to decorate
2772 the associated collection.
2773 (Get_Allocator_Final_List): Removed. Finalization lists are not
2774 available.
2775 (Suitable_Element): Remove the mention of Name_uController.
2776 * exp_ch5.adb: Remove with and use clauses for Ttypes and Uintp.
2777 (Make_Tag_Ctrl_Assignment): Rewritten to simply do a finalization of
2778 the left hand side, carry out the assignment and adjust the left hand
2779 side.
2780 * exp_ch6.adb (Add_Final_List_Actual_To_Build_In_Place_Call): Removed.
2781 (Add_Collection_Actual_To_Build_In_Place_Call): New routine.
2782 (BIP_Formal_Suffix): Rename BIP_Final_List and BIPfinallist to
2783 BIP_Collection and BIPcollection.
2784 (Build_Heap_Allocator): New routine used to allocate the return object
2785 of a build-in-place function onto a collection.
2786 (Expand_Ctrl_Function_Call): Moved from Exp_Ch7.
2787 (Expand_Call): Do not replace direct calls to Deep routines with their
2788 aliases.
2789 (Expand_N_Extended_Return_Statement): Give all variables shorter names
2790 and update their occurrences. Add a special return flag to monitor the
2791 [ab]normal execution of the function. The flag is set right before the
2792 return statement.
2793 Rewrite the mechanism used to allocate a build-in-place return object
2794 on the heap or on a storage pool.
2795 (Is_Direct_Deep_Call): New routine.
2796 (Make_Build_In_Place_Call_In_Allocator): Add a collection to a
2797 build-in-place function call instead of a final list. Build a call to
2798 Set_Finalize_Address_Ptr to decorate the associated collection.
2799 (Make_Build_In_Place_Call_In_Anonymous_Context): Create a temporary in
2800 order to name the build-in-place function call's result for later
2801 finalization. Add a collection to a build-in-place function call
2802 instead of a final list.
2803 (Make_Build_In_Place_Call_In_Assignment): Add a collection to a
2804 build-in-place function call instead of a final list. Remove the code
2805 which moves one final list and transforms it into the actual in a
2806 nested build-in-place call.
2807 (Make_Build_In_Place_Call_In_Object_Declaration): Add a collection to a
2808 build-in-place function call instead of a final list.
2809 (Move_Final_List): Removed.
2810 (Needs_BIP_Collection): New routine.
2811 (Needs_BIP_Final_List): Removed.
2812 * exp_ch6.ads: Replace BIP_Final_List with BIP_Collection in
2813 enumeration type BIP_Formal_Kind.
2814 Update the related comment.
2815 (Needs_BIP_Collection): New routine.
2816 (Needs_BIP_Final_List): Removed.
2817 * exp_ch7.adb: Add with and use clauses for Elists, Exp_Ch6, Stringt
2818 and Ttypes. Remove with and use clauses for Sem_Type. Alphabetize the
2819 majority of subprograms in this unit. Add Name_Finalize_Address to
2820 array Name_Of and TSS_Finalize_Address to array Deep_Name_Of.
2821 (Build_Adjust_Or_Finalize_Statements): Create the adjust or finalization
2822 statements for an array type.
2823 (Build_Adjust_Statements): Create the adjust statements for a record
2824 type.
2825 (Build_Cleanup_Statements): New routine. A procedure which given any
2826 construct containing asynchronous calls, references to _master, or is a
2827 task body, a task allocation or a protected body produces the necessary
2828 runtime calls to clean up these constructs.
2829 (Build_Exception_Handler): New routine.
2830 (Build_Final_List): Removed.
2831 (Build_Finalization_Collection): New routine. A core procedure which
2832 creates a collection to service heap allocated controlled objects
2833 associated with an access-to-controlled type.
2834 (Build_Finalize_Statements): Create the finalization statements for a
2835 record types.
2836 (Build_Finalizer): New routine. A core procedure which given any
2837 construct with declarations and/or statements detects all objects which
2838 need any type of clean up (controlled objects, protected objects) and
2839 generates all necessary code to clean up the said objects in the proper
2840 order.
2841 (Build_Finalizer_Call): New routine.
2842 (Build_Initialize_Statements): Create the initialization statements for
2843 an array type. The generated routine contains code to finalize partially
2844 initialized arrays.
2845 (Build_Object_Declarations): New routine.
2846 (Build_Raise_Statement): New routine.
2847 (Clean_Simple_Protected_Objects): Removed.
2848 (Controller_Component): Removed.
2849 (Enclosing_Function): New routine.
2850 (Expand_Cleanup_Actions): Create a finalizer for a construct which has
2851 either declarations or statements or both.
2852 (Expand_N_Package_Body): Create a finalizer for a non-generic package.
2853 (Expand_N_Package_Declaration): Create a finalizer for a non-generic
2854 package.
2855 (Find_Final_List): Removed.
2856 (Global_Flist_Ref): Removed.
2857 (In_Finalization_Root): Removed.
2858 (Insert_Actions_In_Scope_Around): Determine the range of the transient
2859 scope in terms of tree nodes. Process all transient variables within
2860 that range.
2861 (Make_Adjust_Call): Rewritten. There is no longer an attach call
2862 generated after the adjust.
2863 (Make_Attach_Call): Removed.
2864 (Make_Call): New routine.
2865 (Make_Clean): Removed.
2866 (Make_Deep_Array_Body): Rewritten to simply invoke the appropriate
2867 build routines.
2868 (Make_Deep_Proc): Rewritten to generate the new profile signature used
2869 in Deep routines.
2870 (Make_Deep_Record_Body): Rewritten to simply invoke the appropriate
2871 build routines.
2872 (Make_Final_Call): Modified to simply create a call to either
2873 Deep_Finalize or Finalize.
2874 (Make_Finalize_Address_Body): New routine.
2875 (Make_Finalize_Address_Stmts): New routine. A function which produces
2876 TSS primitive Finalize_Address used in conjunction with heap allocated
2877 controlled objects.
2878 (Make_Handler_For_Ctrl_Operation): Add specialized code for .NET/JVM.
2879 (Make_Init_Call): Rewritten. There is no longer an attach call
2880 generated after initialization.
2881 (Make_Local_Deep_Finalize): New routine.
2882 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2883 (Make_Transient_Block): Remove the finalization list retrieval and
2884 manipulation.
2885 (Needs_Finalization): Moved to Exp_Util.
2886 (Parent_Field_Type): New routine.
2887 (Preprocess_Components): New routine.
2888 (Process_Transient_Objects): New routine.
2889 (Wrap_HSS_In_Block): New routine.
2890 (Wrap_Transient_Declaration): Remove finalization list management and
2891 controller insertion.
2892 (Wrap_Transient_Expression): Code reformatting.
2893 (Wrap_Transient_Statement): Code reformatting.
2894 * exp_ch7.ads (Build_Final_List): Removed.
2895 (Build_Finalization_Collection): New routine.
2896 (Build_Raise_Statement): New routine.
2897 (Controller_Component): Removed.
2898 (Expand_Ctrl_Function_Call): Moved to Exp_Ch6.
2899 (Find_Final_List): Removed.
2900 (In_Finalization_Root): Removed.
2901 (Is_Simple_Protected_Type): Update related comment.
2902 (Make_Adjust_Call): New parameter profile and associated comments.
2903 (Make_Attach_Call): Removed.
2904 (Make_Final_Call): New parameter profile and associated comments.
2905 (Make_Finalize_Address_Body): New routine.
2906 (Make_Init_Call): New parameter profile and associated comments.
2907 (Make_Local_Deep_Finalize): New routine.
2908 (Make_Set_Finalize_Address_Ptr_Call): New routine.
2909 (Needs_Finalization): Moved to Exp_Util.
2910 * exp_ch9.adb (Add_Object_Pointer): Code reformatting.
2911 (Expand_N_Protected_Body): Remove the handling of finalization lists.
2912 (Find_Protection_Type): Moved to Exp_Util.
2913 * exp_disp.adb: Remove with and use clauses for Exp_Ch7.
2914 (Make_DT): Update sequence of dispatch table initialization. Remove the
2915 initialization of field RC_Offset. Add initialization of field Needs_
2916 Finalization.
2917 * exp_intr.adb (Expand_Unc_Deallocation): Code reformatting.
2918 Reimplement how an object is first finalized, then deallocated.
2919 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function):
2920 Code reformatting.
2921 * exp_tss.ads: Add special suffix for TSS primitive Finalize_Address.
2922 Register TSS_Finalize_Address with type TSS_Names.
2923 * exp_util.adb (Build_Allocate_Deallocate_Proc): New routine. This core
2924 procedure provides the interface between an allocation / deallocation
2925 and the support machinery in Ada.Finalization.Heap_Management.
2926 (Find_Init_Call): Code reformatting.
2927 (Find_Init_Call_In_List): Code reformatting.
2928 (Find_Protection_Type): Moved from Exp_Ch9.
2929 (Find_Prim_Op): Reimplement to add preference of recovered primitive.
2930 (Has_Controlled_Coextensions): Removed.
2931 (Has_Controlled_Objects): New routine.
2932 (In_Library_Level_Package_Body): New routine.
2933 (Insert_Action_After): New routine.
2934 (Is_Finalizable_Transient): New routine. This predicate determines
2935 whether an object declaration is one of the many variants of controlled
2936 transients.
2937 (Is_Null_Access_BIP_Func_Call): New routine.
2938 (Is_Non_BIP_Func_Call): New routine.
2939 (Is_Related_To_Func_Return): New routine.
2940 (Needs_Finalization): Moved from Exp_Ch7.
2941 * exp_util.ads (Build_Allocate_Deallocate_Proc): New routine.
2942 (Find_Protection_Type): Moved from Exp_Ch9.
2943 (Has_Controlled_Coextensions): Removed.
2944 (Has_Controlled_Objects): New routine.
2945 (In_Library_Level_Package_Body): New routine.
2946 (Insert_Action_After): New routine.
2947 (Is_Finalizable_Transient): New routine.
2948 (Is_Null_Access_BIP_Func_Call): New routine.
2949 (Is_Non_BIP_Func_Call): New routine.
2950 (Is_Related_To_Func_Return): New routine.
2951 (Needs_Finalization): Moved from Exp_ch7.
2952 * expander.adb (Expand): Add a case for N_Free_Statement.
2953 * freeze.adb (Freeze_All): Replace the generation of a finalization
2954 list with a collection for access-to-controlled types.
2955 (Freeze_Entity): Code reformatting.
2956 (Freeze_Record_Type): Remove the freezing of a record controller
2957 component.
2958 (Freeze_Subprogram): Code reformatting.
2959 * inline.adb (Cleanup_Scopes): Remove the reset of the scope
2960 finalization list.
2961 * lib-writ.adb (Write_Unit_Information): Output "PF" when a package
2962 has a library-level finalizer.
2963 * lib-writ.ads: Add "PF" to the sequence of unit attributes.
2964 * a-filico.ads, a-filico.adb, s-finimp.ads, s-finimp.adb: Removed.
2965 * Makefile.rtl: Remove a-filico and s-finimp from the list of object
2966 files. Add a-fihema to the list of object files.
2967 * par-ch4.adb:
2968 Alphabetize the associations in type Is_Parameterless_Attribute.
2969 * rtsfind.ads: Ada.Finalization_List.Controller and
2970 System.Finalization_Implementation are no longer a GNAT unit.
2971 Update the range of type Ada_Finalization_Child. Remove the following
2972 recoverable entities:
2c7f9cc0 2973
df3e68b1
HK
2974 RE_Attach_To_Final_List
2975 RE_Deep_Tag_Attach
2976 RE_Finalize_List
2977 RE_Finalize_One
2978 RE_Finalizable_Ptr_Ptr
2979 RE_Global_Final_List
2980 RE_Limited_Record_Controller
2981 RE_List_Controller
2982 RE_Move_Final_List
2983 RE_Record_Controller
2984 RE_Simple_List_Controller
2c7f9cc0 2985
df3e68b1 2986 Add the following recoverable entities:
2c7f9cc0 2987
df3e68b1
HK
2988 RE_Add_Offset_To_Address
2989 RE_Allocate
2990 RE_Base_Pool
2991 RE_Deallocate
2992 RE_Exception_Identity
2993 RE_Finalization_Collection
2994 RE_Finalization_Collection_Ptr
2995 RE_Needs_Finalization
2996 RE_Save_Library_Occurrence
2997 RE_Set_Finalize_Address_Ptr
2998 RE_Set_Storage_Pool_Ptr
2999 RE_Storage_Count
3000 * sem_aggr.adb (Resolve_Record_Aggregate): Remove mention of
3001 Name_uController.
3002 * sem_aux.adb (First_Discriminant): Remove mention of Name_uController.
3003 (First_Stored_Discriminant): Remove the mention of Name_uController.
3004 * sem_aux.ads: Comment reformatting.
3005 * sem_ch10.adb (Build_Chain): Signal the class-wide creation machinery
3006 to redecorate an already existing class-wide type.
3007 (Decorate_Tagged_Type): New parameter profile and associated comment.
3008 Create a "shadow class-wide type" for a shadow entity.
3009 * sem_ch11.adb (Analyze_Exception_Handlers): Remove the dubious setting
3010 of the final chain along with the associated comment.
3011 * sem_ch3.adb (Access_Type_Declaration): Add new local variable
3012 Full_Desig and set it to the full view of the designated type.
3013 Initialize the finalization collection to empty.
3014 (Build_Derived_Record_Type): Alphabetize local variables. Code
3015 reformatting.
3016 (Collect_Fixed_Components): Remove the mention of Name_uController.
3017 (Create_Constrained_Components): Remove the mention of Name_uController.
3018 (Make_Class_Wide_Type): Add specialized code to redecorate an existing
3019 class-wide type of a shadow entity.
3020 (Process_Full_View): Update the machinery which marks type
3021 Limited_Controlled's entity as limited.
3022 * sem_ch4.adb (Analyze_One_Call): Code reformatting.
3023 * sem_ch6.adb (Create_Extra_Formals): Do not generate a finalization
3024 list, instead make a collection build-in-place formal.
3025 * sem_ch8.adb (Analyze_Object_Renaming): Look at the available view of
3026 a designated type in order to establish a match between the renaming
3027 and the renamed entity.
3028 (Find_Selected_Component): Add guard to prevent spurious exceptions
3029 from being raised on .NET/JVM.
3030 * sem_disp.adb (Check_Dispatching_Operation): Include Finalize_Address
3031 to the list of primitive that need special processing. Update arrays
3032 C_Names and D_Names.
3033 (Replace_Types): Handle class-wide types.
3034 * sem_elab.adb (Check_A_Call): Since Deep_Initialize now has a
3035 different parameter profile, look at the first formal.
3036 * sem_prag.adb: Remove with and use clauses for Exp_Ch7. Add with and
3037 use clauses for Exp_Util.
3038 * sem_res.adb: Remove with and use clauses for Elists.
3039 (Propagate_Coextensions): Removed.
3040 (Resolve_Allocator): Do not propagate the list of coextensions from one
3041 allocator to another.
3042 * sem_util.adb (Build_Actual_Subtype_Of_Component): Rename variable
3043 Deaccessed_T to Desig_Typ.
3044 (Enter_Name): Remove the mention of Name_uController.
3045 (Gather_Components): Remove the mention of Name_uController.
3046 (Incomplete_Or_Private_View): New routine.
3047 (Is_Coextension_Root): Removed.
3048 (Is_Fully_Initialized_Type): Remove the mention of Name_uController.
3049 * sem_util.ads (Incomplete_Or_Private_View): New routine.
3050 (Is_Coextension_Root): Removed.
3051 * s-finroo.ads: Remove with clause for Ada.Unchecked_Conversion.
3052 Controlled types are now derived from a null tagged record. Remove
3053 types Finalizable_Ptr, Finalizable and Empty_Root_Controlled.
3054 * sinfo.adb (Coextensions): Removed.
3055 (Set_Coextensions): Removed.
3056 * sinfo.ads: Remove Coextensions from the explanation of node fields
3057 and its uses in nodes.
3058 Update the field usage of N_Allocator.
3059 (Coextensions): Removed along with its pragma Inline.
3060 (Set_Coextensions): Removed along with its pragma Inline.
3061 * snames.ads-tmpl: Remove names
2c7f9cc0 3062
df3e68b1
HK
3063 Name_uClean
3064 Name_uController
3065 Name_uFinal_List
3066 Name_uLocal_Final_List
3067 Name_Finalization_Root
3068 Name_Next
3069 Name_Prev
2c7f9cc0 3070
df3e68b1 3071 Add names
2c7f9cc0 3072
df3e68b1
HK
3073 Name_uFinalizer
3074 Name_Finalize_Address
3075 * s-pooglo.adb (Allocate): Add overriding indicator.
3076 (Deallocate): Add overriding indicator.
3077 (Storage_Size): Add overriding indicator.
3078 * s-soflin.adb (Adafinal_NT): Invoke Finalize_Library_Objects rather
3079 than Finalize_Global_List.
3080 (Null_Finalize_Global_List): Removed.
3081 (Save_Library_Occurrence): New routine.
3082 * s-soflin.ads: Remove variable Finalize_Global_List along with its
3083 initialization. Add variable Finalize_Library_Objects along with its
3084 pragma Export. Add variables Library_Exception and
3085 Library_Exception_Set along with their pragma Export.
3086 (Null_Finalize_Global_List): Removed.
3087 (Save_Library_Occurrence): New routine.
3088 * s-tassta.adb (Finalize_Global_Tasks): Call Finalize_Library_Objects
3089 rather than Finalize_Global_List.
3090 * tbuild.adb (Unchecked_Convert_To): Capture and set the parent field
3091 of the constructed node.
3092
2ee06322
RO
30932011-08-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3094
3095 * link.c: Include "auto-host.h" before system headers.
3096
f77b022b
VC
30972011-08-03 Vincent Celier <celier@adacore.com>
3098
3099 * make.adb (Gnatmake): Add to table Library_Projs only library projects
3100 that are not extended. Do not check if a library project that is
3101 extended should be regenerated. Do not add to table Library_Paths the
3102 libraries that are in extended projects. Link only with libraries that
3103 are in libray projects that are not extended.
3104 * prj-nmsc.adb (Check_Library_Attributes): Do not reset flag Library
3105 for a library project that is extended.
3106
0187b60e
AC
31072011-08-03 Gary Dismukes <dismukes@adacore.com>
3108
3109 * sem_ch6.adb (Find_Corresponding_Spec): When in an instance, skip
3110 conforming subprogram renamings that appear to be completions if they
3111 are not fully conformant.
3112 Such renamings are homographs but not completions.
3113 * sem_type.adb (Disambiguate): Handle disambiguation of overloaded
3114 names in a subprogram renaming that appears in an instance.
3115
31162011-08-03 Ed Schonberg <schonberg@adacore.com>
3117
3118 * exp_util.adb (Expand_Subtype_From_Expr): if the type is limited but
3119 not immutably limited, build actual subtype from expression to provide
3120 proper bounds to caller.
3121
31222011-08-03 Gary Dismukes <dismukes@adacore.com>
3123
3124 * sem_ch8.adb: Minor comment correction.
3125
31262011-08-03 Thomas Quinot <quinot@adacore.com>
3127
3128 * exp_strm.adb (Build_Array_Input_Function): In Ada 2005 mode, when
3129 returning a limited array, use an extended return statement.
3130
31312011-08-03 Vincent Celier <celier@adacore.com>
3132
3133 * make.adb (Initialize): If --subdirs= is used, but no project file is
3134 specified, attempt to create the specify subdir if it does not already
3135 exist and use it as the object directory as if -D had been specified.
3136
31372011-08-03 Arnaud Charlet <charlet@adacore.com>
3138
3139 * s-tpopsp-vms.adb: New file.
3140 * s-taprop-vms.adb: Put back ATCB_Key, since needed by this file on VMS.
3141 * gcc-interfaces/Makefile.in: Use s-taprop-vms.adb on VMS.
3142
e280f981
AC
31432011-08-03 Emmanuel Briot <briot@adacore.com>
3144
3145 * make.adb, makeutl.adb, makeutl.ads, clean.adb (Makeutl.Queue): new
3146 package.
3147
31482011-08-03 Yannick Moy <moy@adacore.com>
3149
3150 * cstand.adb (Create_Standard): select Universal_Integer as an ALFA type
3151 * sem_ch3.adb (Array_Type_Declaration): detect array types in ALFA
3152 * sem_util.adb, sem_util.ads (Has_Static_Array_Bounds): new function to
3153 detect that an array has static bounds.
3154
98c99a5a
AC
31552011-08-03 Thomas Quinot <quinot@adacore.com>
3156
3157 * exp_dist.adb: Minor reformatting.
3158
31592011-08-03 Arnaud Charlet <charlet@adacore.com>
3160
3161 * s-taprop-irix.adb, s-taprop-hpux-dce.adb, s-taprop-vms.adb
3162 (ATCB_Key): Removed, not always used.
3163
31642011-08-03 Emmanuel Briot <briot@adacore.com>
3165
3166 * gnatcmd.adb, make.adb, prj.adb, prj.ads, makeutl.adb, makeutl.ads,
3167 clean.adb, prj-conf.adb, prj-env.adb, prj-env.ads (Makeutl): remove
3168 most remaining global variables.
3169
686d0984
AC
31702011-08-03 Robert Dewar <dewar@adacore.com>
3171
3172 * gnatcmd.adb, prj-proc.adb, mlib-prj.adb, prj.adb, makeutl.ads,
3173 prj-util.adb, prj-util.ads, prj-conf.adb, prj-env.adb: Minor
3174 reformatting.
3175
31762011-08-03 Javier Miranda <miranda@adacore.com>
3177
3178 * exp_util.adb (Is_VM_By_Copy_Actual): Include N_Slide nodes as actuals
3179 that must be passed by copy in VM targets.
3180
31812011-08-03 Emmanuel Briot <briot@adacore.com>
3182
3183 * prj.ads, prj-nmsc.adb (Files_Htable): removed this htable, which
3184 duplicates a similar htable now in the project tree.
3185
31862011-08-03 Claire Dross <dross@adacore.com>
3187
3188 * a-cfdlli.adb, a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb,
3189 a-cofove.adb ("=", Length, Is_Empty, Clear, Assign, Copy, Element,
3190 Replace_Element, Query_Element, Update_Element, Move, Insert, Prepend,
3191 Append, Delete, Delete_First, Delete_Last, Reverse_Element, Swap,
3192 Splice, First, First_Element, Last, Last_Element, Next, Previous, Find,
3193 Reverse_Find, Contains, Has_Element, Iterate, Reverse_Iterate, Capacity,
3194 Reserve_Length, Length, Strict_Equal, Left, Right): Data-structure
3195 update.
3196
31972011-08-03 Arnaud Charlet <charlet@adacore.com>
3198
3199 * s-taprop-posix.adb, s-taprop-linux.adb, s-taprop-tru64.adb
3200 (ATCB_Key): Removed, not always used.
3201 * s-tpopsp-posix.adb, s-tpopsp-posix-foreign.adb (ATCB_Key): Moved from
3202 s-taprop-posix.adb.
3203 * s-tpopsp-tls.adb: New file.
3204 * gcc-interface/Makefile.in: Use TLS implementation of s-tpopsp.adb on
3205 x86/x64/ia64/powerpc/sparc Linux.
3206
32072011-08-03 Arnaud Charlet <charlet@adacore.com>
3208
3209 * system-aix.ads, system-aix64.ads: Set ZCX_By_Default to True.
3210 * gcc-interface/Makefile.in: Switch to ZCX by default on AIX ports.
3211
32122011-08-03 Thomas Quinot <quinot@adacore.com>
3213
3214 * rtsfind.ads, exp_dist.adb, exp_dist.ads
3215 (Build_From_Any_Call, Build_To_Any_Call, Build_TypeCode_Call):
3216 Fix type selection for mapping integer types to PolyORB types.
3217
32182011-08-03 Bob Duff <duff@adacore.com>
3219
3220 * sem_ch7.adb: Minor comment clarification.
3221
32222011-08-03 Bob Duff <duff@adacore.com>
3223
3224 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): If we get
3225 an error analyzing a choice, skip further processing. Further
3226 processing could cause a crash or cascade errors.
3227
40ecf2f5
EB
32282011-08-03 Emmanuel Briot <briot@adacore.com>
3229
3230 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, mlib-prj.adb,
3231 prj.adb, prj.ads, makeutl.adb, makeutl.ads, clean.adb, prj-nmsc.adb,
3232 prj-util.adb, prj-util.ads, prj-conf.adb, prj-conf.ads, prj-env.adb,
3233 prj-env.ads (Shared_Project_Tree_Data): new type
3234 An aggregate project and its aggregated trees need to share the common
3235 data structures used for lists of strings, packages,... This makes the
3236 code simpler since otherwise we have to pass the root tree (also used
3237 for the configuration file data) in addition to the current project
3238 tree. This also avoids ambiguities as to which tree should be used.
3239 And finally this saves a bit of memory.
3240 (For_Every_Project_Imported): new parameter Tree.
3241 Since aggregated projects are using a different tree, we need to let
3242 the caller know which tree to use to manipulate the returned project.
3243
9fde638d
RD
32442011-08-03 Robert Dewar <dewar@adacore.com>
3245
3246 * prj-proc.adb, exp_util.ads, exp_ch9.adb, make.adb, prj-ext.adb,
3247 prj-ext.ads, alfa.ads, sem_ch4.adb, makeutl.adb, makeutl.ads,
3248 lib-xref-alfa.adb, sem_cat.adb, exp_dist.adb, get_alfa.adb,
3249 prj-env.adb, prj-env.ads, prj-tree.adb, alfa.ads: Minor reformatting.
3250
95eb8b69
AC
32512011-08-03 Javier Miranda <miranda@adacore.com>
3252
3253 * exp_util.adb, sem_aux.adb, exp_util.ads, sem_aux.ads:
3254 Move routine Is_VM_By_Copy_Actual from sem_aux to exp_util.
3255
32562011-08-03 Bob Duff <duff@adacore.com>
3257
3258 * sem_ch8.adb (Is_Primitive_Operator_In_Use): Always check In_Use on
3259 the Base_Type.
3260
32612011-08-03 Joel Brobecker <brobecker@adacore.com brobecker>
3262
3263 * g-sha256.ads, g-sha512.ads, g-sha1.ads, g-sha224.ads, g-sha384.ads,
3264 g-sehash.ads: Fix typo. Update header.
3265
32662011-08-03 Thomas Quinot <quinot@adacore.com>
3267
3268 * exp_ch6.adb (Expand_Actuals): Remove Ada_2005 guard on build-in-place
3269 expansion.
3270
32712011-08-03 Gary Dismukes <dismukes@adacore.com>
3272
3273 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Consider
3274 prefixes of private types along with records, since the selector may be
3275 a discriminant.
3276 * sem_res.adb (Resolve_Selected_Component): Consider prefixes of
3277 private types along with records, since the selector may be a
3278 discriminant.
3279
92e77027
AC
32802011-08-03 Emmanuel Briot <briot@adacore.com>
3281
3282 * prj-pp.adb (Pretty_Print): remove trailing blank line in the file
3283
32842011-08-03 Javier Miranda <miranda@adacore.com>
3285
3286 * sem_aux.adb (Is_VM_By_Copy_Actual): Fix wrong use of
3287 Tagged_Type_Expansion.
3288
32892011-08-03 Yannick Moy <moy@adacore.com>
3290
3291 * sem_res.adb
3292 (Resolve_Op_Concat_Arg): do not issue a SPARK violation when argument of
3293 concatenation is the name of a constant
3294
ab29a348
EB
32952011-08-03 Emmanuel Briot <briot@adacore.com>
3296
3297 * prj-proc.adb, prj-ext.adb, prj-ext.ads, prj-env.adb, prj-env.ads,
3298 prj-tree.adb, prj-tree.ads (Initialize_And_Copy, Copy): new subprograms
3299 (Process_Declarative_Items): new parameter Child_Env.
3300
9466892f
AC
33012011-08-03 Yannick Moy <moy@adacore.com>
3302
3303 * alfa.ads Update format of ALFA section in ALI file in order to add a
3304 mapping from bodies to specs when both are present
3305 (ALFA_Scope_Record): add components for spec file/scope
3306 * get_alfa.adb (Get_ALFA): read the new file/scope for spec when present
3307 * lib-xref-alfa.adb
3308 (Collect_ALFA): after all scopes have been collected, fill in the spec
3309 information when relevant
3310 * put_alfa.adb (Put_ALFA): write the new file/scope for spec when
3311 present.
3312
33132011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3314
3315 * inline.adb (Add_Inlined_Subprogram): Do not consider the enclosing
3316 code unit to decide whether to add internally generated subprograms.
2c7f9cc0 3317
9466892f
AC
33182011-08-03 Javier Miranda <miranda@adacore.com>
3319
3320 * sem_aux.ads, sem_aux.adb (Is_VM_By_Copy_Actual): New subprogram.
3321 * exp_ch9.adb
3322 (Build_Simple_Entry_Call): Handle actuals that must be handled by copy
3323 in VM targets.
3324
33252011-08-03 Emmanuel Briot <briot@adacore.com>
3326
3327 * make.adb, makeutl.adb, makeutl.ads (Make.Switches_Of): now shares
3328 code with Makeutl.Get_Switches.
3329 * prj-tree.adb: Update comment.
3330
b5ea9143
AC
33312011-08-03 Thomas Quinot <quinot@adacore.com>
3332
3333 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Reject a remote
3334 subprogram with a limited formal that does not support external
3335 streaming.
3336
33372011-08-03 Yannick Moy <moy@adacore.com>
3338
3339 * get_alfa.adb (Get_ALFA): add missing Skip_Spaces at start of
3340 continuation line
3341 * lib-xref-alfa.adb (Add_ALFA_File): split removal of scopes that are
3342 not from current unit in two phases, because it is not possible to
3343 change the table while iterating over its content.
3344 * put_alfa.adb (Put_ALFA): reset current file/scope at each new entity
3345
33462011-08-03 Sergey Rybin <rybin@adacore.com>
3347
3348 * vms_data.ads: Add qualifier for gnatmetric --no-static-loop option
3349 * gnat_ugn.texi: Update description of complexity metrics (gnatmetric)
3350
668a19bc
ES
33512011-08-03 Ed Schonberg <schonberg@adacore.com>
3352
3353 * sem_res.adb (Resolve_Op_Concat_Arg): if the argument is an aggregate
3354 and the component type is composite, this is ambiguous for predefined
3355 concatenation, but if the node is not overloaded and the entity is a use
3356 -defined function its profile can be used to resolve that aggregate.
3357
170b2989
AC
33582011-08-03 Robert Dewar <dewar@adacore.com>
3359
3360 * exp_ch4.adb: Minor code cleanup.
3361
33622011-08-03 Thomas Quinot <quinot@adacore.com>
3363
3364 * exp_dist.adb: Do not generate distribution stubs if serious errors
3365 have been diagnosed.
3366
33672011-08-03 Ed Schonberg <schonberg@adacore.com>
3368
3369 * sem_ch4.adb (Try_Primitive_Operation): when checking the validity of
3370 the first formal of a primitive operation, go to the base type to
3371 handle properly an access to a derived type with constrained
3372 discriminants.
3373 * sem_type.adb (Disambiguate): an immediately visible operator hides a
3374 user-defined function that is only use-visible.
170b2989 3375
e917aec2
RD
33762011-08-03 Robert Dewar <dewar@adacore.com>
3377
3378 * sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
3379 make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
3380 fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
3381 prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
3382 sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
3383 prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
3384 prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
3385 alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting
3386
33872011-08-03 Robert Dewar <dewar@adacore.com>
3388
3389 * repinfo.adb (List_Mechanism): Add handling of
3390 Convention_Ada_Pass_By_XXX.
3391 * sem_mech.adb (Set_Mechanism): Ditto.
3392 * sem_prag.adb (Process_Convention): Add entries for
3393 Convention_Ada_Pass_By_XXX.
3394 * snames.adb-tmpl, snames.ads-tmpl: Ditto.
3395
49bfcf43
AC
33962011-08-03 Pascal Obry <obry@adacore.com>
3397
3398 * makeutl.adb: Minor reformatting.
3399
34002011-08-03 Vincent Celier <celier@adacore.com>
3401
3402 * fname-uf.adb
3403 (Get_File_Name) If the file cannot be found when there are no config
3404 pragmas file and May_Fail is True, return No_File instead of the file
3405 name, to be consistent.
3406
34072011-08-03 Pascal Obry <obry@adacore.com>
3408
3409 * adaint.c (__gnat_is_executable_file_attr): Avoid access
3410 to null pointer.
3411
34122011-08-03 Javier Miranda <miranda@adacore.com>
3413
3414 * sem_ch13.adb
3415 (Same_Representation): In VM targets the representation of arrays with
3416 aliased components differs from arrays with non-aliased components.
3417
34798441
EB
34182011-08-03 Emmanuel Briot <briot@adacore.com>
3419
3420 * prj-proc.adb, prj-attr.adb, prj-attr.ads (Get_Attribute_Index): do
3421 not systematically lower case attribute indexes that contain no "."
3422 Fix definition of several Naming attributes, which take
3423 a unit name as index and therefore should be case insensitive.
3424 Minor refactoring (reduce length of variable names).
3425
34262011-08-03 Emmanuel Briot <briot@adacore.com>
3427
3428 * makeutl.adb, makeutl.ads (Get_Switches): new subprogram.
3429
4437a530
EB
34302011-08-03 Emmanuel Briot <briot@adacore.com>
3431
3432 * gnatcmd.adb, prj-proc.adb, prj-proc.ads, make.adb, prj-part.adb,
3433 prj-part.ads, switch-m.adb, switch-m.ads, prj-makr.adb, clean.adb,
3434 prj-pars.adb, prj-pars.ads, prj-conf.adb, prj-conf.ads, prj-tree.adb,
3435 prj-tree.ads (Prj.Tree.Environment): new type.
3436
804fe3c4
EB
34372011-08-03 Emmanuel Briot <briot@adacore.com>
3438
3439 * prj-proc.adb, prj.ads, makeutl.adb, makeutl.ads, prj-conf.adb,
3440 prj-tree.adb, prj-tree.ads (Environment): new type.
3441
c565bc66
AC
34422011-08-03 Emmanuel Briot <briot@adacore.com>
3443
3444 * prj-tree.ads: Remove unused variable.
3445
34462011-08-03 Yannick Moy <moy@adacore.com>
3447
3448 * restrict.adb (Restriction_Msg): set "SPARK" all in upper case for
3449 issuing messages related to SPARK restriction violation.
3450
4ee646da
AC
34512011-08-03 Ed Schonberg <schonberg@adacore.com>
3452
3453 * sem_ch6.adb: guard against error nodes in return statements.
3454
34552011-08-03 Arnaud Charlet <charlet@adacore.com>
3456
3457 * errout.adb (Error_Msg_Internal): the main unit has not been read yet,
3458 a warning can only appear on a configuration file, so emit warning
3459 without further checks.
3460
34612011-08-03 Arnaud Charlet <charlet@adacore.com>
3462
3463 * s-interr.ads: add overriding keyword.
3464
34652011-08-03 Geert Bosch <bosch@adacore.com>
3466
3467 * exp_attr.adb: Fix minor typo.
3468
34692011-08-03 Ed Schonberg <schonberg@adacore.com>
3470
3471 * par-ch4.adb: improve error recovery.
3472
c0e538ad
AC
34732011-08-03 Emmanuel Briot <briot@adacore.com>
3474
3475 * prj-part.adb, prj-part.ads, prj-makr.adb, prj-pars.adb, prj-conf.adb,
3476 prj-env.adb (Prj.Part.Parse): change parameter Always_Errout_Finalize
3477 to Errout_Handling.
3478
34792011-08-03 Emmanuel Briot <briot@adacore.com>
3480
3481 * prj-dect.adb (Parse_Attribute_Declaration): make sure we can use
3482 "external" as an attribute name in aggregate projects.
3483
34842011-08-03 Jose Ruiz <ruiz@adacore.com>
3485
3486 * s-taprop-vxworks.adb: (Create_Task, Initialize): Ada 2012 pragma CPU
3487 uses CPU numbers starting 1, while VxWorks uses CPU numbers starting
3488 from 0, so we need to adjust.
3489
34902011-08-03 Emmanuel Briot <briot@adacore.com>
3491
3492 * prj-proc.adb, prj-ext.adb, prj-ext.ads, makeutl.adb, prj-tree.adb,
3493 prj-tree.ads, gnatcmd.adb, clean.adb (External_References): new type.
3494
c4d67e2d
AC
34952011-08-03 Yannick Moy <moy@adacore.com>
3496
3497 * sem_ch6.adb (New_Overloaded_Entity): only issue error for SPARK
3498 restriction on overloaded entity if the entity is not an operator.
3499
35002011-08-03 Yannick Moy <moy@adacore.com>
3501
3502 * sem_ch7.adb, sem_res.adb, sem_attr.adb, restrict.adb,
3503 restrict.ads: Rename remaining Check_Formal_Restriction* into
3504 Check_SPARK_Restriction*.
3505
35062011-08-03 Emmanuel Briot <briot@adacore.com>
3507
3508 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb,
3509 prj-nmsc.ads, prj-err.adb (Project_Data): now discriminated on its
3510 qualifier.
3511 (Project_Empty): removed
3512 (Empty_Project): new parameter Qualifier
3513 This is used to have fields specific to aggregate projects, cleaner
3514 New field to store the list of aggregated projects.
3515 (Check_Aggregate_Project): removed
3516 (Process_Aggregated_Projects, Free): new subprograms.
3517
3f5a8fee
AC
35182011-08-03 Olivier Hainque <hainque@adacore.com>
3519
3520 * tracebak.c (STOP_FRAME ppc AIX): Stop at null return address as well.
3521
35222011-08-03 Ed Schonberg <schonberg@adacore.com>
3523
3524 * sem_ch8.adb (Analyze_Object_Renaming): if the renamed object is an
3525 explicit dereference of an unconstrained type, create a constrained
3526 subtype for it, as is done for function calls that return an
3527 unconstrained type.
3528
35292011-08-03 Thomas Quinot <quinot@adacore.com>
3530
3531 * g-pehage.adb (Finalize): Avoid possible double-free.
3532
35332011-08-03 Steve Baird <baird@adacore.com>
3534
3535 * exp_attr.adb (Expand_N_Attribute_Reference): Don't expand
3536 Elab_Spec/Body attrs in CodePeer_Mode.
3537
35382011-08-03 Javier Miranda <miranda@adacore.com>
3539
3540 * exp_aggr.adb (Flatten): Convert to positional form aggregates whose
3541 low bound is not known at compile time but they have no others choice.
3542 Done because in this case the bounds can be obtained directly from the
3543 aggregate.
3544
35452011-08-03 Ed Falis <falis@adacore.com>
3546
3547 * s-tasinf-vxworks.ads: Update comment to reflect 0 indexing of CPUs
3548 on VxWorks SMP. Remove unusable constant ANY_CPU.
3549
a96ca600
EB
35502011-08-03 Emmanuel Briot <briot@adacore.com>
3551
3552 * gnatcmd.adb, make.adb, prj-part.adb, prj-part.ads, prj-makr.adb,
3553 clean.adb, prj-nmsc.adb, prj-pars.adb, prj-conf.adb, prj-env.adb,
3554 prj-env.ads (Prj.Env.Initialize_Default_Project_Path,
3555 Prj.Env.Initialize_Empty): new subprograms
3556 (Get_Env, Find_Project): remove parameter Target_Name.
3557
3e582869
AC
35582011-08-03 Gary Dismukes <dismukes@adacore.com>
3559
3560 * sem_ch3.adb (Build_Derived_Record_Type): Test the Derive_Subps formal
3561 as a condition for the delayed call to Derived_Subprograms done for the
3562 case of the rewriting of a derived type that constrains the
3563 discriminants of its parent type.
3564 Avoids redundant subprogram derivations for private subtype derivations.
3565
35662011-08-03 Javier Miranda <miranda@adacore.com>
3567
3568 * exp_aggr.adb (Init_Hidden_Discriminants): New subprogram of
3569 Build_Record_Aggr_Code.
3570 (Build_Record_Aggr_Code): Add missing support to initialize hidden
3571 discriminants in extension aggregates.
3572
35732011-08-03 Emmanuel Briot <briot@adacore.com>
3574
3575 * prj-pp.adb (Print): also output project qualifiers, since in
3576 particular "aggregate" is mandatory in an aggregate project.
3577
35782011-08-03 Emmanuel Briot <briot@adacore.com>
3579
3580 * prj-part.adb, prj.adb, prj.ads, prj-nmsc.adb, prj-env.adb:
3581 (Debug_Output): new function.
3582
56e94186
AC
35832011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3584
3585 * gnat_ugn.texi: Document -Wstack-usage.
3586 * gcc-interface/misc.c (enumerate_modes): Add guard for ghost FP modes.
3587
35882011-08-03 Thomas Quinot <quinot@adacore.com>
3589
3590 * sem_prag.adb Issue an error (not a warning) when a C++ type does not
3591 have keyword LIMITED.
3592
35932011-08-03 Yannick Moy <moy@adacore.com>
3594
3595 * alfa.adb, alfa.ads, alfa_test.adb: New files.
3596 * ali.adb (Known_ALI_Lines): add 'C' lines (SCO) and 'F' lines (ALFA)
3597 (Scan_ALI): do not issue a fatal error if parsing known lines after Xref
3598 section (does not happen in compiler, only if code directly calls
3599 Scan_ALI).
3600 * get_alfa.adb, get_alfa.ads: New files.
3601 * lib-writ.adb, lib-writ.ads (Write_ALI): output ALFA information if
3602 needed.
3603 * lib-xref-alfa.adb: New file.
3604 * lib-xref.adb, lib-xref.ads
3605 (Xref_Entry): redefine information needed in cross-references for ALFA.
3606 Push ALFA treatments in separated local package.
3607 (Enclosing_Subpragram_Or_Package): treat specially subprogram
3608 identifiers. Return entity of package body instead of spec. Return
3609 Empty for a scope with no location.
3610 (Generate_Reference): adapt to new components for ALFA information.
3611 Remove the need for D references on definitions.
3612 (Is_Local_Reference): moved to ALFA local package
3613 (Output_References): extract subfunction as Extract_Source_Name
3614 (Output_Local_References): remove procedure, replaced by filtering of
3615 cross-references in package ALFA and printing in Put_ALFA.
3616 (Write_Entity_Name): remove procedure
3617 * lib.adb, lib.ads (Extract_Source_Name): extract here function to
3618 print exact name of entity as it appears in source file
3619 (Unit_Ref_Table): make type public for use in Lib.Xref.ALFA
3620 * put_alfa.adb, put_alfa.ads: New files.
3621 * xref_lib.adb (Search_Xref): protect read of cross-references against
3622 reading other sections of the ALI file, in gnatxref
3623 (Search): protect read of cross-references against reading other
3624 sections of the ALI file, in gnatfind.
3625 * gcc-interface/Make-lang.in: Update dependencies.
3626
36272011-08-03 Thomas Quinot <quinot@adacore.com>
3628
3629 * sem_ch3.adb: Minor reformatting.
3630
36312011-08-03 Jose Ruiz <ruiz@adacore.com>
3632
3633 * s-inmaop-vxworks.adb (Setup_Interrupt_Mask): Do nothing instead of
3634 raising an exception.
3635
36362011-08-03 Ed Schonberg <schonberg@adacore.com>
3637
3638 * sem_res.adb (Set_String_Literal_Subtype): if index type is an integer
3639 type, always use 1 as the lower bound or string, even if lower bound of
3640 context is not static, to handle properly null strings in a non-static
3641 context.
3642
36432011-08-03 Bob Duff <duff@adacore.com>
3644
3645 * sem_prag.adb (Resolve_Aggregate): An array aggregate with 'others' is
3646 always legal on the right-hand side of an assignment statement; there
3647 is always an applicable index constraint in this case. Therefore, the
3648 check for Pkind = N_Assignment_Statement is now unconditional -- it
3649 doesn't depend on whether Is_Constrained (Typ).
3650
4317e442
AC
36512011-08-03 Robert Dewar <dewar@adacore.com>
3652
3653 * exp_ch5.adb, sem_prag.adb, exp_ch4.adb: Minor reformatting.
3654
36552011-08-03 Ed Schonberg <schonberg@adacore.com>
3656
3657 * sem_ch3.adb (Build_Itype_Reference): do not create an itype reference
3658 for an itype created within a generic unit.
3659
36602011-08-03 Eric Botcazou <ebotcazou@adacore.com>
3661
3662 * gnat_ugn.texi (Switches for gcc): Make it clearer that -fno-inline
3663 suppresses all inlining.
3664
53f29d4f
AC
36652011-08-03 Robert Dewar <dewar@adacore.com>
3666
3667 * sem_ch3.adb, sem_res.adb, exp_ch13.adb, exp_disp.adb,
3668 exp_aggr.adb: Minor reformatting.
3669
36702011-08-03 Thomas Quinot <quinot@adacore.com>
3671
3672 * exp_ch5.adb (Expand_N_Assignment_Statement): Do not force inlining of
3673 tagged assignment when discriminant checks are suppressed. This is
3674 useless and extremely costly in terms of static stack usage.
3675
36762011-08-03 Bob Duff <duff@adacore.com>
3677
3678 * sem_prag.adb (Get_Base_Subprogram): Do not follow Alias for instances
3679 of generics, because this leads to the wrong entity in the wrong scope,
3680 causing (e.g.) pragma Export_Procedure to get an error if the entity is
3681 an instance.
3682 (Process_Interface_Name): Follow Alias for instances of generics, to
3683 correct for the above change.
3684
36852011-08-03 Ed Schonberg <schonberg@adacore.com>
3686
3687 * exp_ch4.adb (Expand_N_Selected_Component): If the discriminant value
3688 is an integer literal it is always safe to replace the reference. In
3689 addition, if the reference appears in the generated code for an object
3690 declaration it is necessary to copy because otherwise the reference
3691 might be to the uninitilized value of the discriminant of the object
3692 itself.
3693
36942011-08-03 Pascal Obry <obry@adacore.com>
3695
3696 * adaint.c (__gnat_is_executable_file_attr): Fix Win32 circuitry when no
3697 ACL used, in this case we want to check for ending .exe, not .exe
3698 anywhere in the path.
3699
37002011-08-03 Sergey Rybin <rybin@adacore.com>
3701
3702 * tree_io.ads (ASIS_Version_Number): Update because of the changes in
3703 the tree structure (semantic decoration of references to record
3704 discriminants).
3705
c0b11850
AC
37062011-08-03 Gary Dismukes <dismukes@adacore.com>
3707
3708 * sem_aggr.adb (Analyze_Array_Aggregate): When checking the discrete
3709 choices of a named array aggregate, bail out when any choices are
3710 marked as Errors_Posted.
3711
37122011-08-03 Ed Schonberg <schonberg@adacore.com>
3713
3714 * exp_ch13.adb (Expand_N_Freeze_Entity): cleanup determination of scope
3715 in which entity is frozen, to handle properly loop variables in
3716 iterators.
3717
37182011-08-03 Ed Schonberg <schonberg@adacore.com>
3719
3720 * sem_res.adb (Set_String_Literal_Subtype): if the lower bound of the
3721 subtype is not static, compute the upper bound using attributes, to
3722 handle properly index types that are not integer types.
3723
37242011-08-03 Bob Duff <duff@adacore.com>
3725
3726 * gnat_rm.texi, gnat_ugn.texi: Fix some dangling URLs.
3727 Update copyright notice.
3728
37292011-08-03 Ed Schonberg <schonberg@adacore.com>
3730
3731 * sem_ch3.adb (Build_Discriminant_Constraints): Only use
3732 Original_Discriminant if within an instance.
3733 * sem_ch4.adb (Analyze_Selected_Component): Ditto.
3734
37352011-08-03 Thomas Quinot <quinot@adacore.com>
3736
3737 * einfo.ads: Minor reformatting.
3738
37392011-08-03 Ed Schonberg <schonberg@adacore.com>
3740
3741 * exp_disp.adb (Check_Premature_Freezing): diagnose the presence of a
3742 composite type with an unfrozen subcomponent, in the profile of a
3743 primitive operation.
3744
5c34e9cd
AC
37452011-08-03 Robert Dewar <dewar@adacore.com>
3746
3747 * sem_util.ads, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3748
37492011-08-03 Ed Schonberg <schonberg@adacore.com>
3750
3751 * sem_ch3.adb (Analyze_Object_Declaration): if a constant object of an
3752 unconstrained type with discriminants is initialized with an aggregate,
3753 use the constrained subtype of the aggregate as the type of the object,
3754 because it is immutable, and this allows the back-end to generate no
3755 code for the object declaration.
3756
abcd9db2
AC
37572011-08-03 Robert Dewar <dewar@adacore.com>
3758
3759 * exp_ch4.adb (Optimize_Length_Check): Fix bad handling of case where
3760 comparison operand is variable, and turns out to be zero or negative.
3761
37622011-08-03 Javier Miranda <miranda@adacore.com>
3763
3764 * exp_intr.adb
3765 (Expand_Dispatching_Constructor_Call): Disable expansion of
3766 code required for native targets. Done to avoid generating
3767 references to unavailable runtime entities in VM targets.
3768 * exp_ch3.adb
3769 (Expand_N_Object_Declaration): Add missing support to handle
3770 the explicit initialization of class-wide interface objects.
3771 Fix documentation.
3772
37732011-08-03 Matthew Heaney <heaney@adacore.com>
3774
3775 * a-cobove.adb (Merge): Move source onto target, instead of using Assign
3776
37772011-08-03 Matthew Heaney <heaney@adacore.com>
3778
3779 * a-cbdlli.adb (Splice): move source items from first to last
3780
37812011-08-03 Yannick Moy <moy@adacore.com>
3782
3783 * sem_util.ads: comment added.
3784
37852011-08-03 Javier Miranda <miranda@adacore.com>
3786
3787 * exp_aggr.adb
3788 (Expand_Record_Aggregate): In VM targets disable the expansion into
3789 assignments of aggregates whose type is not known at compile time.
3790
b474d6c3
ES
37912011-08-03 Ed Schonberg <schonberg@adacore.com>
3792
3793 * exp_ch9.adb (Build_Renamed_Formal_Declaration): common procedure for
3794 protected entries and task entries, to build the proper renaming
3795 declaration for entry formals, used in debugging.
3796 * exp_ch2.adb (Expand_Entry_Parameter): handle task and entry
3797 parameters in the same way.
3798
0580d807
AC
37992011-08-02 Robert Dewar <dewar@adacore.com>
3800
3801 * a-direct.adb, sinfo.ads, exp_ch9.adb, scng.adb, sem_util.adb,
3802 sem_util.ads, restrict.ads, par-prag.adb: Minor reformatting and/or
3803 code reorganization.
3804
38052011-08-02 Robert Dewar <dewar@adacore.com>
3806
3807 * debug.adb: Debug flag d.P to suppress length comparison optimization
3808 * exp_ch4.adb (Optimize_Length_Comparison): New routine to optimize
3809 comparison of Length by comparing First/Last instead.
3810
38112011-08-02 Matthew Heaney <heaney@adacore.com>
3812
3813 * a-cobove.ads: Code clean up.
3814
b191a125
AC
38152011-08-02 Vincent Celier <celier@adacore.com>
3816
3817 * adaint.c (file_names_case_sensitive_cache): New static int.
3818 (__gnat_get_file_names_case_sensitive): Cache the return value in
3819 file_names_case_sensitive_cache at the first invocation, to avoid
3820 multiple calls to getenv.
3821
38222011-08-02 Bob Duff <duff@adacore.com>
3823
3824 * sem_ch12.adb (Validate_Derived_Type_Instance): Implement AI05-0218-1.
3825
316a0661
AC
38262011-08-02 Yannick Moy <moy@adacore.com>
3827
3828 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem.ads,
3829 sem_util.adb, sem_util.ads, sem_res.adb, sem_ch2.adb, sem_ch4.adb,
3830 sem_ch6.adb, sem_ch11.adb: Add semantic flag In_Pre_Post_Expression to
3831 indicate that we are in a precondition or postcondition. This is used in
3832 Mark_Non_ALFA_Subprogram (renaming of Mark_Non_ALFA_Subprogram_Body) to
3833 decide whether to flag the spec or body of the current subprogram as
3834 not in ALFA.
3835
38362011-08-02 Fabien Chouteau <chouteau@adacore.com>
3837
3838 * impunit.adb: Add Ada.Execution_Time.Interrupts in the Ada2012 package
3839 list.
3840 * a-extiin.ads: New file.
3841
38422011-08-02 Bob Duff <duff@adacore.com>
3843
3844 * a-direct.adb (Rename): Implement AI05-0231-1. In particular, Rename
3845 now raises Name_Error instead of Use_Error in certain cases. The other
3846 parts of this AI were already implemented properly.
3847
f9adb9d4
AC
38482011-08-02 Vincent Celier <celier@adacore.com>
3849
3850 * link.c: Only import "auto-host.h" when building the gnattools.
3851
38522011-08-02 Yannick Moy <moy@adacore.com>
3853
3854 * sem_util.adb: Inter-unit inlining does not work for a subprogram
3855 which calls a local subprogram, so extract subprogram
3856 from Mark_Non_ALFA_Subprogram_Body.
3857
38582011-08-02 Javier Miranda <miranda@adacore.com>
3859
3860 * exp_ch9.adb
3861 (Extract_Dispatching_Call): If the type of the dispatching object is an
3862 access type then return an explicit dereference in the Object out-mode
3863 parameter.
3864
38652011-08-02 Gary Dismukes <dismukes@adacore.com>
3866
3867 * sem_ch3.adb (Analyze_Subtype_Declaration): Generate range
3868 compatibility checks for all indexes of an array subtype, not just the
3869 first. Reset Has_Dynamic_Range_Check on the subtype before each
3870 potential check to ensure that Insert_Range_Checks will not elide any
3871 of the dynamic checks.
3872
38732011-08-02 Yannick Moy <moy@adacore.com>
3874
3875 * par-prag.ad (Process_Restrictions_Or_Restriction_Warnings): recognize
3876 SPARK restriction at parsing time.
3877 * scng.adb (Scan): Generate a token Tok_SPARK_Hide for a SPARK HIDE
3878 directive only if the SPARK restriction is set for this unit.
3879
83f33150
YM
38802011-08-02 Yannick Moy <moy@adacore.com>
3881
3882 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb, sem_util.ads,
3883 sem_res.adb, sem_ch2.adb, sem_ch4.adb, sem_ch6.adb,
3884 sem_ch11.adb: Protect call to Current_Subprogram which might be costly
3885 when repeated. Rename Current_Subprogram_Is_Not_In_ALFA into
3886 Mark_Non_ALFA_Subprogram_Body.
3887 Split body of Mark_Non_ALFA_Subprogram_Body to get body small and
3888 inlined.
3889
7b98672f
YM
38902011-08-02 Yannick Moy <moy@adacore.com>
3891
3892 * sem_res.adb: Protect calls to Matching_Static_Array_Bounds which
3893 might be costly.
3894
052e0603
AC
38952011-08-02 Robert Dewar <dewar@adacore.com>
3896
3897 * exp_ch9.adb, exp_sel.adb, restrict.ads, exp_disp.adb, erroutc.ads,
3898 exp_ch3.adb: Minor reformatting.
3899
39002011-08-02 Emmanuel Briot <briot@adacore.com>
3901
3902 * adaint.c (__gnat_locate_exec_on_path): only returns executable
3903 files, not any regular file.
3904 (__gnat_locate_file_with_predicate): new subprogram.
3905
39062011-08-02 Yannick Moy <moy@adacore.com>
3907
3908 * sinfo.adb, sinfo.ads: Restrict the use of flags
3909 Has_Dynamic_Length_Check and Has_Dynamic_Range_Check to expression
3910 nodes, plus N_Subtype_Declaration for the 2nd one.
3911
4fbad0ba
AC
39122011-08-02 Sergey Rybin <rybin@adacore.com>
3913
3914 * gnat_rm.texi: Ramification of pragma Eliminate documentation
3915 - fix bugs in the description of Source_Trace;
3916 - get rid of UNIT_NAME;
3917
052e0603
AC
39182011-08-02 Javier Miranda <miranda@adacore.com>
3919
3920 * exp_ch9.adb
3921 (Build_Dispatching_Requeue): Adding support for VM targets
3922 since we cannot directly reference the Tag entity.
3923 * exp_sel.adb (Build_K): Adding support for VM targets.
3924 (Build_S_Assignment): Adding support for VM targets.
3925 * exp_disp.adb
3926 (Default_Prim_Op_Position): In VM targets do not restrict availability
3927 of predefined interface primitives to compiling in Ada 2005 mode.
3928 (Is_Predefined_Interface_Primitive): In VM targets this service is not
3929 restricted to compiling in Ada 2005 mode.
3930 (Make_VM_TSD): Generate code that declares and initializes the OSD
3931 record. Needed to support dispatching calls through synchronized
3932 interfaces.
3933 * exp_ch3.adb
3934 (Make_Predefined_Primitive_Specs): Enable generation of predefined
3935 primitives associated with synchronized interfaces.
3936 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
3937 primitives associated with synchronized interfaces.
3938
39392011-08-02 Yannick Moy <moy@adacore.com>
3940
3941 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
3942 statements hidden in SPARK if preceded by the HIDE directive
3943 (Parse_Exception_Handlers): mark each exception handler in a sequence of
3944 exception handlers as hidden in SPARK if preceded by the HIDE directive
3945 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
3946 if starting with the HIDE directive
3947 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
3948 starting with the HIDE directive; mark the declarations in a private
3949 part as hidden in SPARK if the private part starts with the HIDE
3950 directive
3951 * restrict.adb, restrict.ads
3952 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
3953 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
3954 argument node belongs to a part which is hidden in SPARK
3955 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
3956 parts in SPARK; protect the possibly costly call to
3957 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
3958 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
3959 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
3960 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
3961 Tok_SPARK_Hide.
3962 (Scan): recognize special comment starting with '#' and followed by
3963 SPARK keyword "hide" as a HIDE directive.
3964
39652011-08-02 Yannick Moy <moy@adacore.com>
3966
3967 * types.ads, erroutc.ads: Minor reformatting.
3968
39692011-08-02 Vincent Celier <celier@adacore.com>
3970
3971 * link.c: Add response file support for cross platforms.
3972
39732011-08-02 Ed Schonberg <schonberg@adacore.com>
3974
3975 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
3976 in an association, set parent field of copy before partial analysis.
3977 * sem_res.adb (Resolve_Slice): create reference to itype only when
3978 expansion is enabled.
3979
39802011-08-02 Yannick Moy <moy@adacore.com>
3981
3982 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
3983 for new flag denoting which subprogram bodies are in ALFA
3984 * restrict.adb, sem_ch7.adb: Update comment
3985 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
3986 sem_ch9.adb, sem_res.adb: Add calls to
3987 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
3988 * sem_ch6.adb (Analyze_Function_Return): add calls to
3989 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
3990 middle of the body, and extended return.
3991 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
3992 False when missing return.
3993 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
3994 to True for subprograms whose spec is in ALFA. Remove later on the flag
3995 on the entity used for a subprogram body when there exists a separate
3996 declaration.
3997 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
3998 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
3999 False, otherwise do nothing.
4000
40012011-08-02 Robert Dewar <dewar@adacore.com>
4002
4003 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
4004
40052011-08-02 Yannick Moy <moy@adacore.com>
4006
4007 * sem_ch4.ads: minor formatting.
4008
40092011-08-02 Yannick Moy <moy@adacore.com>
4010
4011 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
4012 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
4013 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
4014 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
4015 opt.ads: cleanup of SPARK mode
4016
40172011-08-02 Yannick Moy <moy@adacore.com>
4018
4019 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
4020 types.
4021 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
4022 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
4023 * sem_ch3.adb
4024 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
4025 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
4026 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
4027 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
4028 types.
4029 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
4030 non-static range.
4031 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
4032 functions whose return type is not in ALFA.
4033 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
4034 specifications.
4035 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
4036 parameter's type is not in ALFA.
4037 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
4038 types are in ALFA.
4039
40402011-08-02 Ed Schonberg <schonberg@adacore.com>
4041
4042 * sem_ch6 (Analyze_Expression_Function): treat the function as
4043 Inline_Always, and introduce a subprogram declaration for it when it is
4044 not a completion.
4045 * inline.adb (Add_Inlined_Body): recognize bodies that come from
4046 expression functions, so that the back-end can determine whether they
4047 can in fact be inlined.
4048 * sem_util.adb (Is_Expression_Function): predicate to determine whether
4049 a function body comes from an expression function.
4050
40512011-08-02 Gary Dismukes <dismukes@adacore.com>
4052
4053 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
4054 null exclusions to test Can_Never_Be_Null on the anonymous access types
4055 of the formals rather than testing the formals themselves. Exclude this
4056 check in cases where the Old_Formal is marked as a controlling formal,
4057 to avoid issuing spurious errors for bodies completing dispatching
4058 operations (due to the flag not getting set on controlling access
4059 formals in body specs).
4060 (Find_Corresponding_Spec): When checking full and subtype conformance of
4061 subprogram bodies in instances, pass Designated and E in that order, for
4062 consistency with the expected order of the formals (New_Id followed by
4063 Old_Id).
4064
40652011-08-02 Robert Dewar <dewar@adacore.com>
4066
4067 * sem_ch8.adb: Minor reformatting.
4068
40692011-08-02 Ed Schonberg <schonberg@adacore.com>
4070
4071 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
4072 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
4073 primitive operations of class-wide actuals.
4074
40752011-08-02 Javier Miranda <miranda@adacore.com>
4076
4077 * exp_atag.ads, exp_atag.adb
4078 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
4079 since its value is implicitly passed in argument Typ.
4080 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
4081 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
4082 Build_Common_Dispatching_Select_Statements.
4083
40842011-08-02 Robert Dewar <dewar@adacore.com>
4085
4086 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
4087 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
4088 Minor reformatting.
4089
40902011-08-02 Robert Dewar <dewar@adacore.com>
4091
4092 * sem_res.adb: Minor reformatting.
4093 * sem_prag.adb: Minor reformatting.
4094
40952011-08-02 Javier Miranda <miranda@adacore.com>
4096
4097 * exp_atag.adb, exp_atags.ads
4098 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
4099 by the tagged type Entity. Required to use this routine in the VM
4100 targets since we do not have available the Tag entity in the VM
4101 platforms.
4102 * exp_ch6.adb
4103 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
4104 Ada.Tags has not been previously loaded.
4105 * exp_ch7.adb
4106 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
4107 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
4108 * sem_aux.adb
4109 (Enclosing_Dynamic_Scope): Add missing support to handle the full
4110 view of enclosing scopes. Required to handle enclosing scopes that
4111 are synchronized types whose full view is a task type.
4112 * exp_disp.adb
4113 (Build_VM_TSDs): Minor code improvement to avoid generating and
4114 analyzing lists with empty nodes.
4115 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
4116 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
4117 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
4118 (Make_Disp_Timed_Select_Body): Add support for VM targets.
4119 (Make_Select_Specific_Data_Table): Add support for VM targets.
4120 (Make_VM_TSD): Generate code to initialize the SSD structure of
4121 the TSD.
4122
41232011-08-02 Yannick Moy <moy@adacore.com>
4124
4125 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
4126 cross-references section in ALI.
4127 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
4128 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
4129 Sub).
4130 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
4131 subprogram or package entity of a node
4132 (Is_Local_Reference_Type): new function returns True for references
4133 selected in local cross-references.
4134 (Lt): function extracted from Lt in Output_References
4135 (Write_Entity_Name): function extracted from Output_References
4136 (Generate_Definition): generate reference with type 'D' for definition
4137 of objects (object declaration and parameter specification), with
4138 appropriate locations and units, for use in local cross-references.
4139 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
4140 references of type 'I' for initialization in object definition.
4141 (Output_References): move part of function Lt and procedure
4142 Write_Entity_Name outside of the body. Ignore references of types 'D'
4143 and 'I' introduced for local cross-references.
4144 (Output_Local_References): new procedure to output the local
4145 cross-references sections.
4146 (Lref_Entity_Status): new array defining whether an entity is a local
4147 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
4148 with 'I' type when initialization expression is present.
4149 * get_scos.adb, get_scos.ads: Correct comments and typos
4150
41512011-08-02 Javier Miranda <miranda@adacore.com>
4152
4153 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
4154 the JVM target.
4155 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
4156 the JVM target.
4157 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
4158 TSD support.
4159
41602011-08-02 Vincent Celier <celier@adacore.com>
4161
4162 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
4163 (No_Space_Img): New function
4164 (Find_Excluded_Sources): When reading from a file, record the file name
4165 and the line number for each excluded source.
4166 (Mark_Excluded_Sources): When reporting an error, if the excluded
4167 sources were read from a file, include file name and line number in
4168 the error message.
4169
41702011-08-02 Ed Schonberg <schonberg@adacore.com>
4171
4172 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
4173
41742011-08-02 Robert Dewar <dewar@adacore.com>
4175
4176 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
4177
41782011-08-02 Javier Miranda <miranda@adacore.com>
4179
4180 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
4181 generation of TSDs to the DOTNET compiler.
4182 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
4183 generation of TSDs to the DOTNET compiler.
4184
41852011-08-02 Javier Miranda <miranda@adacore.com>
4186
4187 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
4188 record of all the tagged types declared inside library level package
4189 declarations, library level package bodies or library level subprograms.
4190 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
4191 associated with a given tagged type.
4192 (Build_VM_TSDs): New subprogram.
4193 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
4194 compilation units that are subprograms.
4195 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
4196 compilation units that are package bodies.
4197 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
4198 units that are a package declaration or a package instantiation.
4199 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
4200 reorganization to improve the error generated by the frontend when the
4201 function Ada.Tags.Secondary_Tag is not available.
4202 * rtsfind.ads (RE_Register_TSD): New runtime entity.
4203 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
4204
42052011-08-02 Javier Miranda <miranda@adacore.com>
4206
4207 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
4208
42092011-08-02 Robert Dewar <dewar@adacore.com>
4210
4211 * s-imenne.ads: Minor reformatting.
4212
42132011-08-02 Robert Dewar <dewar@adacore.com>
4214
4215 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
4216 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
4217 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
4218
42192011-08-02 Robert Dewar <dewar@adacore.com>
4220
4221 * einfo.ads (Materialize_Entity): Document this is only for renamings
4222 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
4223 required debug information in the case where we transform the object
4224 declaration into a renaming declaration.
4225 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
4226 object
4227 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
4228 Materialize_Entity.
4229
42302011-08-02 Robert Dewar <dewar@adacore.com>
4231
4232 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
4233 Suppress_Init_Procs.
4234 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
4235 Suppress_Initialization/Initialization_Suppressed.
4236 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
4237 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
4238 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
4239 * sem_prag.adb: New processing for pragma Suppress_Initialization.
4240
42412011-08-02 Robert Dewar <dewar@adacore.com>
4242
4243 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
4244 Minor reformatting.
4245
42462011-08-02 Ed Schonberg <schonberg@adacore.com>
4247
4248 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
4249 only have inheritable classwide pre/postconditions.
4250
42512011-08-02 Javier Miranda <miranda@adacore.com>
4252
4253 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
4254 * rtsfind.ads (RE_Check_TSD): New runtime entity.
4255 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
4256 checks if the external tag of a type is the same as the external tag
4257 of some other declaration.
4258
42592011-08-02 Thomas Quinot <quinot@adacore.com>
4260
4261 * s-taskin.ads: Minor reformatting.
4262
42632011-08-02 Emmanuel Briot <briot@adacore.com>
4264
4265 * g-comlin.adb (Display_Help): swap the order in which it prints the
4266 short help and the general usage.
4267
42682011-08-02 Ed Schonberg <schonberg@adacore.com>
4269
4270 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
4271 the aspect declarations and attach them to the generic copy for
4272 subsequent analysis.
4273 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
4274 declarations of the generic tree to the new subprogram declarations.
4275 * sem_attr.adb (Check_Precondition_Postcondition): recognize
4276 conditions that apply to a subprogram instance.
4277
42782011-08-02 Robert Dewar <dewar@adacore.com>
4279
4280 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
4281
42822011-08-02 Ed Schonberg <schonberg@adacore.com>
4283
4284 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
4285 private type with a tagged full view is not derived in the immediate
4286 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
4287
42882011-08-02 Robert Dewar <dewar@adacore.com>
4289
4290 * exp_ch4.adb: Minor reformatting.
4291
42922011-08-02 Ed Schonberg <schonberg@adacore.com>
4293
4294 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
4295 Ada2012 iterator, the loop will be rewritten during expansion into a
4296 while loop with a cursor and an element declaration. Do not analyze the
4297 body in this case, because if the container is for indefinite types the
4298 actual subtype of the elements will only be determined when the cursor
4299 declaration is analyzed.
4300
43012011-08-02 Arnaud Charlet <charlet@adacore.com>
4302
4303 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
4304 size/alignment related attributes in CodePeer_Mode.
4305
43062011-08-02 Gary Dismukes <dismukes@adacore.com>
4307
4308 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
4309 Prepend_Element, since this can result in the operation getting the
4310 wrong slot in the full type's dispatch table if the full type has
4311 inherited operations. The incomplete type's operation will get added
4312 to the proper position in the full type's primitives
4313 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
4314 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
4315 dispatching operations, since there are cases where nonprimitive
4316 subprograms can get added to the list of incomplete dependents (such
4317 as subprograms in nested packages).
4318 * sem_ch6.adb (Process_Formals): First, remove test for being in a
4319 private part when determining whether to add a primitive with a
4320 parameter of a tagged incomplete type to the Private_Dependents list.
4321 Such primitives can also occur in the visible part, and should not have
4322 been excluded from being private dependents.
4323 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
4324 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
4325 list of a Taft-amendment incomplete type is a primitive before issuing
4326 an error that the full type must appear in the same unit. There are
4327 cases where nonprimitives can be in the list (such as subprograms in
4328 nested packages).
4329 * sem_disp.adb (Derives_From): Use correct condition for checking that
4330 a formal's type is derived from the type of the corresponding formal in
4331 the parent subprogram (the condition was completely wrong). Add
4332 checking that was missing for controlling result types being derived
4333 from the result type of the parent operation.
4334
43352011-08-02 Yannick Moy <moy@adacore.com>
4336
4337 * errout.adb (First_Node): minor renaming
4338 * restrict.adb (Check_Formal_Restriction): put restriction warning on
4339 first node.
4340
43412011-08-02 Yannick Moy <moy@adacore.com>
4342
4343 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
4344 before accessing operands.
4345 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
4346 decide whether an initialization expression respects SPARK rules, as
4347 the plain node is the expanded one. This allows for more valid warnings
4348 to be issued.
4349 * gnat_rm.texi: Minor update.
4350
43512011-08-02 Arnaud Charlet <charlet@adacore.com>
4352
4353 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
4354 previous change.
4355
43562011-08-02 Robert Dewar <dewar@adacore.com>
4357
4358 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
4359
43602011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4361
4362 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
4363 loop statements and the element renaming declaration with a block when
4364 the element type is controlled.
4365
43662011-08-02 Yannick Moy <moy@adacore.com>
4367
4368 * sinfo.ads: Minor formatting.
4369
43702011-08-02 Ed Schonberg <schonberg@adacore.com>
4371
4372 * sem_aggr.adb (Add_Association): if the association has a box and no
4373 expression, use the Sloc of the aggregate itself for the new
4374 association.
4375 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
4376 the Original_Node.
4377
43782011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4379
4380 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
4381 When a container is provided via a function call, generate a renaming
4382 of the function result. This avoids the creation of a transient scope
4383 and the premature finalization of the container.
4384 * exp_ch7.adb (Is_Container_Cursor): Removed.
4385 (Wrap_Transient_Declaration): Remove the supression of the finalization
4386 of the list controller when the declaration denotes a container cursor,
4387 it is not needed.
4388
43892011-08-02 Yannick Moy <moy@adacore.com>
4390
4391 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
4392 node is from source, instead of the original node being from source.
4393 * sem_aggr.adb
4394 (Resolve_Array_Aggregate): refine the check for a static expression, to
4395 recognize also static ranges
4396 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
4397 Array_Type_Declaration): postpone the test for the type being a subtype
4398 mark after the type has been resolved, so that component-selection and
4399 expanded-name are discriminated.
4400 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
4401 to distinguish the case of an iteration scheme, so that an error is
4402 issed on a non-static range in SPARK except in an iteration scheme.
4403 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
4404 In_Iter_Schm = True.
4405 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
4406 user-defined operators so that they are allowed in renaming
4407 * sem_ch8.adb
4408 (Find_Selected_Component): refine the check for prefixing of operators
4409 so that they are allowed in renaming. Move the checks for restrictions
4410 on selector name after analysis discriminated between
4411 component-selection and expanded-name.
4412 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
4413 concatenation argument of string type if it is static.
4414 * sem_util.adb, sem_util.ads
4415 (Check_Later_Vs_Basic_Declarations): add a new function
4416 Is_Later_Declarative_Item to decice which declarations are allowed as
4417 later items, in the two different modes Ada 83 and SPARK. In the SPARK
4418 mode, add that renamings are considered as later items.
4419 (Enclosing_Package): new function to return the enclosing package
4420 (Enter_Name): correct the rule for homonyms in SPARK
4421 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
4422 from source (result of expansion) to avoid issuing wrong warnings.
4423
44242011-08-02 Ed Schonberg <schonberg@adacore.com>
4425
4426 * errout.adb: On anything but an expression First_Node returns its
4427 argument.
4428
44292011-08-02 Pascal Obry <obry@adacore.com>
4430
4431 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
4432
44332011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
4434
4435 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
4436 Set the associated loop as the related expression of internally
4437 generated cursors.
4438 * exp_ch7.adb (Is_Container_Cursor): New routine.
4439 (Wrap_Transient_Declaration): Supress the finalization of the list
4440 controller when the declaration denotes a container cursor.
4441
44422011-08-02 Yannick Moy <moy@adacore.com>
4443
4444 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
4445 command line now.
4446 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
4447 expression is a simple expression. This check cannot be performed in
4448 the semantics, so just drop it.
4449 (P_Index_Or_Discriminant_Constraint): move check that the index or
4450 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
4451 semantics. Other cases were previously checked in the semantics.
4452 * par-ch4.adb (P_Name): move checks that a selector name is not
4453 character literal or an operator symbol to Find_Selected_Component in
4454 the semantics
4455 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
4456 declarations are not placed after later declarations in a separate
4457 procedure in Sem_Util (possibly not the best choice?), to be used both
4458 during parsing, for Ada 83 mode, and during semantic analysis, for
4459 SPARK mode.
4460 * par-endh.adb (Check_End): move check that end label is not missing
4461 to Process_End_Label in the semantics
4462 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
4463 the special case for SPARK restriction
4464 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
4465 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
4466 parameter Force to issue the error message even on internal node (used
4467 for generated end label). Call Check_Restriction to check when an error
4468 must be issued. In SPARK mode, issue an error message even if the
4469 restriction is not set.
4470 (Check_Restriction): new procedure with an additional out parameter to
4471 inform the caller that a message has been issued
4472 * sem_aggr.adb: Minor modification of message
4473 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
4474 instead of issuing an error message directly
4475 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
4476 declarations are not placed after later declarations, by calling
4477 Check_Later_Vs_Basic_Declarations
4478 (Analyze_Subtype_Declaration): move here the check that an index or
4479 discriminant constraint must be a subtype mark. Change the check that
4480 a subtype of String must start at one so that it works on subtype marks.
4481 * sem_ch4.adb (Analyze_Call): move here the check that a named
4482 association cannot follow a positional one in a call
4483 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
4484 instead of issuing an error message directly
4485 * sem_ch8.adb (Find_Selected_Component): move here the check that a
4486 selector name is not a character literal or an operator symbol. Move
4487 here the check that the prefix of an expanded name cannot be a
4488 subprogram or a loop statement.
4489 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
4490 procedure called from parsing and semantics to check that basic
4491 declarations are not placed after later declarations
4492 (Process_End_Label): move here the check that end label is not missing
4493
44942011-08-02 Arnaud Charlet <charlet@adacore.com>
4495
4496 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
4497 representation clause in codepeer mode, since it confuses CodePeer and
4498 does not bring useful info.
4499
45002011-08-02 Ed Falis <falis@adacore.com>
4501
4502 * init.c: initialize fp hw on MILS.
4503
45042011-08-02 Ed Schonberg <schonberg@adacore.com>
4505
4506 * errout.adb (First_Node): for bodies, return the node itself (small
4507 optimization). For other nodes, do not check source_unit if the node
4508 comes from Standard.
4509
45102011-08-02 Robert Dewar <dewar@adacore.com>
4511
4512 * exp_ch3.adb: Minor comment additions.
4513 * sem_ch13.adb: Minor reformatting.
4514
45152011-08-02 Pascal Obry <obry@adacore.com>
4516
4517 * make.adb, makeutl.adb: Removes some superfluous directory separator.
4518
45192011-08-02 Robert Dewar <dewar@adacore.com>
4520
4521 * sem_attr.adb: Minor reformatting.
4522
45232011-08-02 Robert Dewar <dewar@adacore.com>
4524
4525 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
4526 (Has_Default_Component_Value): Removed
4527 * einfo.ads Comment updates
4528 (Has_Default_Aspect): Replaces Has_Default_Value
4529 (Has_Default_Component_Value): Removed
4530 * exp_ch13.adb
4531 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
4532 * exp_ch3.adb
4533 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
4534 (Get_Simple_Init_Val): Handle Default_Value aspect
4535 (Needs_Simple_Initialization): Handle Default_Value aspect
4536 * exp_ch3.ads: Needs_Simple_Initialization
4537 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
4538 * par-prag.adb (Pragma_Default[_Component]Value) Removed
4539 * sem_ch13.adb
4540 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
4541 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
4542 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
4543
45442011-08-02 Ed Schonberg <schonberg@adacore.com>
4545
4546 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
4547 package containing iteration primitives.
4548 exp_ch5.adb (Expand_Iterator_Loop): ditto.
4549
45502011-08-02 Ed Schonberg <schonberg@adacore.com>
4551
4552 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
4553 "of", pre-analyze expression in case it is a function call with
4554 finalization actions that must be placed ahead of the loop.
4555 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
4556 on an Ada2012 iterator, insert them ahead of the rewritten loop.
4557
45582011-08-02 Geert Bosch <bosch@adacore.com>
4559
4560 * cstand.adb (Create_Float_Types): Only consider C's long double for
4561 Long_Long_Float, in addition to double.
4562
45632011-08-02 Robert Dewar <dewar@adacore.com>
4564
4565 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
4566 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
4567 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
4568 Minor reformatting.
4569
45702011-08-02 Ed Schonberg <schonberg@adacore.com>
4571
4572 * sem_attr.adb: handle properly 'Result when it is a prefix of an
4573 indexed component.
4574
45752011-08-02 Javier Miranda <miranda@adacore.com>
4576
4577 * einfo.ads, einfo.adb
4578 (Original_Access_Type): Move this attribute to Node26 since there was
4579 an undocumented use of Node21 in E_Access_Subprogram_Type entities
4580 which causes conflicts and breaks the generation of the .NET compiler.
4581 (Interface_Name): Add missing documentation on JGNAT only uses of
4582 this attribute.
4583
45842011-08-02 Geert Bosch <bosch@adacore.com>
4585
4586 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
4587 (Find_Back_End_Float_Type): Likewise
4588 (Create_Back_End_Float_Types): Likewise
4589 (Create_Float_Types): Likewise
4590 (Register_Float_Type): Likewise
4591 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
4592 Nlist and split out type selection in new local Find_Base_Type function.
4593 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
4594 Nlist
4595 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
4596
45972011-08-02 Robert Dewar <dewar@adacore.com>
4598
4599 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
4600 alpha order).
4601 * opt.ads: Minor comment change.
4602 * sem_ch12.adb: Minor code reorganization.
4603
46042011-08-02 Gary Dismukes <dismukes@adacore.com>
4605
4606 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
4607 subtype's list of rep items to the list on the full subtype in the case
4608 where the lists are the same.
4609
46102011-08-02 Geert Bosch <bosch@adacore.com>
4611
4612 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
4613 using the one from System.Strings, which also deallocates all strings.
4614
46152011-08-02 Geert Bosch <bosch@adacore.com>
4616
4617 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
4618 function.
4619 * gcc-interface/Make-lang.in: Update dependencies.
4620
46212011-08-02 Olivier Hainque <hainque@adacore.com>
4622
4623 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
4624 end_locus.
4625
46262011-08-02 Javier Miranda <miranda@adacore.com>
4627
4628 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
4629 associated with anonymous access to subprograms.
4630
46312011-08-02 Geert Bosch <bosch@adacore.com>
4632
4633 * opt.ads
4634 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
4635 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
4636 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
4637 (Add_Symbol_Definition): Move to switch-c.adb
4638 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
4639 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
4640 (Add_Symbol_Definition): Move to switch-c.adb.
4641 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
4642 * sem_warn.adb
4643 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4644 Move to warnsw.adb.
4645 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
4646 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
4647 Move to warnsw.adb.
4648 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
4649 (Add_Symbol_Definition): Moved from Prepcomp.
4650 * switch-c.ads: Update copyright notice. Use String_List instead of
4651 Argument_List, removing dependency on System.OS_Lib.
4652
46532011-08-02 Yannick Moy <moy@adacore.com>
4654
4655 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
4656 mode on initialization expression which does not respect SPARK
4657 restrictions.
4658 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
4659 if the tree referenced by its argument represents an initialization
4660 expression in SPARK, suitable for initializing an object in an object
4661 declaration.
4662
46632011-08-02 Javier Miranda <miranda@adacore.com>
4664
4665 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
4666 internally generated access to subprogram with its associated protected
4667 subprogram type.
4668 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
4669
46702011-08-02 Geert Bosch <bosch@adacore.com>
4671
4672 * cstand.adb (Register_Float_Type): Print information about type to
4673 register, if the Debug_Flag_Dot_B is set.
4674 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
4675 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
4676 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
4677 with a requested precision of more than Max_Digits digits and no more
4678 than Max_Base_Digits digits, if a range specification is present and the
4679 Predefined_Float_Types list has a suitable type to derive from.
4680 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
4681 case of type completion with pragma Import
4682 * sem_prag.adb
4683 (Process_Import_Predefined_Type): Processing to complete a type
4684 with pragma Import. Currently supports floating point types only.
4685 (Set_Convention_From_Pragma): Do nothing without underlying type.
4686 (Process_Convention): Guard against absence of underlying type,
4687 which may happen when importing incomplete types.
4688 (Process_Import_Or_Interface): Handle case of importing predefined
4689 types. Tweak error message.
4690
46912011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4692
4693 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
4694 functions to previous change. Reorganize code slightly.
4695
46962011-08-02 Geert Bosch <bosch@adacore.com>
4697
4698 * back_end.ads (Register_Type_Proc): New call back procedure type for
4699 allowing the back end to provide information about available types.
4700 (Register_Back_End_Types): New procedure to register back end types.
4701 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
4702 available types.
4703 * cstand.adb (Back_End_Float_Types): New list for floating point types
4704 supported by the back end.
4705 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
4706 (Copy_Float_Type): New procedure to make new copies of predefined types.
4707 (Register_Float_Type): New call back procedure to populate the BEFT list
4708 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
4709 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
4710 (Create_Float_Types): New procedure to create entities for floating
4711 point types predefined in Standard, and put these and any remaining
4712 BEFTs on the Predefined_Float_Types list.
4713 * stand.ads (Predefined_Float_Types): New list for predefined floating
4714 point types that do not have declarations in package Standard.
4715
47162011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4717
4718 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
4719 entity node for the unit containing the parameter.
4720 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
4721 (Add_Inlined_Subprogram): Likewise.
4722 * gcc-interface/Make-lang.in: Update dependencies.
4723
47242011-08-02 Thomas Quinot <quinot@adacore.com>
4725
4726 * s-stusta.adb (Print): Make sure Pos is always initialized to a
4727 suitable value.
4728
47292011-08-02 Geert Bosch <bosch@adacore.com>
4730
4731 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
4732
47332011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4734
4735 * sem_type.adb (Covers): Move trivial case to the top and reuse the
4736 computed value of Base_Type.
4737
47382011-08-02 Yannick Moy <moy@adacore.com>
4739
4740 * restrict.adb (Check_Restriction): issue an error for any use of
4741 class-wide, even if the No_Dispatch restriction is not set.
4742 * sem_aggr.adb: Correct typos in comments and messages in formal mode
4743 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
4744 when completing a private extension, the type named in the private part
4745 is not the same as that named in the visible part.
4746 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
4747 of an inherited primitive operations of a tagged type or type extension
4748 that returns the tagged type.
4749 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
4750 function which returns True for an implicit operation inherited by the
4751 derived type declaration for the argument type.
4752 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
4753 order.
4754
47552011-08-02 Ed Schonberg <schonberg@adacore.com>
4756
4757 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
4758 Process_Bounds, to perform analysis with expansion of a range or an
4759 expression that is the iteration scheme for a loop.
4760 (Analyze_Iterator_Specification): If domain of iteration is given by a
4761 function call with a controlled result, as is the case if call returns
4762 a predefined container, ensure that finalization actions are properly
4763 generated.
4764 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
4765
47662011-08-02 Javier Miranda <miranda@adacore.com>
4767
4768 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
4769 * gcc-interface/Make-lang.in: Update dependencies.
4770
47712011-08-02 Javier Miranda <miranda@adacore.com>
4772
4773 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
4774 determine if the analysis is performed using N or Original_Node (N).
4775 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
4776 functionality of routine Is_Variable avoids code duplication.
4777 * checks.adb (Determine_Range): Handle temporaries generated by
4778 Remove_Side_Effects.
4779
47802011-08-02 Javier Miranda <miranda@adacore.com>
4781
4782 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
4783 expansion of the condition. Required since the previous analysis was
4784 done with expansion disabled (see Resolve_Quantified_Expression) and
4785 hence checks were not inserted and record comparisons have not been
4786 expanded.
4787
47882011-08-02 Ed Falis <falis@adacore.com>
4789
4790 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
4791 Update header.
4792
47932011-08-02 Bob Duff <duff@adacore.com>
4794
4795 * opt.ads: Minor comment fix.
4796
47972011-08-02 Bob Duff <duff@adacore.com>
4798
4799 * sem_ch12.adb (Analyze_Package_Instantiation,
4800 Analyze_Subprogram_Instantiation): Turn off style checking while
4801 analyzing an instance. Whatever style checks that apply to the generic
4802 unit should apply, so it makes no sense to apply them in an instance.
4803 This was causing trouble when compiling an instance of a runtime
4804 unit that violates the -gnatyO switch.
4805 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
4806 one of the two case statements, causing spurious errors.
4807
48082011-08-02 Robert Dewar <dewar@adacore.com>
4809
4810 * uname.adb: Minor reformatting.
4811 * gnatcmd.adb: Minor reformatting.
4812 * exp_attr.adb: Minor reformatting.
4813
48142011-08-02 Ed Schonberg <schonberg@adacore.com>
4815
4816 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
4817 No_Dispatching_Calls, do not look for the Assign primitive, because
4818 predefined primitives are not created in this case.
4819
48202011-08-02 Bob Duff <duff@adacore.com>
4821
4822 * stylesw.ads: Minor comment fixes.
4823
48242011-08-02 Robert Dewar <dewar@adacore.com>
4825
4826 * freeze.adb (Add_To_Result): New procedure.
4827
48282011-08-02 Jose Ruiz <ruiz@adacore.com>
4829
4830 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
4831 time, if the specific run-time routines for handling streams of strings
4832 are not available, use the default mechanism.
4833
48342011-08-02 Arnaud Charlet <charlet@adacore.com>
4835
4836 * s-regpat.ads: Fix typo.
4837
48382011-08-02 Vincent Celier <celier@adacore.com>
4839
4840 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
4841 not null, call it to create the in memory config project file without
4842 parsing an existing default config project file.
4843
48442011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4845
4846 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
4847
48482011-08-02 Ed Schonberg <schonberg@adacore.com>
4849
4850 * sem_elim.adb: an abstract subprogram does not need an eliminate
4851 pragma for its descendant to be eliminable.
4852
48532011-08-02 Ed Falis <falis@adacore.com>
4854
4855 * init.c: revert to handling before previous checkin for VxWorks
4856 * s-intman-vxworks.adb: delete unnecessary declarations related to
4857 using Ada interrupt facilities for handling signals.
4858 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
4859 * s-intman-vxworks.ads: Import __gnat_install_handler as
4860 Initialize_Interrupts.
4861 * s-taprop-vxworks.adb: Delete Signal_Mask.
4862 (Abort_Handler): change construction of mask to unblock exception
4863 signals.
4864
48652011-08-02 Jerome Guitton <guitton@adacore.com>
4866
4867 * a-except-2005.adb (Raise_From_Signal_Handler): Call
4868 Debug_Raise_Exception before propagation starts.
4869
48702011-08-02 Eric Botcazou <ebotcazou@adacore.com>
4871
4872 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
4873 to Restriction_Check_Required.
4874 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
4875 * sem_res.adb (Resolve_Call): Likewise.
4876 * sem_attr.adb (Check_Stream_Attribute): Likewise.
4877
48782011-08-02 Bob Duff <duff@adacore.com>
4879
4880 * stylesw.ads: Update comment.
4881 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
4882 * errout.ads: Remove obsolete comment.
4883
48842011-08-02 Javier Miranda <miranda@adacore.com>
4885
4886 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
4887 (Set_Is_Safe_To_Reevaluate): new procedure.
4888 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
4889 assignment is allowed on safe-to-reevaluate variables.
4890 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
4891 temporary created to remove side effects in expressions that use
4892 the secondary stack as safe-to-reevaluate.
4893 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
4894 variables that are not true constants.
4895
48962011-08-02 Robert Dewar <dewar@adacore.com>
4897
4898 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
4899 sem_res.adb, sem_ch6.adb: Minor reformatting.
4900
49012011-08-02 Jerome Guitton <guitton@adacore.com>
4902
4903 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
4904
49052011-08-02 Ed Schonberg <schonberg@adacore.com>
4906
4907 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
4908 not set Overridden_Operation if subprogram is an initialization
4909 procedure.
4910
49112011-08-02 Yannick Moy <moy@adacore.com>
4912
4913 * par-ch6.adb: Correct obsolete name in comments
4914 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
4915 which takes two message arguments (existing function takes one), with
4916 second message used for continuation.
4917 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
4918 block statements that originate from a source block statement, not
4919 generated block statements
4920 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
4921 symmetry with procedure case
4922 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
4923 function to issue an error in formal mode if a package specification
4924 contains more than one tagged type or type extension.
4925 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
4926 parameters matching formals of tagged types are objects (or ancestor
4927 type conversions of objects), not general expressions. Issue an error
4928 on view conversions that are not involving ancestor conversion of an
4929 extended type.
4930 (Resolve_Type_Conversion): in formal mode, issue an error on the
4931 operand of an ancestor type conversion which is not an object
4932 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
4933 procedure so that it works also for actuals of function calls
4934 (Is_Actual_Tagged_Parameter): new function which determines if its
4935 argument is an actual parameter of a formal of tagged type in a
4936 subprogram call
4937 (Is_SPARK_Object_Reference): new function which determines if the tree
4938 referenced by its argument represents an object in SPARK
4939
49402011-08-02 Robert Dewar <dewar@adacore.com>
4941
4942 * sem_ch3.adb: Minor reformatting
4943 Minor comment addition
4944 Minor error msg text change
4945
49462011-08-02 Javier Miranda <miranda@adacore.com>
4947
4948 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
4949 function. Used to be more precise when we generate a variable plus one
4950 assignment to remove side effects in the evaluation of the Bound
4951 expressions.
4952 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
4953 of the bound expression to force its re-analysis and thus expand the
4954 associated transient scope (if required). Code cleanup replacing the
4955 previous code that declared the constant entity by an invocation to
4956 routine Force_Evaluation which centralizes this work in the frontend.
4957
49582011-08-02 Robert Dewar <dewar@adacore.com>
4959
4960 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
4961 (Base_Type): Now uses improved Is_Base_Type function
4962 * einfo.ads (Base_Type): Inline this function
4963
49642011-08-02 Robert Dewar <dewar@adacore.com>
4965
4966 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
4967 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
4968
49692011-08-02 Arnaud Charlet <charlet@adacore.com>
4970
4971 * gcc-interface/Make-lang.in: Update dependencies.
4972 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
4973 targets.
4974
49752011-08-02 Yannick Moy <moy@adacore.com>
4976
4977 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
4978 non-simple expression used in delta constraint
4979 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
4980 index constraint which is not a subtype mark
4981 * par.adb: With and use Restrict
4982 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
4983 mode on component type which is not a subtype mark and default
4984 expression on component
4985 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
4986 of string which does not have a lower index bound equal to 1
4987 (Array_Type_Declaration): issue an error in formal mode on index or
4988 component type which is not a subtype mark, and on aliased keyword on
4989 component
4990 (Derived_Type_Declaration): issue an error in formal mode on interface,
4991 limited or abstract type
4992 (Record_Type_Declaration): issue an error in formal mode on interface
4993 (Record_Type_Definition): issue an error in formal mode on tagged types
4994 and type extensions not declared in the specification of a library unit
4995 package; on null non-tagged record; on variant part
4996
49972011-08-02 Vincent Celier <celier@adacore.com>
4998
4999 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
5000 not declared for qualified library project when Library_Name is not
5001 declared, but Library_Dir is.
5002
50032011-08-02 Robert Dewar <dewar@adacore.com>
5004
5005 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
5006 pragmas (affects aspects [Component_]Default_Value
5007 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
5008 component type for the resolution
5009
50102011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5011
5012 * einfo.adb (Base_Type): Tune implementation for speed.
5013
50142011-08-02 Robert Dewar <dewar@adacore.com>
5015
5016 * freeze.adb: Minor reformatting.
5017
50182011-08-02 Thomas Quinot <quinot@adacore.com>
5019
5020 * scos.ads: Update comments.
5021
50222011-08-02 Ed Schonberg <schonberg@adacore.com>
5023
5024 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
5025 base type, because the parent may be a subtype of a private type whose
5026 convention is established in a private part.
5027
50282011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
5029
5030 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
5031 statement in a block when the expansion of the return expression has
5032 created a finalization chain.
5033 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
5034 with the parent node.
5035 Add N_Extended_Return_Statement to handle the case where a transient
5036 object declaration appears in the Return_Object_Declarations list of
5037 an extended return statement.
5038
50392011-08-02 Matthew Gingell <gingell@adacore.com>
5040
5041 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
5042 unused parameter 'name'.
5043
50442011-08-02 Ed Schonberg <schonberg@adacore.com>
5045
5046 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
5047 inherited operation, check whether its alias, which is the source
5048 operastion that it renames, has been marked eliminated.
5049
50502011-08-02 Javier Miranda <miranda@adacore.com>
5051
5052 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
5053 in-mode parameter whose type is an access type since it can be used to
5054 modify its designated object. Enforce code that handles as safe an
5055 access type that is not access-to-constant but it is the result of a
5056 previous removal of side-effects.
5057 (Remove_Side_Effects): Minor code reorganization of cases which require
5058 no action. Done to incorporate documentation on new cases uncovered
5059 working in this ticket: no action needed if this routine was invoked
5060 too early and the nodes are not yet decorated.
5061 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
5062 to routine Remove_Side_Effects by calls to Force_Evaluation since they
5063 were issued with actuals that are implicitly provided by
5064 Force_Evaluation.
5065
50662011-08-02 Robert Dewar <dewar@adacore.com>
5067
5068 * sem_ch3.adb, sem_res.adb: Minor reformatting.
5069
50702011-08-02 Yannick Moy <moy@adacore.com>
5071
5072 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
5073 to issue an error in formal mode on attribute not supported in this mode
5074 (Analyze_Attribute): issue errors on standard attributes not supported
5075 in formal mode.
5076 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
5077 comment, and issue error in formal mode on modulus which is not a power
5078 of 2.
5079 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
5080 range.
5081 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
5082 subtype mark.
5083 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
5084 operator on modular type (except 'not').
5085
50862011-08-02 Robert Dewar <dewar@adacore.com>
5087
5088 * gnat_rm.texi: Minor reformatting.
5089
50902011-08-02 Arnaud Charlet <charlet@adacore.com>
5091
5092 * s-osinte-linux.ads: Minor comment update and reformatting.
5093 * i-cexten.ads: Make this unit pure, as for its parent.
5094 Will allow its usage in more contexts if needed.
5095
50962011-08-02 Robert Dewar <dewar@adacore.com>
5097
5098 * s-utf_32.ads: Minor comment fix.
5099
51002011-08-02 Ed Schonberg <schonberg@adacore.com>
5101
5102 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
5103 operation of a tagged synchronized type, handle the case where the
5104 controlling argument is overloaded.
5105
51062011-08-02 Yannick Moy <moy@adacore.com>
5107
5108 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
5109 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
5110 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
5111 SPARK mode and formal verification mode on processing SPARK restriction
5112 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
5113 requiring consistency checking.
5114
51152011-08-02 Robert Dewar <dewar@adacore.com>
5116
5117 * sem_res.adb: Minor reformatting.
5118
51192011-08-02 Robert Dewar <dewar@adacore.com>
5120
5121 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5122 a-cforse.ads: Remove unneeded with of Ada.Containers
5123 Remove commented out pragma Inline's
5124 Move specifications of new subprograms to the actual specs
5125
51262011-08-02 Yannick Moy <moy@adacore.com>
5127
5128 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5129 a-cforse.ads: Update comments.
5130
51312011-08-02 Ed Schonberg <schonberg@adacore.com>
5132
5133 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
5134
51352011-08-02 Robert Dewar <dewar@adacore.com>
5136
5137 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
5138 a-cforse.ads, a-cofove.ads: Minor reformatting.
5139
51402011-08-02 Claire Dross <dross@adacore.com>
5141
5142 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
5143 a-cofove.ads: Add comments.
5144
51452011-08-02 Yannick Moy <moy@adacore.com>
5146
5147 * gnat_rm.texi: Document formal containers.
5148
51492011-08-02 Emmanuel Briot <briot@adacore.com>
5150
5151 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
5152 are empty sections.
5153
51542011-08-02 Robert Dewar <dewar@adacore.com>
5155
5156 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
5157 reformatting.
5158
51592011-08-02 Robert Dewar <dewar@adacore.com>
5160
5161 * aspects.adb: New aspects Default_Value and Default_Component_Value
5162 New format of Aspect_Names table checks for omitted entries
5163 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
5164 handling of boolean aspects for derived types.
5165 New aspects Default_Value and Default_Component_Value
5166 New format of Aspect_Names table checks for omitted entries
5167 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
5168 (Has_Default_Value): New flag
5169 (Has_Default_Component_Value): New flag
5170 (Has_Default_Value): New flag
5171 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
5172 table.
5173 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
5174 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
5175 Default_Value and Default_Component_Value
5176 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
5177 New aspects Default_Value and Default_Component_Value
5178 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
5179 * sprint.adb: Print N_Aspect_Specification node when called from gdb
5180
51812011-08-02 Vincent Celier <celier@adacore.com>
5182
5183 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
5184 inherit library kind.
5185
51862011-08-02 Ed Schonberg <schonberg@adacore.com>
5187
5188 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
5189 Minor reformatting.
5190
51912011-08-02 Robert Dewar <dewar@adacore.com>
5192
5193 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
5194
51952011-08-02 Yannick Moy <moy@adacore.com>
5196
5197 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
5198
51992011-08-02 Robert Dewar <dewar@adacore.com>
5200
5201 * impunit.adb: Add comment.
5202
52032011-08-02 Yannick Moy <moy@adacore.com>
5204
5205 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
5206 qualification of aggregates in formal mode
5207 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
5208 another aggregate
5209 (Resolve_Aggregate): complete the test that an aggregate is adequately
5210 qualified in formal mode
5211
52122011-08-02 Pascal Obry <obry@adacore.com>
5213
5214 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
5215 * mlib-prj.adb: Supress warning when compiling binder generated file.
5216 (Build_Library): Supress all warnings when compiling the binder
5217 generated file.
5218
52192011-08-02 Yannick Moy <moy@adacore.com>
5220
5221 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
5222 from here...
5223 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
5224 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
5225 Add with/use clauses to make Check_Formal_Restriction visible
5226
52272011-08-02 Ed Schonberg <schonberg@adacore.com>
5228
5229 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
5230 in-parameters when type of the generic formal is private in the generic
5231 spec and non-private in the body.
5232
52332011-08-02 Claire Dross <dross@adacore.com>
5234
5235 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
5236 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
5237 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
5238 * impunit.adb, Makefile.rtl: Take new files into account.
5239
52402011-08-02 Robert Dewar <dewar@adacore.com>
5241
5242 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
5243 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
5244
52452011-08-02 Yannick Moy <moy@adacore.com>
5246
5247 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
5248 formal mode
5249 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
5250 matching static array bounds, taking into account the special case of
5251 string literals
5252 * sem_ch3.adb: Typo in comment.
5253
52542011-08-02 Yannick Moy <moy@adacore.com>
5255
5256 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
5257 which issues an error in formal mode if its argument node is originally
5258 from source
5259 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
5260 has a discriminant specification so that it does not include the case
5261 of derived types
5262 (Derived_Type_Declaration): move here the test that a derived type has a
5263 discriminant specification
5264 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
5265 first element of a component association before accessing its choices
5266 (presence of component association is not enough)
5267 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
5268 declaration is a library item before accessing the next element in a
5269 list, as library items are not member of lists
5270 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
5271 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
5272 Check_Formal_Restriction whenever possible.
5273
52742011-08-02 Ed Schonberg <schonberg@adacore.com>
5275
5276 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
5277 reference when needed.
5278
52792011-08-02 Bob Duff <duff@adacore.com>
5280
5281 * gnat_ugn.texi: Fix typo.
5282
52832011-08-02 Vincent Celier <celier@adacore.com>
5284
5285 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
5286 archive file name. Do not use the full path name of archives for Open
5287 VMS.
5288
52892011-08-02 Robert Dewar <dewar@adacore.com>
5290
5291 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
5292 Analyze_Aspect_Specifications
5293 * sem_ch13.adb
5294 (Analyze_Aspect_Specifications): New handling for boolean aspects
5295 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
5296 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
5297 sequence for Analyze_Aspect_Specifications
5298 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
5299 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
5300
53012011-08-02 Robert Dewar <dewar@adacore.com>
5302
5303 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
5304 aspects, since these no longer exist.
5305
53062011-08-02 Robert Dewar <dewar@adacore.com>
5307
5308 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
5309 semicolon, do not try to see if there are aspects following it.
5310 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
5311 aspect spec.
5312
53132011-08-02 Robert Dewar <dewar@adacore.com>
5314
5315 * sem_ch8.adb, aspects.ads: Minor reformatting.
5316
53172011-08-02 Eric Botcazou <ebotcazou@adacore.com>
5318
5319 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
5320 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
5321 extracted from...
5322 (Analyze_Aspect_Specifications): ...here. Call above procedure.
5323
53242011-08-02 Yannick Moy <moy@adacore.com>
5325
5326 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
5327 mode on subprogram declaration outside of package specification, unless
5328 it is followed by a pragma Import
5329 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
5330 Access_Type_Declaration): issue error in formal mode on access type
5331 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
5332 incomplete type
5333 (Analyze_Object_Declaration): issue error in formal mode on object
5334 declaration which does not respect SPARK restrictions
5335 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
5336 declaration which does not respect SPARK restrictions
5337 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
5338 error in formal mode on digits or delta constraint
5339 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
5340 decimal fixed point type
5341 (Derived_Type_Declaration): issue error in formal mode on derived type
5342 other than type extensions of tagged record types
5343 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
5344 with check on access definition
5345 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
5346 mode on protected definition.
5347 (Analyze_Task_Definition): issue error in formal mode on task definition
5348
53492011-08-02 Robert Dewar <dewar@adacore.com>
5350
5351 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
5352
53532011-08-02 Javier Miranda <miranda@adacore.com>
5354
5355 * sem_ch6.adb (Can_Override_Operator): New function.
5356 (Verify_Overriding_Indicator): Add missing code to check overriding
5357 indicator in operators. Fixes regression.
5358 (Check_Overriding_Indicator): Minor reformating after replacing the
5359 code that evaluates if the subprogram can override an operator by
5360 invocations to the above new function.
5361 * einfo.adb
5362 (Write_Field26_Name): Add missing code to ensure that, following
5363 the documentation in einfo.ads, this field is not shown as attribute
5364 "Static_Initialization" on non-dispatching functions.
5365
53662011-08-02 Jose Ruiz <ruiz@adacore.com>
5367
5368 * sem_res.adb (Resolve_Call): A call to
5369 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
5370 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
5371 i.e., when the second parameter is of type Time_Span.
5372
53732011-08-02 Vincent Celier <celier@adacore.com>
5374
5375 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
5376 with an archive instead of -L<library dir> -l<library name>.
5377
53782011-08-02 Ed Schonberg <schonberg@adacore.com>
5379
5380 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
5381 mark the base types In_Use in addition to making the operations
5382 use_visible.
5383
53842011-08-02 Ed Falis <falis@adacore.com>
5385
5386 * init.c: add and setup __gnat_signal_mask for the exception signals
5387 * s-inmaop-vxworks.adb: new file.
5388 * s-intman-vxworks.adb: remove unnecessary initializations and
5389 simplify remaining
5390 * s-intman-vxworks.ads: remove unnecessary variable
5391 * s-taprop-vxworks.adb: simplify signal initialization
5392
53932011-08-02 Robert Dewar <dewar@adacore.com>
5394
5395 * sem_ch8.adb: Minor code reorganization, comment updates.
5396
53972011-08-02 Robert Dewar <dewar@adacore.com>
5398
5399 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
5400 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
5401 here from Sem_Res.
5402 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
5403 (Matching_Static_Array_Bounds): Moved here from Sem_Res
5404
54052011-08-02 Ed Schonberg <schonberg@adacore.com>
5406
5407 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
5408 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
5409 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
5410 use_type_clauses, to handle more efficiently use_type and use_all_type
5411 constructs.
5412 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
5413 Ada2012 Use_All_Type clause.
5414 (Use_Class_Wide_Operations): new procedure.
5415
54162011-08-02 Robert Dewar <dewar@adacore.com>
5417
5418 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
5419 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
5420 expression to expression function.
5421
54222011-08-02 Ed Schonberg <schonberg@adacore.com>
5423
5424 * sem_ch4.adb: transform simple Ada2012 membership into equality only
5425 if types are compatible.
5426
54272011-08-02 Yannick Moy <moy@adacore.com>
5428
5429 * sem_res.adb (Matching_Static_Array_Bounds): new function which
5430 returns True if its argument array types have same dimension and same
5431 static bounds at each index.
5432 (Resolve_Actuals): issue an error in formal mode on actuals passed as
5433 OUT or IN OUT paramaters which are not view conversions in SPARK.
5434 (Resolve_Arithmetic_Op): issue an error in formal mode on
5435 multiplication or division with operands of fixed point types which are
5436 not qualified or explicitly converted.
5437 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
5438 Boolean or array type (except String) operands.
5439 (Resolve_Equality_Op): issue an error in formal mode on equality
5440 operators for array types other than String with non-matching static
5441 bounds.
5442 (Resolve_Logical_Op): issue an error in formal mode on logical operators
5443 for array types with non-matching static bounds. Factorize the code in
5444 Matching_Static_Array_Bounds.
5445 (Resolve_Qualified_Expression): issue an error in formal mode on
5446 qualified expressions for array types with non-matching static bounds.
5447 (Resolve_Type_Conversion): issue an error in formal mode on type
5448 conversion for array types with non-matching static bounds
5449
54502011-08-02 Robert Dewar <dewar@adacore.com>
5451
5452 * par-ch10.adb: Minor code reorganization (use Nkind_In).
5453
54542011-08-02 Ed Schonberg <schonberg@adacore.com>
5455
5456 * par-ch9.adb: save location of entry for proper error message.
5457
54582011-08-02 Javier Miranda <miranda@adacore.com>
5459
5460 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
5461 (Use_Full_View) which permits this routine to climb through the
5462 ancestors using the full-view of private parents.
5463 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
5464 Use_Full_View to true in calls to Is_Ancestor.
5465 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
5466 true in call to Is_Ancestor.
5467 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
5468 Use_Full_View to true in call to Is_Ancestor.
5469 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
5470 call to Is_Ancestor.
5471 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
5472 Use_Full_View to true in calls to Is_Ancestor.
5473 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
5474 Make_Select_Specific_Data_Table, Register_Primitive,
5475 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
5476 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
5477 to true in call to Is_Ancestor.
5478 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
5479 Use_Full_View to true in calls to Is_Ancestor.
5480 * exp_cg.adb
5481 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
5482 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
5483
54842011-08-02 Robert Dewar <dewar@adacore.com>
5485
5486 * gnat_rm.texi: Minor reformatting.
5487 * sem_prag.adb: Minor reformatting.
5488
54892011-08-02 Tristan Gingold <gingold@adacore.com>
5490
5491 * vms_data.ads: Add VMS qualifier for -gnateP.
5492
54932011-08-02 Robert Dewar <dewar@adacore.com>
5494
5495 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
5496 * par-ch7.adb (P_Package): Proper placement of aspects for package
5497 decl/instantiation.
5498 * par-endh.adb (Check_End): Ad Is_Sloc parameter
5499 (End_Statements): Add Is_Sloc parameterr
5500 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
5501 (Check_End): Ad Is_Sloc parameter
5502 (End_Statements): Add Is_Sloc parameterr
5503
55042011-08-02 Vincent Celier <celier@adacore.com>
5505
5506 * ug_words: Add VMS qualifier equivalent to -gnateP:
5507 /SYMBOL_PREPROCESSING.
5508
55092011-08-02 Jose Ruiz <ruiz@adacore.com>
5510
5511 * gnat-style.texi: For hexadecimal numeric literals the typical
5512 grouping of digits is 4 to represent 2 bytes.
5513 A procedure spec which is split into several lines is indented two
5514 characters.
5515
55162011-08-02 Yannick Moy <moy@adacore.com>
5517
5518 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
5519 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
5520 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
5521 properly qualified
5522 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
5523 choice in array aggregate
5524 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
5525 mark as ancestor
5526 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
5527 positional and named aggregate for record, or others in record
5528 aggregate, or multiple choice in record aggregate
5529 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
5530 array operands to logical operations AND, OR and XOR do not have the
5531 same static lower and higher bounds
5532 * sem_ch5.adb, sinfo.ads: Correct typos in comments
5533
55342011-08-01 Robert Dewar <dewar@adacore.com>
5535
5536 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
5537 Replaces Last_Source_Node_In_Sequence.
5538 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
5539 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
5540 parens and blank in string (this was inconsistently implemented).
5541 * errout.ads
5542 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
5543 blank in string (this was inconsistently implemented).
5544 * gnat1drv.adb
5545 (Set_Global_Switches): Set formal mode switches appropriately
5546 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
5547 * par-prag.adb
5548 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
5549 call Set_Error_Msg_Lang to set "spark" as language name.
5550 * par.adb: Remove unnecessary call to set formal language for errout
5551 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
5552 appropriately and call Set_Error_Msg_Lang to set "spark" as language
5553 name.
5554 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
5555 calls to it, moved after resolution so that types are known
5556 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
5557 result of concatenation is not of type String
5558 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
5559 concatenation is not properly restricted
5560 * gnat_rm.texi: Add doc on pragma Spark_95.
5561 * gcc-interface/Makefile.in: Remove obsolete target pairs for
5562 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
5563 * gcc-interface/Make-lang.in: Update dependencies.
5564
55652011-08-01 Javier Miranda <miranda@adacore.com>
5566
5567 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
5568 condition that detects if the overridden operation must replace an
5569 existing entity.
5570
55712011-08-01 Javier Miranda <miranda@adacore.com>
5572
5573 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
5574 code declarations inserted by Insert_Actions in each alternative of the
5575 N_Case_Expression node.
5576
55772011-08-01 Robert Dewar <dewar@adacore.com>
5578
5579 * sem_ch6.adb: Minor code reorganization.
5580 * sem_util.adb: Minor reformatting.
5581
55822011-08-01 Pascal Obry <obry@adacore.com>
5583
5584 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
5585 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
5586
55872011-08-01 Yannick Moy <moy@adacore.com>
5588
5589 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
5590 literal or operator symbol which is prefixed
5591 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
5592 mode on access attributes.
5593 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
5594 that concatenation operands are properly restricted in formal mode
5595 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
5596 Analyze_Concatenation_Operand. Issue an error in formal mode if the
5597 result of the concatenation has a type different from String.
5598 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
5599 Analyze_Quantified_Expression, Analyze_Slice,
5600 Analyze_Null): issue an error in formal mode on unsupported constructs
5601 * sem_ch5.adb
5602 (Analyze_Block_Statement): only issue error on source block statement
5603 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
5604 function which returns the last node in a list of nodes for which
5605 Comes_From_Source returns True, if any
5606 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
5607 Last_Source_Node_In_Sequence
5608 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
5609 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
5610 mode on unsupported constructs
5611 * sem_ch9.adb Do not return after issuing error in formal mode, as the
5612 rest of the actions may be needed later on since the error is marked as
5613 not serious.
5614 * sinfo.ads: Typos in comments.
5615
56162011-08-01 Pascal Obry <obry@adacore.com>
5617
5618 * projects.texi: Minor editing.
5619
56202011-08-01 Yannick Moy <moy@adacore.com>
5621
5622 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
5623 insertion character ~~
5624 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
5625 (Set_Error_Msg_Lang): new procedure which fixes the language for use
5626 with insertion character ~~
5627 (Set_Msg_Text): treat insertion character ~~
5628 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
5629 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
5630 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
5631 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
5632 errors related to the formal language restriction not serious
5633 (insertion character |).
5634 * par.adb (Par): set formal language for error messages if needed
5635 * sem_ch6.adb (Check_Missing_Return): take into account possible
5636 generated statements at the end of the function
5637 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
5638 enumeration value to define a new pragma SPARK_95
5639 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
5640 SPARK_Version): new type and variables to store the SPARK version
5641 (none by default).
5642 (SPARK_Mode): return True when SPARK_Version is set
5643 * par-prag.adb: Correct indentation
5644 (Prag): take Pragma_SPARK_95 into account
5645 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
5646 into account.
5647
56482011-08-01 Robert Dewar <dewar@adacore.com>
5649
5650 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
5651 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
5652 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
5653
56542011-08-01 Pascal Obry <obry@adacore.com>
5655
5656 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
5657 Target_Name to Get_Path call.
5658 (Parse_Single_Project): Likewise.
5659 (Post_Parse_Context_Clause): Likewise.
5660 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
5661 Call Initialise_Project_Path with the proper Target_Name.
5662 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
5663 search path.
5664 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
5665 with the proper Target_Name.
5666 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
5667 Part.Parse routine.
5668 (Parse_Project_And_Apply_Config): Likewise.
5669 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
5670 This is fine as this part of the code is supporting only native
5671 compilation.
5672 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
5673 is fine as this part of the code is supporting only native compilation.
5674
56752011-08-01 Yannick Moy <moy@adacore.com>
5676
5677 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
5678 of homonym, unless the homonym is one of the cases allowed in SPARK
5679 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
5680 package declaration occurring after a body.
5681
56822011-08-01 Robert Dewar <dewar@adacore.com>
5683
5684 * checks.adb, exp_ch4.adb: Minor reformatting.
5685
56862011-08-01 Javier Miranda <miranda@adacore.com>
5687
5688 * einfo.ads (Access_Disp_Table): Fix documentation.
5689 (Dispatch_Table_Wrappers): Fix documentation.
5690
56912011-08-01 Pascal Obry <obry@adacore.com>
5692
5693 * prj-env.adb, prj-env.ads: Minor reformatting.
5694
56952011-08-01 Yannick Moy <moy@adacore.com>
5696
5697 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
5698 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5699 procedures out of these packages.
2c7f9cc0 5700 * errout.ads, errout.adb
052e0603
AC
5701 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
5702 procedures in of this package
5703 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
5704 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
5705 on misplaced later vs initial declarations, like in Ada 83
5706 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
5707 formal mode on attribute of private type whose full type declaration
5708 is not visible
5709 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
5710 package declaration inside a package specification
5711 (Analyze_Full_Type_Declaration): issue error in formal mode on
5712 controlled type or discriminant type
5713 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
5714 user-defined operator means that it should come from the source
5715 (New_Overloaded_Entity): issue error in formal mode on overloaded
5716 entity.
5717 * sem_ch6.ads, sem_ch13.ads: typos in comments.
5718
57192011-08-01 Thomas Quinot <quinot@adacore.com>
5720
5721 * atree.adb: Minor reformatting.
5722 * checks.adb: Minor reformatting.
5723
57242011-08-01 Vincent Celier <celier@adacore.com>
5725
5726 * s-parame-vms-ia64.ads: Fix typo in comment
5727 Minor reformatting
5728 * s-parame-vms-restrict.ads: Removed, unused.
5729
57302011-08-01 Javier Miranda <miranda@adacore.com>
5731
5732 * exp_ch3.adb
5733 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
5734 * sem_ch3.adb
5735 (Constrain_Index): Remove side effects in the evaluation of the bounds.
5736 * sem_ch3.ads, sem_ch3.adb
5737 (Is_Constant_Bound): New extended version of the subprogram that was
5738 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
5739 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
5740 * sem_aux.ads (Constant_Value): Fix typo in comment.
5741 * checks.adb (Generate_Index_Checks): New implementation which, for
5742 array objects with constant bounds, generates the runtime check
5743 referencing the bounds of the array type. For other cases this routine
5744 provides its previous behavior obtaining such values from the array
5745 object.
5746 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
5747 parent type.
5748 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
5749 we cannot have semantic interpretations of the new node.
5750
57512011-08-01 Ed Schonberg <schonberg@adacore.com>
5752
5753 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
5754 expressions.
5755
57562011-08-01 Arnaud Charlet <charlet@adacore.com>
5757
5758 * sem_ch8.adb: Minor code editing.
5759 * s-vxwext.adb: Remove trailing space.
5760 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
5761 consistency with other files.
5762
57632011-08-01 Thomas Quinot <quinot@adacore.com>
5764
5765 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
5766
57672011-08-01 Ed Schonberg <schonberg@adacore.com>
5768
5769 * par-ch10.adb: reject parameterized expressions as compilation unit.
5770 * sem_ch4.adb: handle properly conditional expression with overloaded
5771 then_clause and no else_clause.
5772
57732011-08-01 Tristan Gingold <gingold@adacore.com>
5774
5775 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
5776 like done by System.Aux_DEC.
5777 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
5778
57792011-08-01 Yannick Moy <moy@adacore.com>
5780
5781 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
5782 missing label at end of declaration (subprogram or package)
5783 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
5784 of positional and named parameter association
5785 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
5786 Error_Msg_SP which adds a prefix to the error message giving the name
5787 of the formal language analyzed
5788 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
5789 access result type in subprogram, unconstrained array as result type,.
5790 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
5791 procedure
5792 * sem_ch8.adb: Code clean up.
5793
57942011-08-01 Javier Miranda <miranda@adacore.com>
5795
5796 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
5797 * einfo.ads (Access_Disp_Table): Fix documentation.
5798 (Dispatch_Table_Wrappers): Fix documentation.
5799 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
5800 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
5801 to enforce the documentation of this attribute.
5802 (Set_Is_Interface): Cleanup the assertion.
5803 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
5804 the Underlying_Type entity before reading attribute Access_Disp_Table.
5805 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
5806 Locate the Underlying_Type before reading attribute Access_Disp_Table.
5807 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
5808 the Underlying_Type entity before reading attribute Access_Disp_Table.
5809 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
5810 Locate the Underlying_Type entity before reading attribute
5811 Access_Disp_Table.
5812
58132011-08-01 Ed Schonberg <schonberg@adacore.com>
5814
5815 * s-poosiz.ads: Additional overriding indicators.
5816
58172011-08-01 Yannick Moy <moy@adacore.com>
5818
5819 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
5820 formal mode.
5821 (Analyze_Iteration_Scheme): issue error in formal mode when loop
5822 parameter specification does not include a subtype mark.
5823 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
5824 formal mode on abstract subprogram.
5825 (Analyze_Subprogram_Specification): issue error in formal mode on
5826 user-defined operator.
5827 (Process_Formals): issue error in formal mode on access parameter and
5828 default expression.
5829 * sem_ch9.adb (Analyze_Abort_Statement,
5830 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
5831 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
5832 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
5833 Analyze_Requeue, Analyze_Selective_Accept,
5834 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
5835 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
5836 issue error in formal mode on user-defined raise statement.
5837
58382011-08-01 Thomas Quinot <quinot@adacore.com>
5839
5840 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
5841 declaration being hidden when overriding an implicit inherited
5842 subprogram.
5843 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
5844 (-gnats), do not complain about a source file that contains only a
5845 pragma No_Body.
5846
58472011-08-01 Ed Schonberg <schonberg@adacore.com>
5848
5849 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
5850 variable if already set.
5851
58522011-08-01 Arnaud Charlet <charlet@adacore.com>
5853
5854 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
5855 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
5856 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
5857 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
5858 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
5859 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
5860 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
5861 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
5862 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
5863 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
5864 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
5865 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
5866 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
5867 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
5868 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
5869 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
5870 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
5871 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
5872 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
5873 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
5874 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
5875 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
5876 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
5877 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
5878 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
5879 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
5880 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
5881 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
5882 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
5883 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
5884 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
5885 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
5886 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
5887 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
5888 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
5889 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
5890 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
5891 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
5892 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
5893 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
5894 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
5895 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
5896 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
5897 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
5898 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
5899 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
5900 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
5901 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
5902 s-osinte-mingw.ads: Update to GPLv3 run-time license.
5903 Use GNAT instead of GNARL.
5904
59052011-08-01 Bob Duff <duff@adacore.com>
5906
5907 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
5908 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
5909 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
5910 reformatting.
5911
59122011-08-01 Yannick Moy <moy@adacore.com>
5913
5914 * debug.adb (d.D) reverve flag for the SPARK mode
5915 (d.E) reverve flag for SPARK generation mode
5916 (d.F) reverve flag for Why generation mode
2c7f9cc0 5917 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
052e0603
AC
5918 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
5919 functions which return True when the corresponding modes are set
5920 (Formal_Language): return "spark" or "alfa" when in formal verification
5921 mode.
5922 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
5923 Error_Msg to prefix the error message with a tag giving the formal
5924 language
5925 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
5926 message with a tag giving the formal language
5927 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
5928 block statement
5929 (Analyze_Case_Statement): issue error in formal mode on case statement
5930 with a single "others" case alternative
5931 (Analyze_Exit_Statement): issue errors in formal mode on exit
5932 statements which do not respect SPARK restrictions
5933 (Analyze_Goto_Statement): issue error in formal mode on goto statement
5934 (Check_Unreachable_Code): always issue an error (not a warning) in
5935 formal mode on unreachable code (concerns both code after an infinite
5936 loop and after an unconditional jump, both not allowed in SPARK)
5937 * sem_ch6.adb (Analyze_Return_Statement): add call to
5938 Set_Return_Present for a procedure containing a return statement
5939 (already done for functions in Analyze_Function_Return)
5940 (Analyze_Function_Return): issue error in formal mode on extended
5941 return or if return is not last statement in function
5942 (Check_Missing_Return): issue error in formal mode if function does
5943 not end with return or if procedure contains a return
5944 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
5945 function to detect if there is an inner scope of its parameter S which
5946 is a loop.
5947
59482011-08-01 Thomas Quinot <quinot@adacore.com>
5949
5950 * sem_ch6.ads: Minor reformatting.
5951
59522011-08-01 Javier Miranda <miranda@adacore.com>
5953
5954 * sem_util.adb (Abstract_Interface_List): Complete condition when
5955 processing private type declarations to avoid reading unavailable
5956 attribute.
5957 (Is_Synchronized_Tagged_Type): Complete condition when processing
5958 private extension declaration nodes to avoid reading unavailable
5959 attribute.
5960
59612011-08-01 Thomas Quinot <quinot@adacore.com>
5962
5963 * sem_ch3.adb: Minor reformatting.
5964
59652011-08-01 Thomas Quinot <quinot@adacore.com>
5966
5967 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
5968 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
5969 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
5970 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
5971 for VMS, instead parametrize the common implementation with
5972 System.Parameters declarations.
5973
59742011-08-01 Eric Botcazou <ebotcazou@adacore.com>
5975
5976 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
5977
59782011-08-01 Tristan Gingold <gingold@adacore.com>
5979
5980 * seh_init.c: Fix SEH handler installation on win64.
5981
59822011-08-01 Ed Schonberg <schonberg@adacore.com>
5983
5984 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
5985 double analysis of an anonymous access to subprogram, because it can
5986 lead to improper sharing of profiles and a back-end crash.
5987
59882011-08-01 Robert Dewar <dewar@adacore.com>
5989
5990 * make.adb, sem_ch4.adb: Minor reformatting.
5991 * gcc-interface/Make-lang.in: Update dependencies.
5992 * sem_util.adb, exp_ch5.adb: Minor reformatting.
5993
59942011-08-01 Arnaud Charlet <charlet@adacore.com>
5995
5996 * gnat_rm.texi: Fix definition of Long_Integer.
5997
59982011-08-01 Ed Schonberg <schonberg@adacore.com>
5999
6000 * exp_aggr.adb: check limit size of static aggregate unconditionally,
6001 to prevent storage exhaustion.
6002 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
6003 finalized is a function body, insert the cleanup code before the final
6004 return statement, to prevent spurious warnings.
6005 * s-pooglo.ads: add overriding indicator.
6006
60072011-08-01 Ed Schonberg <schonberg@adacore.com>
6008
6009 * sem_ch4.adb (Operator_Check): improve error message when both a
6010 with_clause and a use_clause are needed to make operator usage legal.
6011 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
6012 determine whether a compilation unit is visible within an other,
6013 either through a with_clause in the current unit, or a with_clause in
6014 its library unit or one one of its parents.
6015
60162011-08-01 Ed Schonberg <schonberg@adacore.com>
6017
6018 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
6019 over an arbitrary expression of an array or container type.
6020 * lib-xref.adb: clarify comment.
6021
60222011-08-01 Bob Duff <duff@adacore.com>
6023
6024 * einfo.ads: Minor reformatting.
6025 * debug.adb: Minor comment improvement.
6026
60272011-08-01 Javier Miranda <miranda@adacore.com>
6028
6029 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
6030 consider hidden subprograms as valid candidates.
6031
60322011-08-01 Arnaud Charlet <charlet@adacore.com>
6033
6034 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
6035
60362011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
6037
6038 * gnat_ugn.texi: Fix typo.
6039
60402011-08-01 Robert Dewar <dewar@adacore.com>
6041
6042 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
6043 lib-xref.adb: Minor reformatting
6044
60452011-08-01 Gary Dismukes <dismukes@adacore.com>
6046
6047 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
6048 when to generate a call to Move_Final_List.
6049 (Has_Controlled_Parts): Remove this function.
6050
60512011-08-01 Geert Bosch <bosch@adacore.com>
6052
6053 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
6054 "," in choice list.
6055
60562011-08-01 Thomas Quinot <quinot@adacore.com>
6057
6058 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
6059 explicit raise of a predefined exception as Comes_From_Source if the
6060 original N_Raise_Statement comes from source.
6061
60622011-08-01 Robert Dewar <dewar@adacore.com>
6063
6064 * sinfo.ads: Add comment.
6065 * sem_ch6.adb: Minor reformatting.
6066
60672011-08-01 Robert Dewar <dewar@adacore.com>
6068
6069 * freeze.adb (Freeze_Entity): Refine check for bad component size
6070 clause to avoid rejecting confirming clause when atomic/aliased present.
6071
60722011-08-01 Ed Schonberg <schonberg@adacore.com>
6073
6074 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
6075 better determine whether an entity reference is a write.
6076 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
6077 subcomponent.
6078 * lib-xref.adb (Output_References): Do no suppress a read reference at
6079 the same location as an immediately preceeding modify-reference, to
6080 handle properly in-out actuals.
6081
60822011-08-01 Tristan Gingold <gingold@adacore.com>
6083
6084 * env.c (__gnat_setenv) [VMS]: Refine previous change.
6085
60862011-08-01 Quentin Ochem <ochem@adacore.com>
6087
6088 * i-cstrin.adb (New_String): Changed implementation, now uses only the
6089 heap to compute the result.
6090
60912011-08-01 Robert Dewar <dewar@adacore.com>
6092
6093 * atree.ads: Minor reformatting.
6094
60952011-08-01 Emmanuel Briot <briot@adacore.com>
6096
6097 * g-expect.adb (Get_Command_Output): Fix memory leak.
6098
60992011-08-01 Geert Bosch <bosch@adacore.com>
6100
6101 * cstand.adb (P_Float_Type): New procedure to print the definition of
6102 predefined fpt types.
6103 (P_Mixed_Name): New procedure to print a name using mixed case
6104 (Print_Standard): Use P_Float_Type for printing floating point types
6105 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
6106 precision IEEE float.
6107
61082011-08-01 Thomas Quinot <quinot@adacore.com>
6109
6110 * sem_ch3.adb: Minor reformatting.
6111
61122011-08-01 Ed Schonberg <schonberg@adacore.com>
6113
6114 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
6115 the completion of a generic function, insert the new body rather than
6116 rewriting the original.
6117
61182011-08-01 Yannick Moy <moy@adacore.com>
6119
6120 * sinfo.ads, errout.ads: Typos in comments.
6121
61222011-08-01 Robert Dewar <dewar@adacore.com>
6123
6124 * par-endh.adb: Minor reformatting.
6125
61262011-08-01 Robert Dewar <dewar@adacore.com>
6127
6128 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
6129 (Pre_Post_Aspects): New subtype.
6130 * par-ch12.adb (P_Generic): New syntax for aspects in packages
6131 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
6132 * par-ch7.adb (P_Package): Remove Decl parameter
6133 (P_Package): Handle new syntax for aspects (before IS)
6134 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
6135 new aspect syntax
6136 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
6137 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
6138 (P_Package): Remove Decl parameter
6139 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
6140 aspects
6141 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
6142 specs
6143 * sem_util.ads, sem_util.adb (Static_Boolean): New function
6144 * sinfo.ads: Document new syntax for aspects in packages etc.
6145 * sprint.adb: Handle new syntax of aspects before IS in package
6146
61472011-08-01 Thomas Quinot <quinot@adacore.com>
6148
6149 * atree.ads: Minor reformatting.
6150 * sem_prag.adb: Minor reformatting.
6151
61522011-08-01 Robert Dewar <dewar@adacore.com>
6153
6154 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
6155 case expr alternative.
6156
61572011-08-01 Ed Schonberg <schonberg@adacore.com>
6158
6159 * sem_ch12.adb: Fix typo.
6160
61612011-08-01 Geert Bosch <bosch@adacore.com>
6162
6163 * sem_prag.adb (Check_No_Link_Name): New procedure.
6164 (Process_Import_Or_Interface): Use Check_No_Link_Name.
6165 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
6166 instead of Standard_Long_Long_Float_Size global. Preparation for
6167 eventual removal of per type constants.
6168 * exp_util.ads (Get_Stream_Size): New function returning the stream
6169 size value of subtype E.
6170 * exp_util.adb (Get_Stream_Size): Implement new function.
6171 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
6172 function.
6173 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
6174 * einfo.adb:
6175 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
6176
61772011-08-01 Geert Bosch <bosch@adacore.com>
6178
6179 * cstand.adb: Fix comments.
6180 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
6181 count of arguments.
6182
61832011-08-01 Robert Dewar <dewar@adacore.com>
6184
6185 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
6186
61872011-08-01 Geert Bosch <bosch@adacore.com>
6188
6189 * atree.ads: Fix comment.
6190
61912011-08-01 Robert Dewar <dewar@adacore.com>
6192
6193 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
6194 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
6195 * par.adb: Add with for Namet.Sp.
6196 * par-tchk.adb: Minor reformatting.
6197
61982011-08-01 Vincent Celier <celier@adacore.com>
6199
6200 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
6201 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
6202 of the init procedure of a SAL.
6203 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
6204 New procedure.
6205
62062011-08-01 Thomas Quinot <quinot@adacore.com>
6207
6208 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
6209 reformatting.
6210
62112011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6212
6213 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
6214
62152011-08-01 Thomas Quinot <quinot@adacore.com>
6216
6217 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
6218 conformant with its spec (return True only for types that have
6219 an overriding Initialize primitive operation that prevents them from
6220 having preelaborable initialization).
6221 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
6222 initialization for controlled types in Ada 2005 or later mode.
6223
62242011-08-01 Robert Dewar <dewar@adacore.com>
6225
6226 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
6227 Postcondition.
6228 (Same_Aspect): New function.
6229 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
6230 Type_Invariant, Precondition, Postcondition.
6231 * snames.ads-tmpl: Add Name_Type_Invariant.
6232
62332011-08-01 Robert Dewar <dewar@adacore.com>
6234
6235 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
6236 here.
6237 (Freeze_All_Ent): Fix error in handling inherited aspects.
6238 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
6239 already analyzed, but don't skip entire processing of a declaration,
6240 that's wrong in some cases of declarations being rewritten.
6241 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
6242 Don't delay for integer, string literals
6243 Treat predicates in usual manner for delay, remove special case code,
6244 not needed.
6245 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
6246 (Build_Predicate_Function): Update saved expression in aspect
6247 (Build_Invariant_Procedure): Update saved expression in aspect
6248 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
6249 of replacement of discriminant references if the reference is simple.
6250
62512011-08-01 Robert Dewar <dewar@adacore.com>
6252
6253 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
6254 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
6255 Static_Predicate and Dynamic_Predicate.
6256 (Build_Predicate_Function): Add processing for Static_Predicate
6257 and Dynamic_Predicate.
6258 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
6259 (From_Static_Predicate): New flag
6260 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
6261
62622011-08-01 Robert Dewar <dewar@adacore.com>
6263
6264 * usage.adb: Documentation cleanup for Ada version modes in usage.
6265 * expander.adb: Minor reformatting.
6266
62672011-08-01 Robert Dewar <dewar@adacore.com>
6268
6269 * atree.ads: Minor comment fix.
6270 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
6271 a-witeio.ads, sem_prag.adb: Minor reformatting.
6272
62732011-08-01 Doug Rupp <rupp@adacore.com>
6274
6275 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
6276 pointers. Use descrip.h header file for convenience. Add some
6277 comments.
6278
62792011-08-01 Robert Dewar <dewar@adacore.com>
6280
6281 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
6282 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
6283 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
6284 New procedure.
6285 (Check_Aspect_At_End_Of_Declarations): New procedure
6286 (Analye_Aspect_Specification): Minor changes for above procedures
6287 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
6288 specification node as well.
6289
62902011-08-01 Pascal Obry <obry@adacore.com>
6291
6292 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
6293 Windows files. Use GetFilesAttributes() in this case to check for file
6294 existence instead of returning with an error code.
6295
62962011-08-01 Vincent Celier <celier@adacore.com>
6297
6298 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
6299 High is above Source length.
6300
63012011-08-01 Robert Dewar <dewar@adacore.com>
6302
6303 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
6304
63052011-08-01 Robert Dewar <dewar@adacore.com>
6306
6307 * aspects.ads (Boolean_Aspects): New subtype.
6308 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
6309 for derived types in cases where the parent type and derived type have
6310 aspects.
6311 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
6312 with aspects when parent type also has aspects.
6313 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
6314 boolean expression at this point).
6315 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
6316 accordance with final decision on the Ada 2012 feature.
6317 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
6318
63192011-08-01 Matthew Heaney <heaney@adacore.com>
6320
6321 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
6322
63232011-08-01 Pascal Obry <obry@adacore.com>
6324
6325 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
6326 Fix Replace_Slice when High is above current string size.
6327 (Replace_Slice): Fix DL computation when High is above current
6328 string length.
6329
63302011-08-01 Gary Dismukes <dismukes@adacore.com>
6331
6332 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
6333
63342011-08-01 Matthew Heaney <heaney@adacore.com>
6335
6336 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
6337 of node.
6338
63392011-08-01 Pascal Obry <obry@adacore.com>
6340
6341 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
6342 reformatting.
6343
63442011-08-01 Ed Schonberg <schonberg@adacore.com>
6345
6346 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
6347 access to protected subprograms in generic bodies.
6348 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
6349 protected type, indicate that the convention of the subprogram is
6350 Convention_Protected, because it may be used in subsequent declarations
6351 within the protected declaration.
6352
63532011-08-01 Vincent Celier <celier@adacore.com>
6354
6355 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
6356 and "final" procedures when the name of the library is "ada", to avoid
6357 duplicate symbols "adainit" and "adafinal" in executables.
6358
63592011-08-01 Ed Schonberg <schonberg@adacore.com>
6360
6361 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
6362 quantified expression that appears within a postcondition and uses the
6363 Ada2012 'Result attribute.
6364
63652011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6366
6367 * init.c (__gnat_error_handler): Cast reason to int.
6368 (__gnat_install_handler): Explain sa_sigaction use.
6369
63702011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6371
6372 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
6373 subprogram has copy-in copy-out parameters, try to promote the mode of
6374 the return type if it is passed in registers.
6375
63762011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6377
6378 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
6379 left operand as addressable.
6380
63812011-07-24 Eric Botcazou <ebotcazou@adacore.com>
6382
6383 * gcc-interface/gigi.h (build_function_stub): Remove.
6384 (build_return_expr): Likewise.
6385 (convert_vms_descriptor): Declare.
6386 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
6387 (build_function_stub): Move to...
6388 * gcc-interface/utils2.c (build_return_expr): Move to...
6389 * gcc-interface/trans.c (build_function_stub): ...here.
6390 (build_return_expr): ...here.
6391 (Subprogram_Body_to_gnu): Add local variable for language_function.
6392 Disconnect the parameter attributes cache, if any, once done with it.
6393 Call end_subprog_body only after setting the end_locus.
6394 Build the stub associated with the function, if any, at the very end.
6395 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
6396 variables and streamline control flow.
6397
63982011-07-23 Arnaud Charlet <charlet@adacore.com>
6399
6400 PR ada/49819
6401 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
6402 g-trasym-dwarf.adb.
6403
64042011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6405
6406 PR bootstrap/49794
6407 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
6408 Assign to act.sa_sigaction.
6409 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
6410 current->return_address to char * before arithmetic.
6411
64122011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6413
6414 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
6415 Correct argument types.
6416 Extract code from reason.
6417 (__gnat_install_handler): Assign to act.sa_sigaction.
6418
64192011-07-21 Eric Botcazou <ebotcazou@adacore.com>
6420
6421 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
6422 (GNAT1_OBJS): ...here.
6423
64242011-07-15 Eric Botcazou <ebotcazou@adacore.com>
6425
6426 PR ada/48711
6427 * g-socthi-mingw.adb (Fill): Fix formatting.
6428
6429 * gcc-interface/gigi.h: Move around comment.
6430
64312011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6432
6433 PR ada/46350
6434 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
6435
64362011-07-14 Florian Weimer <fw@deneb.enyo.de>
6437
6438 PR ada/48711
6439 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
6440
64412011-07-13 Eric Botcazou <ebotcazou@adacore.com>
6442
6443 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
6444 range comparison if Pmode is SImode.
6445
64462011-07-12 Laurent GUERBY <laurent@guerby.net>
6447 Eric Botcazou <ebotcazou@adacore.com>
6448
6449 * adadecode.c: Wrap up in extern "C" block.
6450 * adadecode.h: Likewise.
6451 * adaint.c: Likewise. Remove 'const' keyword.
6452 * adaint.h: Likewise.
6453 * argv.c: Likewise.
6454 * atree.h: Likewise.
6455 * cio.c: Likewise.
6456 * cstreams.c: Likewise.
6457 * env.c: Likewise.
6458 * exit.c: Likewise.
6459 * fe.h: Likewise.
6460 * final.c: Likewise.
6461 * init.c: Likewise.
6462 * initialize.c: Likewise.
6463 * link.c: Likewise.
6464 * namet.h: Likewise.
6465 * nlists.h: Likewise.
6466 * raise.c: Likewise.
6467 * raise.h: Likewise.
6468 * repinfo.h: Likewise.
6469 * seh_init.c: Likewise.
6470 * targext.c: Likewise.
6471 * tracebak.c: Likewise.
6472 * uintp.h: Likewise.
6473 * urealp.h: Likewise.
6474 * xeinfo.adb: Wrap up generated C code in extern "C" block.
6475 * xsinfo.adb: Likewise.
6476 * xsnamest.adb: Likewise.
6477 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
6478 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
6479 * gcc-interface/misc.c: Likewise.
6480 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
6481 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
6482 ada/targext.o here...
6483 (GNAT_ADA_OBJS): ...and not here.
6484 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
6485 (GNATBIND_OBJS): Reorder.
6486
64872011-07-07 Richard Henderson <rth@redhat.com>
6488
6489 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
6490 dwarf2out_frame_init.
6491
64922011-07-07 Eric Botcazou <ebotcazou@adacore.com>
6493
6494 * gcc-interface/misc.c (gnat_init): Tweak previous change.
6495
64962011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6497
6498 PR target/39150
6499 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
6500
65012011-07-06 Richard Guenther <rguenther@suse.de>
6502
6503 * gcc-interface/misc.c (gnat_init): Merge calls to
6504 build_common_tree_nodes and build_common_tree_nodes_2.
6505 Re-initialize boolean_false_node.
6506
65072011-07-02 Eric Botcazou <ebotcazou@adacore.com>
6508 Olivier Hainque <hainque@adacore.com>
6509 Nicolas Setton <setton@adacore.com>
6510
6511 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
6512 the type according to the ARTIFICIAL_P parameter.
6513 (create_type_decl): Likewise.
6514 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
6515
65162011-07-01 Eric Botcazou <ebotcazou@adacore.com>
6517
6518 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
6519 (gnatbind): Likewise.
6520
65212011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6522
6523 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
6524
65252011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6526
6527 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
6528 local variable throughout. Remove useless call to Base_Type.
6529 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
6530 Take it also into account for the volatileness of the field. Set the
6531 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
6532
65332011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6534
6535 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
6536 on a dereference built for a by-ref object if it has an address clause.
6537
65382011-06-18 Eric Botcazou <ebotcazou@adacore.com>
6539
6540 * einfo.ads (Address_Taken): Document use for the second argument of
6541 Asm_Input and Asm_Output attributes.
6542 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
6543 argument is an entity name, then set Address_Taken on it.
6544 <Attribute_Asm_Output>: Likewise.
6545 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
6546 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
6547 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
6548 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
6549
65502011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
6551
6552 PR middle-end/46500
6553 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
6554
65552011-06-14 Joseph Myers <joseph@codesourcery.com>
6556
6557 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
6558 (ada/utils.o): Update dependencies.
6559 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
6560 ../../../libcpp/libcpp.a.
6561 * gcc-interface/utils.c: Include common/common-target.h.
6562 (process_attributes): Use targetm_common.have_named_sections.
6563
65642011-06-07 Richard Guenther <rguenther@suse.de>
6565
6566 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
6567 set_sizetype.
6568
65692011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6570
6571 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
6572 TREE_THIS_NOTRAP flag.
6573
65742011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6575
6576 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
6577 Fix thinko.
6578
65792011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6580
6581 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
6582 constants whose full view has discriminants specially.
6583
65842011-06-06 Eric Botcazou <ebotcazou@adacore.com>
6585
6586 * gcc-interface/utils.c: Include diagnostic.h.
6587 (gnat_write_global_declarations): Output debug information for all
6588 global type declarations before finalizing the compilation unit.
6589 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
6590
65912011-05-25 Jakub Jelinek <jakub@redhat.com>
6592
6593 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
6594
65952011-05-25 Kai Tietz <ktietz@redhat.com>
6596
6597 * adaint.c (__gnat_to_canonical_file_list_next): Use array
6598 initialization instead of const/none-const pointer assignment.
6599
66002011-05-24 Joseph Myers <joseph@codesourcery.com>
6601
6602 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
6603 $(EXTRA_GNAT1_OBJS).
6604 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
6605 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
6606 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
6607 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
6608 libcommon-target.a instead of prefix.o.
6609
66102011-05-21 Joseph Myers <joseph@codesourcery.com>
6611
6612 PR ada/49097
6613 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
6614
66152011-05-20 Joseph Myers <joseph@codesourcery.com>
6616
6617 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
6618 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
6619 instead of version.o.
6620
66212011-05-18 Kai Tietz <ktietz@redhat.com>
6622
6623 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
6624 boolean_false_node instead of integer_zero_node.
6625 (convert_with_check): Likewise.
6626 * gcc-interface/decl.c (choices_to_gnu): Likewise.
6627
66282011-05-12 Eric Botcazou <ebotcazou@adacore.com>
6629
6630 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
6631 type of the parameter is an unconstrained array, convert the actual to
6632 the type of the formal in the In Out and Out cases as well.
6633
66342011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6635
6636 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
6637 call build_function_type_array or build_varargs_function_type_array
6638 instead.
6639 (create_subprog_type): Don't call build_function_type; call
6640 build_function_type_vec instead.
6641
66422011-05-11 Nathan Froyd <froydnj@codesourcery.com>
6643
6644 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
6645 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
6646 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
6647
66482011-05-07 Eric Botcazou <ebotcazou@adacore.com>
6649
6650 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
6651
6652 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
6653 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
6654
66552011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6656
6657 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
6658
66592011-05-05 Nathan Froyd <froydnj@codesourcery.com>
6660
6661 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
6662 instead of accessing TYPE_ARG_TYPES directly.
6663 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
6664
66652011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6666
6667 PR ada/48844
6668 * gcc-interface/gigi.h (get_variant_part): Declare.
6669 * gcc-interface/decl.c (get_variant_part): Make global.
6670 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
6671 types have the same constant size, are record types and T1 has a
6672 variant part while T2 doesn't.
6673
66742011-05-05 Eric Botcazou <ebotcazou@adacore.com>
6675
6676 * gcc-interface/utils.c (begin_subprog_body): Do not call
6677 get_pending_sizes.
6678 (end_subprog_body): Likewise.
6679
66802011-05-04 Richard Guenther <rguenther@suse.de>
6681
6682 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
6683 int_const_binop.
6684 (pos_to_constructor): Likewise.
6685
66862011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 6687 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
6688
6689 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
6690 of build_function_type. Adjust calls to...
6691 (build_raise_check): ...this. Do not take a void_tree parameter.
6692 Call build_function_type_list instead of build_function_type.
6693 Fix head comment and swap couple of conditional blocks.
6694
66952011-04-30 Eric Botcazou <ebotcazou@adacore.com>
6696
6697 * gnatvsn.ads (Library_Version): Bump to 4.7.
6698 (Current_Year): Bump to 2011.
6699
67002011-04-29 Michael Matz <matz@suse.de>
6701
6702 * gcc-interface/misc.c (gnat_handle_option): Set
6703 warn_maybe_uninitialized.
6704
67052011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
6706
6707 * gnat_ugn.texi (Complexity Metrics Control): Update link to
6708 the Watson/McCabe paper.
6709
67102011-04-23 Jim Meyering <meyering@redhat.com>
6711
6712 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
6713
67142011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6715
6716 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
6717 onto the new type.
6718
67192011-04-22 Eric Botcazou <ebotcazou@adacore.com>
6720
6721 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
6722 parameter.
6723 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
6724 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
6725 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
6726 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
6727 <all>: Do not set flags on the reused DECL node coming from an alias.
6728 Set DECL_IGNORED_P on the DECL node built for subprograms if they
6729 don't need debug info here...
6730 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
6731 (gigi): Adjust calls to create_subprog_decl.
6732 (build_raise_check): Likewise.
6733 (establish_gnat_vms_condition_handler): Likewise.
6734 (Compilation_Unit_to_gnu): Likewise.
6735 (gnat_to_gnu): Likewise.
6736
67372011-04-21 Eric Botcazou <ebotcazou@adacore.com>
6738
6739 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
6740 (NO_REORDER_ADAFLAGS): New variable.
6741 (EXTRA_GNATTOOLS): Always define.
6742 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
6743 Clean up and adjust list of files compiled with special options.
6744 * gcc-interface/Make-lang.in: Likewise.
6745 (ada/decl.o): Cosmetical change.
6746 (ada/misc.o): Remove dependency on $(PLUGIN_H).
6747
67482011-04-20 Jim Meyering <meyering@redhat.com>
6749
6750 * initialize.c (__gnat_initialize): Remove useless if-before-free.
6751
67522011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6753
6754 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
6755 $(CFLAGS) on the link line.
6756
67572011-04-17 Eric Botcazou <ebotcazou@adacore.com>
6758
6759 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
6760 padded type built for the return type if it is unconstrained.
6761
67622011-04-14 Nathan Froyd <froydnj@codesourcery.com>
6763
6764 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
6765
67662011-04-12 Nathan Froyd <froydnj@codesourcery.com>
6767
6768 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
6769 before calling TREE_CHAIN.
6770 * gcc-interface/misc.c (gnat_init_ts): New function.
6771 (LANG_HOOKS_INIT_TS): Define.
6772
67732011-04-12 Martin Jambor <mjambor@suse.cz>
6774
6775 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
6776 instead of cgraph_node.
6777
67782011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6779
6780 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
6781 alignment on fields of the RETURN type built for the Copy-In Copy-Out
6782 mechanism.
6783
67842011-04-08 Eric Botcazou <ebotcazou@adacore.com>
6785
6786 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
6787 of aggregate types that contain a placeholder.
6788
67892011-04-08 Nathan Froyd <froydnj@codesourcery.com>
6790
6791 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
6792 TYPE_ARG_TYPES.
6793 (handle_type_generic_attribute): Likewise.
6794
67952011-04-04 Eric Botcazou <ebotcazou@adacore.com>
6796
6797 PR ada/47163
6798 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
6799
68002011-04-04 Kai Tietz <ktietz@redhat.com>
6801
6802 PR ada/47163
6803 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
6804 to flag value.
6805
68062011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6807
6808 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
6809 type case, do not strip a padding type around the array type.
6810
68112011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6812
6813 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
6814 types.
6815
68162011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6817
6818 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
6819 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
6820 code for -feliminate-unused-debug-types.
6821 (gnat_post_options): Likewise.
6822
68232011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6824
6825 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6826 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
6827 distinct copy.
6828
68292011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6830
6831 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
6832 DECL_ARTIFICIAL flag on enumeration types.
6833
68342011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6835
6836 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
6837 fat pointer types artificial unconditionally.
6838 <E_Array_Subtype>: Attach the base array type as a parallel type if it
6839 isn't artificial.
6840
68412011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6842
6843 * gcc-interface/gigi.h (get_dummy_type): Declare.
6844 (build_dummy_unc_pointer_types): Likewise.
6845 (finish_fat_pointer_type): Likewise.
6846 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
6847 fat pointer type has been built, complete it in place.
6848 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
6849 and thin pointers. Remove useless variable.
6850 (finish_fat_pointer_type): Make global and move to...
6851 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
6852 (get_dummy_type): New function.
6853 (build_dummy_unc_pointer_types): Likewise.
6854 (gnat_pushdecl): Propage the name to the anonymous variants only.
6855 (update_pointer_to): Only adjust the pointer types in the unconstrained
6856 array case.
6857
68582011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6859
6860 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
6861 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
6862 if this is a Taft amendment type and the full declaration is available.
6863 * gcc-interface/trans.c (process_type): Likewise.
6864 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
6865 (process_freeze_entity): Likewise.
6866 * gcc-interface/utils.c (dummy_global): New static variable.
6867 (gnat_write_global_declarations): If there are types declared as used
6868 at the global level, insert them in the global hash table.
6869
68702011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6871
6872 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
6873 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
6874 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
6875 copy.
6876 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
6877 flag of the type accordingly.
6878 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
6879
68802011-04-02 Eric Botcazou <ebotcazou@adacore.com>
6881
6882 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6883 finalizing types when updating the pointers to the designated type.
6884 <all>: Finalize the deferred types even if we didn't defer processing
6885 of incomplete types in this invocation.
6886
68872011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
6888 Nicolas Setton <setton@adacore.com>
6889 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
6890
6891 * gcc-interface/misc.c (gnat_descriptive_type): New function.
6892 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
6893
68942011-03-28 Kai Tietz <ktietz@redhat.com>
6895
6896 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
6897 Windows targets.
6898 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
6899 * system-mingw.ads (System): Change ZCX_By_Default default to True.
6900
6901 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
6902
69032011-03-28 Tristan Gingold <gingold@adacore.com>
6904
6905 PR ada/44431
6906 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
6907 Use ada output of gnatbind.
6908 (ada/b_gnatb.adb): Ditto.
6909 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
6910 (ada.mostlyclean, ada.stage1)
6911 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
6912 (ada.stagefeedback): Adjust.
6913 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
6914 Use ada output of gnatbind.
6915 (b_gnatm.adb): Ditto.
6916 (b_gnatl.o, b_gnatm.o): New rules.
6917
69182011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6919
6920 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6921 for the padded type built to support a specified size or alignment.
6922
69232011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6924
6925 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
6926 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
6927 unconditionally to the end of the unit when the designated type is
6928 limited_with'ed.
6929 <all>: Rename local variable. Attempt to un-defer types only and do it
6930 for limited_with'ed types as well.
6931 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
6932 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
6933 consistently and remove redundant call to finalize_from_with_types.
6934
69352011-03-26 Eric Botcazou <ebotcazou@adacore.com>
6936
6937 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
6938 subprograms without a previous spec declared in the same unit.
6939 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
6940 subprograms at the end of the unit instead of at the beginning.
6941 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
6942 isn't public for the special handling of non-inline functions nested
6943 inside inline external functions.
6944
69452011-03-25 Jeff Law <law@redhat.com>
6946
6947 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
6948
69492011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6950
6951 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
6952 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
6953 to compute Set_Size_Depends_On_Discriminant.
6954 (Layout_Type): Call it on array types in back-end layout mode.
6955 * sem_util.adb (Requires_Transient_Scope): Return true for array
6956 types only if the size depends on the value of discriminants.
6957 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
6958 type if the RHS is a call to a function that returns an unconstrained
6959 type with default discriminant.
6960
69612011-03-24 Eric Botcazou <ebotcazou@adacore.com>
6962
6963 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
6964 non-conversion to the nominal result type at the end.
6965
69662011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6967
6968 * gcc-interface/trans.c (create_temporary): New function taken from...
6969 (create_init_temporary): ...here. Call it.
6970 (call_to_gnu): Create the temporary for the return value early, if any.
6971 Create it for a function with copy-in/copy-out parameters if there is
6972 no target; in other cases of copy-in/copy-out, use another temporary.
6973 Push the new binding level lazily. Add and rename local variables.
6974
69752011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6976
6977 * gcc-interface/decl.c (validate_size): Improve comments and tweak
6978 error message.
6979 (set_rm_size): Likewise.
6980
69812011-03-23 Eric Botcazou <ebotcazou@adacore.com>
6982
6983 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
6984 for the padded type built in order to support a specified alignment.
6985 Fix incorrect formatting.
6986
69872011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6988
6989 PR bootstrap/48216
6990 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
6991
69922011-03-21 Eric Botcazou <ebotcazou@adacore.com>
6993
6994 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
6995 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
6996 to the end of the list. Adjust recursive call. Rename local variable.
6997 If REORDER is true, reorder components of the record type.
6998 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
6999 components_to_record and adjust the parameter list.
7000
70012011-03-21 Eric Botcazou <ebotcazou@adacore.com>
7002
7003 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
7004 disabled, use the variable for bounds of loop iteration scheme.
7005
70062011-03-21 Kai Tietz <ktietz@redhat.com>
7007
7008 PR target/12171
7009 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
7010
70112011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7012
7013 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
7014 out whether the expression is read-only. Short-circuit placeholder
7015 case and rename a couple of local variables.
7016
70172011-03-17 Eric Botcazou <ebotcazou@adacore.com>
7018
7019 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
7020 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
7021 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
7022 (convert): Deal with conversions from a smaller form type specially.
7023
70242011-02-14 Eric Botcazou <ebotcazou@adacore.com>
7025
7026 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
7027 its argument, except for the special -I- switch.
7028
70292011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
7030
7031 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
7032 "Ada Issues".
7033
70342011-02-08 Eric Botcazou <ebotcazou@adacore.com>
7035
7036 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
7037
70382011-02-03 Eric Botcazou <ebotcazou@adacore.com>
7039
7040 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
7041 GNAT_FORMAL.
7042 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
7043 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
7044 instead of GNAT_FORMAL. Protect the expression against multiple uses.
7045 Do not generate the check directly, instead instantiate the template
7046 check present in the descriptor.
7047 (make_descriptor_field): Move around.
7048 (build_vms_descriptor32): Build a template check in the POINTER field.
7049 (build_vms_descriptor): Remove useless suffixes.
7050 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
7051
70522011-01-26 Eric Botcazou <ebotcazou@adacore.com>
7053
7054 PR bootstrap/47467
7055 * targext.c: Include target files if IN_RTS is defined.
7056
70572011-01-26 Richard Guenther <rguenther@suse.de>
7058
7059 PR bootstrap/47467
7060 * targext.c: Include config.h.
7061 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
7062 dependency.
7063
70642011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 7065 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
7066
7067 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
7068
70692011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7070
7071 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
7072 end-of-case on the end label and its associated gotos, if any.
7073
70742011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7075
7076 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
7077 expressions of the parameter cache within the statement group of
7078 the CICO mechanism.
7079
70802011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 7081 Eric Botcazou <ebotcazou@adacore.com>
052e0603
AC
7082
7083 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
7084 (set_end_locus_from_node): New function.
7085 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
7086 make and the function end_locus.
7087 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
7088 for the elaboration subprogram.
7089 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
7090 set the end_locus of the expression as well.
7091
70922011-01-04 Eric Botcazou <ebotcazou@adacore.com>
7093
7094 PR ada/47131
7095 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
7096 variables that are referenced in exception handlers volatile.
7097
7098
7099\f
7100Copyright (C) 2011 Free Software Foundation, Inc.
7101
7102Copying and distribution of this file, with or without modification,
7103are permitted in any medium without royalty provided the copyright
7104notice and this notice are preserved.
7105
7106 * gnat_rm.texi: Ramification of pragma Eliminate documentation
7107 - fix bugs in the description of Source_Trace;
7108 - get rid of UNIT_NAME;
7109
4fbad0ba
AC
71102011-08-02 Javier Miranda <miranda@adacore.com>
7111
7112 * exp_ch9.adb
7113 (Build_Dispatching_Requeue): Adding support for VM targets
7114 since we cannot directly reference the Tag entity.
7115 * exp_sel.adb (Build_K): Adding support for VM targets.
7116 (Build_S_Assignment): Adding support for VM targets.
7117 * exp_disp.adb
7118 (Default_Prim_Op_Position): In VM targets do not restrict availability
7119 of predefined interface primitives to compiling in Ada 2005 mode.
7120 (Is_Predefined_Interface_Primitive): In VM targets this service is not
7121 restricted to compiling in Ada 2005 mode.
7122 (Make_VM_TSD): Generate code that declares and initializes the OSD
7123 record. Needed to support dispatching calls through synchronized
7124 interfaces.
7125 * exp_ch3.adb
7126 (Make_Predefined_Primitive_Specs): Enable generation of predefined
7127 primitives associated with synchronized interfaces.
7128 (Make_Predefined_Primitive_Bodies): Enable generation of predefined
7129 primitives associated with synchronized interfaces.
7130
71312011-08-02 Yannick Moy <moy@adacore.com>
7132
7133 * par-ch11.adb (P_Handled_Sequence_Of_Statements): mark a sequence of
7134 statements hidden in SPARK if preceded by the HIDE directive
7135 (Parse_Exception_Handlers): mark each exception handler in a sequence of
7136 exception handlers as hidden in SPARK if preceded by the HIDE directive
7137 * par-ch6.adb (P_Subprogram): mark a subprogram body hidden in SPARK
7138 if starting with the HIDE directive
7139 * par-ch7.adb (P_Package): mark a package body hidden in SPARK if
7140 starting with the HIDE directive; mark the declarations in a private
7141 part as hidden in SPARK if the private part starts with the HIDE
7142 directive
7143 * restrict.adb, restrict.ads
7144 (Set_Hidden_Part_In_SPARK): record a range of slocs as hidden in SPARK
7145 (Is_In_Hidden_Part_In_SPARK): new function which returns whether its
7146 argument node belongs to a part which is hidden in SPARK
7147 (Check_SPARK_Restriction): do not issue violations on nodes in hidden
7148 parts in SPARK; protect the possibly costly call to
7149 Is_In_Hidden_Part_In_SPARK by a check that the SPARK restriction is on
7150 * scans.ads (Token_Type): new value Tok_SPARK_Hide in enumeration
7151 * scng.adb (Accumulate_Token_Checksum_GNAT_6_3,
7152 Accumulate_Token_Checksum_GNAT_5_03): add case for new token
7153 Tok_SPARK_Hide.
7154 (Scan): recognize special comment starting with '#' and followed by
7155 SPARK keyword "hide" as a HIDE directive.
7156
71572011-08-02 Yannick Moy <moy@adacore.com>
7158
7159 * types.ads, erroutc.ads: Minor reformatting.
7160
71612011-08-02 Vincent Celier <celier@adacore.com>
7162
7163 * link.c: Add response file support for cross platforms.
7164
6ff6152d
ES
71652011-08-02 Ed Schonberg <schonberg@adacore.com>
7166
7167 * sem_aggr.adb (Resolve_Array_Aggregate): when copying the expression
7168 in an association, set parent field of copy before partial analysis.
7169 * sem_res.adb (Resolve_Slice): create reference to itype only when
7170 expansion is enabled.
7171
975c6896
YM
71722011-08-02 Yannick Moy <moy@adacore.com>
7173
7174 * einfo.adb, einfo.ads (Body_Is_In_ALFA, Set_Body_Is_In_ALFA): get/set
7175 for new flag denoting which subprogram bodies are in ALFA
7176 * restrict.adb, sem_ch7.adb: Update comment
7177 * sem_ch11.adb, sem_ch2.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7178 sem_ch9.adb, sem_res.adb: Add calls to
7179 Current_Subprogram_Body_Is_Not_In_ALFA on unsupported constructs.
7180 * sem_ch6.adb (Analyze_Function_Return): add calls to
7181 Current_Subprogram_Body_Is_Not_In_ALFA on return statement in the
7182 middle of the body, and extended return.
7183 (Check_Missing_Return): add calls to Set_Body_Is_In_ALFA with argument
7184 False when missing return.
7185 (Analyze_Subprogram_Body_Helper): initialize the flag Body_Is_In_ALFA
7186 to True for subprograms whose spec is in ALFA. Remove later on the flag
7187 on the entity used for a subprogram body when there exists a separate
7188 declaration.
7189 * sem_util.adb, sem_util.ads (Current_Subprogram_Body_Is_Not_In_ALFA):
7190 if Current_Subprogram is not Empty, set its flag Body_Is_In_ALFA to
7191 False, otherwise do nothing.
7192
afc8324d
AC
71932011-08-02 Robert Dewar <dewar@adacore.com>
7194
7195 * inline.adb, stand.ads, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
7196
71972011-08-02 Yannick Moy <moy@adacore.com>
7198
7199 * sem_ch4.ads: minor formatting.
7200
2ba431e5
YM
72012011-08-02 Yannick Moy <moy@adacore.com>
7202
7203 * sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
7204 debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
7205 errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
7206 restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
7207 opt.ads: cleanup of SPARK mode
7208
0f853035
YM
72092011-08-02 Yannick Moy <moy@adacore.com>
7210
7211 * cstand.adb (Create_Standard): sets Is_In_ALFA component of standard
7212 types.
7213 * einfo.adb, einfo.ads (Is_In_ALFA): add flag for all entities
7214 (Is_In_ALFA, Set_Is_In_ALFA): new subprograms to access flag Is_In_ALFA
7215 * sem_ch3.adb
7216 (Analyze_Object_Declaration): set Is_In_ALFA flag for objects
7217 (Constrain_Enumeration): set Is_In_ALFA flag for enumeration subtypes
7218 (Constrain_Integer): set Is_In_ALFA flag for integer subtypes
7219 (Enumeration_Type_Declaration): set Is_In_ALFA flag for enumeration
7220 types.
7221 (Set_Scalar_Range_For_Subtype): unset Is_In_ALFA flag for subtypes with
7222 non-static range.
7223 * sem_ch6.adb (Analyze_Return_Type): unset Is_In_ALFA flag for
7224 functions whose return type is not in ALFA.
7225 (Analyze_Subprogram_Specification): set Is_In_ALFA flag for subprogram
7226 specifications.
7227 (Process_Formals): unset Is_In_ALFA flag for subprograms if a
7228 parameter's type is not in ALFA.
7229 * stand.ads (Standard_Type_Is_In_ALFA): array defines which standard
7230 types are in ALFA.
7231
d2b10647
ES
72322011-08-02 Ed Schonberg <schonberg@adacore.com>
7233
7234 * sem_ch6 (Analyze_Expression_Function): treat the function as
7235 Inline_Always, and introduce a subprogram declaration for it when it is
7236 not a completion.
7237 * inline.adb (Add_Inlined_Body): recognize bodies that come from
7238 expression functions, so that the back-end can determine whether they
7239 can in fact be inlined.
7240 * sem_util.adb (Is_Expression_Function): predicate to determine whether
7241 a function body comes from an expression function.
7242
c7b9d548
AC
72432011-08-02 Gary Dismukes <dismukes@adacore.com>
7244
7245 * sem_ch6.adb (Check_Conformance): Revise the check for nonconforming
7246 null exclusions to test Can_Never_Be_Null on the anonymous access types
7247 of the formals rather than testing the formals themselves. Exclude this
7248 check in cases where the Old_Formal is marked as a controlling formal,
7249 to avoid issuing spurious errors for bodies completing dispatching
7250 operations (due to the flag not getting set on controlling access
7251 formals in body specs).
7252 (Find_Corresponding_Spec): When checking full and subtype conformance of
7253 subprogram bodies in instances, pass Designated and E in that order, for
7254 consistency with the expected order of the formals (New_Id followed by
7255 Old_Id).
7256
72572011-08-02 Robert Dewar <dewar@adacore.com>
7258
7259 * sem_ch8.adb: Minor reformatting.
7260
1138cf59
AC
72612011-08-02 Ed Schonberg <schonberg@adacore.com>
7262
7263 * sem_ch8.adb (Analyze_Subprogram_Renaming): new procedure
7264 Check_Class_Wide_Actual, to implement AI05-0071, on defaulted
7265 primitive operations of class-wide actuals.
7266
72672011-08-02 Javier Miranda <miranda@adacore.com>
7268
7269 * exp_atag.ads, exp_atag.adb
7270 (Build_Common_Dispatching_Select_Statements): Remove argument Loc
7271 since its value is implicitly passed in argument Typ.
7272 * exp_disp.adb (Make_Disp_Conditional_Select_Body,
7273 Make_Disp_Timed_Select_Body): Remove Loc in calls to routine
7274 Build_Common_Dispatching_Select_Statements.
7275
7b9db926
RD
72762011-08-02 Robert Dewar <dewar@adacore.com>
7277
7278 * sem_ch3.adb, exp_atag.ads, get_scos.adb, get_scos.ads,
7279 exp_disp.adb, lib-xref.adb, lib-xref.ads: Update comments.
7280 Minor reformatting.
7281
e8374e7a
AC
72822011-08-02 Robert Dewar <dewar@adacore.com>
7283
7284 * sem_res.adb: Minor reformatting.
7285 * sem_prag.adb: Minor reformatting.
7286
72872011-08-02 Javier Miranda <miranda@adacore.com>
7288
7289 * exp_atag.adb, exp_atags.ads
7290 (Build_Common_Dispatching_Select_Statement): Replace argument DT_Ptr
7291 by the tagged type Entity. Required to use this routine in the VM
7292 targets since we do not have available the Tag entity in the VM
7293 platforms.
7294 * exp_ch6.adb
7295 (Expand_N_Subprogram_Body): Do not invoke Build_VM_TSDs if package
7296 Ada.Tags has not been previously loaded.
7297 * exp_ch7.adb
7298 (Expand_N_Package_Declaration, Expand_N_Package_Body): Do not invoke
7299 Build_VM_TSDs if package Ada.Tags has not been previously loaded.
7300 * sem_aux.adb
7301 (Enclosing_Dynamic_Scope): Add missing support to handle the full
7302 view of enclosing scopes. Required to handle enclosing scopes that
7303 are synchronized types whose full view is a task type.
7304 * exp_disp.adb
7305 (Build_VM_TSDs): Minor code improvement to avoid generating and
7306 analyzing lists with empty nodes.
7307 (Make_Disp_Asynchronous_Select_Body): Add support for VM targets.
7308 (Make_Disp_Conditional_Select_Body): Add support for VM targets.
7309 (Make_Disp_Get_Prim_Op_Kind): Add support for VM targets.
7310 (Make_Disp_Timed_Select_Body): Add support for VM targets.
7311 (Make_Select_Specific_Data_Table): Add support for VM targets.
7312 (Make_VM_TSD): Generate code to initialize the SSD structure of
7313 the TSD.
7314
73152011-08-02 Yannick Moy <moy@adacore.com>
7316
7317 * lib-writ.adb (Write_ALI): when ALFA mode is set, write local
7318 cross-references section in ALI.
7319 * lib-xref.adb, lib-xref.ads (Xref_Entry): add components Sub
7320 (enclosing subprogram), Slc (location of Sub) and Sun (unit number of
7321 Sub).
7322 (Enclosing_Subprogram_Or_Package): new function to return the enclosing
7323 subprogram or package entity of a node
7324 (Is_Local_Reference_Type): new function returns True for references
7325 selected in local cross-references.
7326 (Lt): function extracted from Lt in Output_References
7327 (Write_Entity_Name): function extracted from Output_References
7328 (Generate_Definition): generate reference with type 'D' for definition
7329 of objects (object declaration and parameter specification), with
7330 appropriate locations and units, for use in local cross-references.
7331 (Generate_Reference): update fields Sub, Slc and Sun. Keep newly created
7332 references of type 'I' for initialization in object definition.
7333 (Output_References): move part of function Lt and procedure
7334 Write_Entity_Name outside of the body. Ignore references of types 'D'
7335 and 'I' introduced for local cross-references.
7336 (Output_Local_References): new procedure to output the local
7337 cross-references sections.
7338 (Lref_Entity_Status): new array defining whether an entity is a local
7339 * sem_ch3.adb (Analyze_Object_Declaration): call Generate_Reference
7340 with 'I' type when initialization expression is present.
7341 * get_scos.adb, get_scos.ads: Correct comments and typos
7342
1f6439e3
AC
73432011-08-02 Javier Miranda <miranda@adacore.com>
7344
7345 * exp_ch6.adb (Expand_N_Subprogram_Body): Enable generation of TSDs in
7346 the JVM target.
7347 * exp_ch7.adb (Expand_N_Package_Body): Enable generation of TSDs in
7348 the JVM target.
7349 * exp_disp.adb (Build_VM_TSDs): No action needed if the runtime has no
7350 TSD support.
7351
73522011-08-02 Vincent Celier <celier@adacore.com>
7353
7354 * prj-nmsc.adb (File_Found): New components Excl_File and Excl_Line
7355 (No_Space_Img): New function
7356 (Find_Excluded_Sources): When reading from a file, record the file name
7357 and the line number for each excluded source.
7358 (Mark_Excluded_Sources): When reporting an error, if the excluded
7359 sources were read from a file, include file name and line number in
7360 the error message.
7361
73622011-08-02 Ed Schonberg <schonberg@adacore.com>
7363
7364 * sem_res.adb (Resolve_Call): implement rule in RM 12.5.1 (23.3/2).
7365
ab027d28
RD
73662011-08-02 Robert Dewar <dewar@adacore.com>
7367
7368 * exp_ch7.adb exp_ch6.adb, exp_disp.adb: Minor reformatting
7369
b3b28b0c
JM
73702011-08-02 Javier Miranda <miranda@adacore.com>
7371
7372 * exp_ch6.adb (Expand_N_Subprogram_Body): Temporarily restrict the
7373 generation of TSDs to the DOTNET compiler.
7374 * exp_ch7.adb (Expand_N_Package_Body): Temporarily restrict the
7375 generation of TSDs to the DOTNET compiler.
7376
9732e886
JM
73772011-08-02 Javier Miranda <miranda@adacore.com>
7378
7379 * exp_disp.ads (Build_VM_TSDs): Build the runtime Type Specific Data
7380 record of all the tagged types declared inside library level package
7381 declarations, library level package bodies or library level subprograms.
7382 * exp_disp.adb (Make_VM_TSD): New subprogram that builds the TSD
7383 associated with a given tagged type.
7384 (Build_VM_TSDs): New subprogram.
7385 * exp_ch6.adb (Expand_N_Subprogram_Body): Generate TSDs records of main
7386 compilation units that are subprograms.
7387 * exp_ch7.adb (Expand_N_Package_Body): Generate TSDs of main
7388 compilation units that are package bodies.
7389 (Expand_N_Package_Declaration): Generate TSDs of the main compilation
7390 units that are a package declaration or a package instantiation.
7391 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Minor code
7392 reorganization to improve the error generated by the frontend when the
7393 function Ada.Tags.Secondary_Tag is not available.
7394 * rtsfind.ads (RE_Register_TSD): New runtime entity.
7395 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code cleanup.
7396
e526d0c7
AC
73972011-08-02 Javier Miranda <miranda@adacore.com>
7398
7399 * exp_disp.adb (Make_DT): Generate call to Check_TSD in Ada 2005 mode.
7400
74012011-08-02 Robert Dewar <dewar@adacore.com>
7402
7403 * s-imenne.ads: Minor reformatting.
7404
74052011-08-02 Robert Dewar <dewar@adacore.com>
7406
7407 * a-stunau.ads: Add pragma Suppress_Initialization for Big_String
7408 * freeze.adb (Warn_Overlay): Don't warn if initialization suppressed
7409 * s-stalib.ads: Add pragma Suppress_Initialization for Big_String
7410
74112011-08-02 Robert Dewar <dewar@adacore.com>
7412
7413 * einfo.ads (Materialize_Entity): Document this is only for renamings
7414 * exp_ch3.adb (Expand_N_Object_Declaration): Make sure we generate
7415 required debug information in the case where we transform the object
7416 declaration into a renaming declaration.
7417 * exp_ch4.adb (Expand_Concatenate): Generate debug info for result
7418 object
7419 * exp_dbug.ads (Debug_Renaming_Declaration): Document setting of
7420 Materialize_Entity.
7421
5b1e6aca
RD
74222011-08-02 Robert Dewar <dewar@adacore.com>
7423
7424 * einfo.ads, einfo.adb (Suppress_Initialization): Replaces
7425 Suppress_Init_Procs.
7426 * exp_ch3.adb, exp_disp.adb, freeze.adb: Use
7427 Suppress_Initialization/Initialization_Suppressed.
7428 * gnat_rm.texi: New documentation for pragma Suppress_Initialization
7429 * sem_aux.ads, sem_aux.adb (Initialization_Suppressed): New function
7430 * sem_dist.adb: Use Suppress_Initialization/Initialization_Suppressed
7431 * sem_prag.adb: New processing for pragma Suppress_Initialization.
7432
5ad4969d
RD
74332011-08-02 Robert Dewar <dewar@adacore.com>
7434
7435 * gnat_rm.texi, a-tags.ads, sem_prag.adb, sem_ch12.adb, exp_disp.adb:
7436 Minor reformatting.
7437
8c4ee6f5
AC
74382011-08-02 Ed Schonberg <schonberg@adacore.com>
7439
7440 * sem_prag.adb (Chain_PPC): Implement AI04-0230: null procedures can
7441 only have inheritable classwide pre/postconditions.
7442
74432011-08-02 Javier Miranda <miranda@adacore.com>
7444
7445 * a-tags.ads, a-tags.adb (Check_TSD): New subprogram.
7446 * rtsfind.ads (RE_Check_TSD): New runtime entity.
7447 * exp_disp.adb (Make_DT): Generate call to the new runtime routine that
7448 checks if the external tag of a type is the same as the external tag
7449 of some other declaration.
7450
0b3d16c0
AC
74512011-08-02 Thomas Quinot <quinot@adacore.com>
7452
7453 * s-taskin.ads: Minor reformatting.
7454
74552011-08-02 Emmanuel Briot <briot@adacore.com>
7456
7457 * g-comlin.adb (Display_Help): swap the order in which it prints the
7458 short help and the general usage.
7459
74602011-08-02 Ed Schonberg <schonberg@adacore.com>
7461
7462 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): copy properly
7463 the aspect declarations and attach them to the generic copy for
7464 subsequent analysis.
7465 (Analyze_Subprogram_Instantiation): copy explicitly the aspect
7466 declarations of the generic tree to the new subprogram declarations.
7467 * sem_attr.adb (Check_Precondition_Postcondition): recognize
7468 conditions that apply to a subprogram instance.
7469
74702011-08-02 Robert Dewar <dewar@adacore.com>
7471
7472 * gnat_rm.texi: Clarify doc on pragma Source_File_Name[_Project].
7473
74742011-08-02 Ed Schonberg <schonberg@adacore.com>
7475
7476 * sem_ch3.adb (Derived_Type_Declaration): When checking that a untagged
7477 private type with a tagged full view is not derived in the immediate
7478 scope of the partial view, (RM 7.3 (7)) use the scope of the base type.
7479
4637729f
AC
74802011-08-02 Robert Dewar <dewar@adacore.com>
7481
7482 * exp_ch4.adb: Minor reformatting.
7483
74842011-08-02 Ed Schonberg <schonberg@adacore.com>
7485
7486 * sem_ch5.adb (Analyze_Loop_Statement): If the iteration scheme is an
7487 Ada2012 iterator, the loop will be rewritten during expansion into a
7488 while loop with a cursor and an element declaration. Do not analyze the
7489 body in this case, because if the container is for indefinite types the
7490 actual subtype of the elements will only be determined when the cursor
7491 declaration is analyzed.
7492
74932011-08-02 Arnaud Charlet <charlet@adacore.com>
7494
7495 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore
7496 size/alignment related attributes in CodePeer_Mode.
7497
74982011-08-02 Gary Dismukes <dismukes@adacore.com>
7499
7500 * sem_ch3.adb (Check_Ops_From_Incomplete_Type): Remove call to
7501 Prepend_Element, since this can result in the operation getting the
7502 wrong slot in the full type's dispatch table if the full type has
7503 inherited operations. The incomplete type's operation will get added
7504 to the proper position in the full type's primitives
7505 list later in Sem_Disp.Check_Operation_From_Incomplete_Type.
7506 (Process_Incomplete_Dependents): Add Is_Primitive test when checking for
7507 dispatching operations, since there are cases where nonprimitive
7508 subprograms can get added to the list of incomplete dependents (such
7509 as subprograms in nested packages).
7510 * sem_ch6.adb (Process_Formals): First, remove test for being in a
7511 private part when determining whether to add a primitive with a
7512 parameter of a tagged incomplete type to the Private_Dependents list.
7513 Such primitives can also occur in the visible part, and should not have
7514 been excluded from being private dependents.
7515 * sem_ch7.adb (Uninstall_Declarations): When checking the rule of
7516 RM05-3.10.1(9.3/2), test that a subprogram in the Private_Dependents
7517 list of a Taft-amendment incomplete type is a primitive before issuing
7518 an error that the full type must appear in the same unit. There are
7519 cases where nonprimitives can be in the list (such as subprograms in
7520 nested packages).
7521 * sem_disp.adb (Derives_From): Use correct condition for checking that
7522 a formal's type is derived from the type of the corresponding formal in
7523 the parent subprogram (the condition was completely wrong). Add
7524 checking that was missing for controlling result types being derived
7525 from the result type of the parent operation.
7526
4c60de0c
YM
75272011-08-02 Yannick Moy <moy@adacore.com>
7528
7529 * errout.adb (First_Node): minor renaming
7530 * restrict.adb (Check_Formal_Restriction): put restriction warning on
7531 first node.
7532
f5afb270
AC
75332011-08-02 Yannick Moy <moy@adacore.com>
7534
7535 * sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
7536 before accessing operands.
7537 * sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
7538 decide whether an initialization expression respects SPARK rules, as
7539 the plain node is the expanded one. This allows for more valid warnings
7540 to be issued.
7541 * gnat_rm.texi: Minor update.
7542
75432011-08-02 Arnaud Charlet <charlet@adacore.com>
7544
7545 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
7546 previous change.
7547
75482011-08-02 Robert Dewar <dewar@adacore.com>
7549
7550 * sem_ch3.adb, sem_ch4.adb: Minor reformatting.
7551
75522011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7553
7554 * exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
7555 loop statements and the element renaming declaration with a block when
7556 the element type is controlled.
7557
75582011-08-02 Yannick Moy <moy@adacore.com>
7559
7560 * sinfo.ads: Minor formatting.
7561
75622011-08-02 Ed Schonberg <schonberg@adacore.com>
7563
7564 * sem_aggr.adb (Add_Association): if the association has a box and no
7565 expression, use the Sloc of the aggregate itself for the new
7566 association.
7567 * errout.adb (First_Node): Exclude nodes with no Sloc, and always use
7568 the Original_Node.
7569
db72f10a
AC
75702011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7571
7572 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
7573 When a container is provided via a function call, generate a renaming
7574 of the function result. This avoids the creation of a transient scope
7575 and the premature finalization of the container.
7576 * exp_ch7.adb (Is_Container_Cursor): Removed.
7577 (Wrap_Transient_Declaration): Remove the supression of the finalization
7578 of the list controller when the declaration denotes a container cursor,
7579 it is not needed.
7580
75812011-08-02 Yannick Moy <moy@adacore.com>
7582
7583 * restrict.adb (Check_Formal_Restriction): only issue a warning if the
7584 node is from source, instead of the original node being from source.
7585 * sem_aggr.adb
7586 (Resolve_Array_Aggregate): refine the check for a static expression, to
7587 recognize also static ranges
7588 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
7589 Array_Type_Declaration): postpone the test for the type being a subtype
7590 mark after the type has been resolved, so that component-selection and
7591 expanded-name are discriminated.
7592 (Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
7593 to distinguish the case of an iteration scheme, so that an error is
7594 issed on a non-static range in SPARK except in an iteration scheme.
7595 * sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
7596 In_Iter_Schm = True.
7597 * sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
7598 user-defined operators so that they are allowed in renaming
7599 * sem_ch8.adb
7600 (Find_Selected_Component): refine the check for prefixing of operators
7601 so that they are allowed in renaming. Move the checks for restrictions
7602 on selector name after analysis discriminated between
7603 component-selection and expanded-name.
7604 * sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
7605 concatenation argument of string type if it is static.
7606 * sem_util.adb, sem_util.ads
7607 (Check_Later_Vs_Basic_Declarations): add a new function
7608 Is_Later_Declarative_Item to decice which declarations are allowed as
7609 later items, in the two different modes Ada 83 and SPARK. In the SPARK
7610 mode, add that renamings are considered as later items.
7611 (Enclosing_Package): new function to return the enclosing package
7612 (Enter_Name): correct the rule for homonyms in SPARK
7613 (Is_SPARK_Initialization_Expr): default to returning True on nodes not
7614 from source (result of expansion) to avoid issuing wrong warnings.
7615
76162011-08-02 Ed Schonberg <schonberg@adacore.com>
7617
7618 * errout.adb: On anything but an expression First_Node returns its
7619 argument.
7620
23685ae6
AC
76212011-08-02 Pascal Obry <obry@adacore.com>
7622
7623 * prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.
7624
76252011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
7626
7627 * exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
7628 Set the associated loop as the related expression of internally
7629 generated cursors.
7630 * exp_ch7.adb (Is_Container_Cursor): New routine.
7631 (Wrap_Transient_Declaration): Supress the finalization of the list
7632 controller when the declaration denotes a container cursor.
7633
76342011-08-02 Yannick Moy <moy@adacore.com>
7635
7636 * opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
7637 command line now.
7638 * par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
7639 expression is a simple expression. This check cannot be performed in
7640 the semantics, so just drop it.
7641 (P_Index_Or_Discriminant_Constraint): move check that the index or
7642 discriminant is a subtype mark to Analyze_Subtype_Declaration in the
7643 semantics. Other cases were previously checked in the semantics.
7644 * par-ch4.adb (P_Name): move checks that a selector name is not
7645 character literal or an operator symbol to Find_Selected_Component in
7646 the semantics
7647 * par-ch5.adb (Parse_Decls_Begin_End): move check that basic
7648 declarations are not placed after later declarations in a separate
7649 procedure in Sem_Util (possibly not the best choice?), to be used both
7650 during parsing, for Ada 83 mode, and during semantic analysis, for
7651 SPARK mode.
7652 * par-endh.adb (Check_End): move check that end label is not missing
7653 to Process_End_Label in the semantics
7654 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
7655 the special case for SPARK restriction
7656 * par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
7657 * restrict.adb, restrict.ads (Check_Formal_Restriction): add a
7658 parameter Force to issue the error message even on internal node (used
7659 for generated end label). Call Check_Restriction to check when an error
7660 must be issued. In SPARK mode, issue an error message even if the
7661 restriction is not set.
7662 (Check_Restriction): new procedure with an additional out parameter to
7663 inform the caller that a message has been issued
7664 * sem_aggr.adb: Minor modification of message
7665 * sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
7666 instead of issuing an error message directly
7667 * sem_ch3.adb (Analyze_Declarations): move here the check that basic
7668 declarations are not placed after later declarations, by calling
7669 Check_Later_Vs_Basic_Declarations
7670 (Analyze_Subtype_Declaration): move here the check that an index or
7671 discriminant constraint must be a subtype mark. Change the check that
7672 a subtype of String must start at one so that it works on subtype marks.
7673 * sem_ch4.adb (Analyze_Call): move here the check that a named
7674 association cannot follow a positional one in a call
7675 * sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
7676 instead of issuing an error message directly
7677 * sem_ch8.adb (Find_Selected_Component): move here the check that a
7678 selector name is not a character literal or an operator symbol. Move
7679 here the check that the prefix of an expanded name cannot be a
7680 subprogram or a loop statement.
7681 * sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
7682 procedure called from parsing and semantics to check that basic
7683 declarations are not placed after later declarations
7684 (Process_End_Label): move here the check that end label is not missing
7685
76862011-08-02 Arnaud Charlet <charlet@adacore.com>
7687
7688 * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
7689 representation clause in codepeer mode, since it confuses CodePeer and
7690 does not bring useful info.
7691
76922011-08-02 Ed Falis <falis@adacore.com>
7693
7694 * init.c: initialize fp hw on MILS.
7695
76962011-08-02 Ed Schonberg <schonberg@adacore.com>
7697
7698 * errout.adb (First_Node): for bodies, return the node itself (small
7699 optimization). For other nodes, do not check source_unit if the node
7700 comes from Standard.
7701
d2d9cc22
AC
77022011-08-02 Robert Dewar <dewar@adacore.com>
7703
7704 * exp_ch3.adb: Minor comment additions.
7705 * sem_ch13.adb: Minor reformatting.
7706
77072011-08-02 Pascal Obry <obry@adacore.com>
7708
7709 * make.adb, makeutl.adb: Removes some superfluous directory separator.
7710
a01b9df6
AC
77112011-08-02 Robert Dewar <dewar@adacore.com>
7712
7713 * sem_attr.adb: Minor reformatting.
7714
77152011-08-02 Robert Dewar <dewar@adacore.com>
7716
7717 * einfo.adb (Has_Default_Aspect): Replaces Has_Default_Value
7718 (Has_Default_Component_Value): Removed
7719 * einfo.ads Comment updates
7720 (Has_Default_Aspect): Replaces Has_Default_Value
7721 (Has_Default_Component_Value): Removed
7722 * exp_ch13.adb
7723 (Expand_N_Freeze_Entity): Handle Default[_Component]_Value aspects
7724 * exp_ch3.adb
7725 (Build_Array_Init_Proc): Handle Default_[Component_]Value aspects
7726 (Get_Simple_Init_Val): Handle Default_Value aspect
7727 (Needs_Simple_Initialization): Handle Default_Value aspect
7728 * exp_ch3.ads: Needs_Simple_Initialization
7729 * freeze.adb (Freeze_Entity): Handle Default_[Component_]Value aspect
7730 * par-prag.adb (Pragma_Default[_Component]Value) Removed
7731 * sem_ch13.adb
7732 (Analyze_Aspect_Specifications): Fix Default[_Component]_Value aspects
7733 * sem_prag.adb (Pragma_Default[_Component]Value) Removed
7734 * snames.ads-tmpl (Pragma_Default[_Component]Value) Removed
7735
77362011-08-02 Ed Schonberg <schonberg@adacore.com>
7737
7738 * sem_ch5.adb (Analyze_Iterator_Specification): use base type to locate
7739 package containing iteration primitives.
7740 exp_ch5.adb (Expand_Iterator_Loop): ditto.
7741
75c90775
AC
77422011-08-02 Ed Schonberg <schonberg@adacore.com>
7743
7744 * sem_ch5.adb (Analyze_Iteration_Scheme): For an Ada2012 iterator with
7745 "of", pre-analyze expression in case it is a function call with
7746 finalization actions that must be placed ahead of the loop.
7747 * exp_ch5.adb (Expand_Iterator_Loop): If condition_actions are present
7748 on an Ada2012 iterator, insert them ahead of the rewritten loop.
7749
77502011-08-02 Geert Bosch <bosch@adacore.com>
7751
7752 * cstand.adb (Create_Float_Types): Only consider C's long double for
7753 Long_Long_Float, in addition to double.
7754
ded8909b
AC
77552011-08-02 Robert Dewar <dewar@adacore.com>
7756
7757 * sem_ch3.adb, sem_ch5.adb, sem_type.adb, switch-c.adb, switch-c.ads,
7758 sem_prag.adb, sem_util.adb, sem_util.ads, sem_res.adb, warnsw.ads,
7759 prepcomp.ads, cstand.adb, stand.ads, a-calfor.adb, s-stusta.adb:
7760 Minor reformatting.
7761
77622011-08-02 Ed Schonberg <schonberg@adacore.com>
7763
7764 * sem_attr.adb: handle properly 'Result when it is a prefix of an
7765 indexed component.
7766
77672011-08-02 Javier Miranda <miranda@adacore.com>
7768
7769 * einfo.ads, einfo.adb
7770 (Original_Access_Type): Move this attribute to Node26 since there was
7771 an undocumented use of Node21 in E_Access_Subprogram_Type entities
7772 which causes conflicts and breaks the generation of the .NET compiler.
7773 (Interface_Name): Add missing documentation on JGNAT only uses of
7774 this attribute.
7775
70c34e1c
AC
77762011-08-02 Geert Bosch <bosch@adacore.com>
7777
7778 * cstand.adb (Back_End_Float_Types): Use Elist instead of Nlist
7779 (Find_Back_End_Float_Type): Likewise
7780 (Create_Back_End_Float_Types): Likewise
7781 (Create_Float_Types): Likewise
7782 (Register_Float_Type): Likewise
7783 * sem_ch3.adb (Floating_Point_Type_Declaration): Use Elist instead of
7784 Nlist and split out type selection in new local Find_Base_Type function.
7785 * sem_prag.adb (Process_Import_Predefined_Type): Use Elist instead of
7786 Nlist
7787 * stand.ads (Predefined_Float_Types): Use Elist instead of Nlist
7788
77892011-08-02 Robert Dewar <dewar@adacore.com>
7790
7791 * inline.adb: Minor code reorganization (put Get_Code_Unit_Entity in
7792 alpha order).
7793 * opt.ads: Minor comment change.
7794 * sem_ch12.adb: Minor code reorganization.
7795
b715bc59
AC
77962011-08-02 Gary Dismukes <dismukes@adacore.com>
7797
7798 * sem_ch3.adb (Complete_Private_Subtype): Don't append the private
7799 subtype's list of rep items to the list on the full subtype in the case
7800 where the lists are the same.
7801
78022011-08-02 Geert Bosch <bosch@adacore.com>
7803
7804 * switch-c.adb (Free): New deallocation procedure to avoid implicitly
7805 using the one from System.Strings, which also deallocates all strings.
7806
002bdd68
AC
78072011-08-02 Geert Bosch <bosch@adacore.com>
7808
7809 * gcc-interface/gigi.h, gcc-interface/misc.c (enumerate_modes): New
7810 function.
7811 * gcc-interface/Make-lang.in: Update dependencies.
7812
78132011-08-02 Olivier Hainque <hainque@adacore.com>
7814
7815 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Set the function
7816 end_locus.
7817
499769ec
AC
78182011-08-02 Javier Miranda <miranda@adacore.com>
7819
7820 * sem_ch3.adb (Check_Anonymous_Access_Components): Create extra formals
7821 associated with anonymous access to subprograms.
7822
78232011-08-02 Geert Bosch <bosch@adacore.com>
7824
7825 * opt.ads
7826 (Preprocessing_Symbol_Defs): Move from Prepcomp.Symbol_Definitions.
7827 (Preprocessing_Symbol_Last): Move from Prepcomp.Last_Definition.
7828 * prepcomp.adb (Symbol_Definitions, Last_Definition): Move to opt.ads
7829 (Add_Symbol_Definition): Move to switch-c.adb
7830 (Process_Command_Line_Symbol_Definitions): Adjust references to above.
7831 * prepcomp.ads: Remove dependency on Ada.Unchecked_Deallocation.
7832 (Add_Symbol_Definition): Move to switch-c.adb.
7833 * sem_ch13.adb, sem_prag.adb: Add dependency on Warnsw.
7834 * sem_warn.adb
7835 (Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7836 Move to warnsw.adb.
7837 * sem_warn.ads (Warn_On_Record_Holes, Warn_On_Overridden_Size,
7838 Set_Dot_Warning_Switch, Set_GNAT_Mode_Warnings, Set_Warning_Switch):
7839 Move to warnsw.adb.
7840 * switch-c.adb: Replace dependency on Prepcomp and Sem_Warn by Warnsw.
7841 (Add_Symbol_Definition): Moved from Prepcomp.
7842 * switch-c.ads: Update copyright notice. Use String_List instead of
7843 Argument_List, removing dependency on System.OS_Lib.
7844
aa1e353a
AC
78452011-08-02 Yannick Moy <moy@adacore.com>
7846
7847 * sem_ch3.adb (Analyze_Object_Declaration): issue an error in formal
7848 mode on initialization expression which does not respect SPARK
7849 restrictions.
7850 * sem_util.adb, sem_util.ads (Is_SPARK_Initialization_Expr): determines
7851 if the tree referenced by its argument represents an initialization
7852 expression in SPARK, suitable for initializing an object in an object
7853 declaration.
7854
78552011-08-02 Javier Miranda <miranda@adacore.com>
7856
7857 * exp_ch9.adb (Expand_Access_Protected_Subprogram_Type): Link the
7858 internally generated access to subprogram with its associated protected
7859 subprogram type.
7860 * einfo.ads, einfo.adb (Original_Access_Type): New attribute.
7861
15b682ca
GB
78622011-08-02 Geert Bosch <bosch@adacore.com>
7863
7864 * cstand.adb (Register_Float_Type): Print information about type to
7865 register, if the Debug_Flag_Dot_B is set.
7866 * debug.adb (Debug_Flag_Dot_B): Document d.b debug option.
7867 * rtsfind.ads (RE_Max_Base_Digits): New run time entity.
7868 * sem_ch3.adb (Floating_Point_Type_Declaration): Allow declarations
7869 with a requested precision of more than Max_Digits digits and no more
7870 than Max_Base_Digits digits, if a range specification is present and the
7871 Predefined_Float_Types list has a suitable type to derive from.
7872 * sem_ch3.adb (Rep_Item_Too_Early): Avoid generating error in the
7873 case of type completion with pragma Import
7874 * sem_prag.adb
7875 (Process_Import_Predefined_Type): Processing to complete a type
7876 with pragma Import. Currently supports floating point types only.
7877 (Set_Convention_From_Pragma): Do nothing without underlying type.
7878 (Process_Convention): Guard against absence of underlying type,
7879 which may happen when importing incomplete types.
7880 (Process_Import_Or_Interface): Handle case of importing predefined
7881 types. Tweak error message.
7882
f8726f2b
AC
78832011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7884
7885 * inline.adb (Add_Inlined_Body): Adjust check for library-level inlined
7886 functions to previous change. Reorganize code slightly.
7887
78882011-08-02 Geert Bosch <bosch@adacore.com>
7889
7890 * back_end.ads (Register_Type_Proc): New call back procedure type for
7891 allowing the back end to provide information about available types.
7892 (Register_Back_End_Types): New procedure to register back end types.
7893 * back_end.adb (Register_Back_End_Types): Call the back end to enumerate
7894 available types.
7895 * cstand.adb (Back_End_Float_Types): New list for floating point types
7896 supported by the back end.
7897 (Build_Float_Type): Add extra parameter for Float_Rep_Kind.
7898 (Copy_Float_Type): New procedure to make new copies of predefined types.
7899 (Register_Float_Type): New call back procedure to populate the BEFT list
7900 (Find_Back_End_Float_Type): New procedure to find a BEFT by name
7901 (Create_Back_End_Float_Types): New procedure to populate the BEFT list.
7902 (Create_Float_Types): New procedure to create entities for floating
7903 point types predefined in Standard, and put these and any remaining
7904 BEFTs on the Predefined_Float_Types list.
7905 * stand.ads (Predefined_Float_Types): New list for predefined floating
7906 point types that do not have declarations in package Standard.
7907
feecad68
AC
79082011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7909
7910 * inline.adb (Get_Code_Unit_Entity): New local function. Returns the
7911 entity node for the unit containing the parameter.
7912 (Add_Inlined_Body): Use it to find the unit containing the subprogram.
7913 (Add_Inlined_Subprogram): Likewise.
7914 * gcc-interface/Make-lang.in: Update dependencies.
7915
79162011-08-02 Thomas Quinot <quinot@adacore.com>
7917
7918 * s-stusta.adb (Print): Make sure Pos is always initialized to a
7919 suitable value.
7920
12f0c50c
AC
79212011-08-02 Geert Bosch <bosch@adacore.com>
7922
7923 * a-calfor.adb (Image): Simplify, removing unnecessary uses of 'Image.
7924
79252011-08-02 Eric Botcazou <ebotcazou@adacore.com>
7926
7927 * sem_type.adb (Covers): Move trivial case to the top and reuse the
7928 computed value of Base_Type.
7929
79302011-08-02 Yannick Moy <moy@adacore.com>
7931
7932 * restrict.adb (Check_Restriction): issue an error for any use of
7933 class-wide, even if the No_Dispatch restriction is not set.
7934 * sem_aggr.adb: Correct typos in comments and messages in formal mode
7935 * sem_ch3.adb (Process_Full_View): issue an error in formal mode is,
7936 when completing a private extension, the type named in the private part
7937 is not the same as that named in the visible part.
7938 * sem_res.adb (Resolve_Call): issue an error in formal mode on the use
7939 of an inherited primitive operations of a tagged type or type extension
7940 that returns the tagged type.
7941 * sem_util.adb, sem_util.ads (Is_Inherited_Operation_For_Type): new
7942 function which returns True for an implicit operation inherited by the
7943 derived type declaration for the argument type.
7944 (Is_SPARK_Object_Reference): move to appropriate place in alphabetic
7945 order.
7946
fb86fe11
ES
79472011-08-02 Ed Schonberg <schonberg@adacore.com>
7948
7949 * sem_ch5.adb (Pre_Analyze_Range): new procedure extracted from
7950 Process_Bounds, to perform analysis with expansion of a range or an
7951 expression that is the iteration scheme for a loop.
7952 (Analyze_Iterator_Specification): If domain of iteration is given by a
7953 function call with a controlled result, as is the case if call returns
7954 a predefined container, ensure that finalization actions are properly
7955 generated.
7956 * par-ch3.adb: accept Ada2012 iterator form in P_Discrete_Range.
7957
62be5d0a
JM
79582011-08-02 Javier Miranda <miranda@adacore.com>
7959
7960 * sem_ch5.adb (Analyze_Iteration_Scheme): Fix typo.
7961 * gcc-interface/Make-lang.in: Update dependencies.
7962
79632011-08-02 Javier Miranda <miranda@adacore.com>
7964
7965 * sem_util.ads, sem_util.adb (Is_Variable): Add a new formal to
7966 determine if the analysis is performed using N or Original_Node (N).
7967 * exp_util.adb (Side_Effect_Free): Code cleanup since the new
7968 functionality of routine Is_Variable avoids code duplication.
7969 * checks.adb (Determine_Range): Handle temporaries generated by
7970 Remove_Side_Effects.
7971
79722011-08-02 Javier Miranda <miranda@adacore.com>
7973
7974 * exp_ch4.adb (Expand_N_Quantified_Expression): Force reanalysis and
7975 expansion of the condition. Required since the previous analysis was
7976 done with expansion disabled (see Resolve_Quantified_Expression) and
7977 hence checks were not inserted and record comparisons have not been
7978 expanded.
7979
a20f4389
AC
79802011-08-02 Ed Falis <falis@adacore.com>
7981
7982 * s-taprop-vxworks.adb, s-intman-vxworks.adb, s-intman-vxworks.ads:
7983 Update header.
7984
79852011-08-02 Bob Duff <duff@adacore.com>
7986
7987 * opt.ads: Minor comment fix.
7988
79892011-08-02 Bob Duff <duff@adacore.com>
7990
7991 * sem_ch12.adb (Analyze_Package_Instantiation,
7992 Analyze_Subprogram_Instantiation): Turn off style checking while
7993 analyzing an instance. Whatever style checks that apply to the generic
7994 unit should apply, so it makes no sense to apply them in an instance.
7995 This was causing trouble when compiling an instance of a runtime
7996 unit that violates the -gnatyO switch.
7997 * stylesw.adb (Set_Style_Check_Options): "when 'O' =>" was missing from
7998 one of the two case statements, causing spurious errors.
7999
80002011-08-02 Robert Dewar <dewar@adacore.com>
8001
8002 * uname.adb: Minor reformatting.
8003 * gnatcmd.adb: Minor reformatting.
8004 * exp_attr.adb: Minor reformatting.
8005
90878b12
AC
80062011-08-02 Ed Schonberg <schonberg@adacore.com>
8007
8008 * exp_ch5.adb (Expand_N_Assignment_Statement): under restriction
8009 No_Dispatching_Calls, do not look for the Assign primitive, because
8010 predefined primitives are not created in this case.
8011
80122011-08-02 Bob Duff <duff@adacore.com>
8013
8014 * stylesw.ads: Minor comment fixes.
8015
80162011-08-02 Robert Dewar <dewar@adacore.com>
8017
8018 * freeze.adb (Add_To_Result): New procedure.
8019
80202011-08-02 Jose Ruiz <ruiz@adacore.com>
8021
8022 * exp_attr.adb (Find_Stream_Subprogram): When using a configurable run
8023 time, if the specific run-time routines for handling streams of strings
8024 are not available, use the default mechanism.
8025
80262011-08-02 Arnaud Charlet <charlet@adacore.com>
8027
8028 * s-regpat.ads: Fix typo.
8029
80302011-08-02 Vincent Celier <celier@adacore.com>
8031
8032 * prj-conf.adb (Get_Or_Create_Configuration_File): If On_Load_Config is
8033 not null, call it to create the in memory config project file without
8034 parsing an existing default config project file.
8035
80362011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8037
8038 * atree.adb (Allocate_Initialize_Node): Remove useless temporaries.
8039
80402011-08-02 Ed Schonberg <schonberg@adacore.com>
8041
8042 * sem_elim.adb: an abstract subprogram does not need an eliminate
8043 pragma for its descendant to be eliminable.
8044
80452011-08-02 Ed Falis <falis@adacore.com>
8046
8047 * init.c: revert to handling before previous checkin for VxWorks
8048 * s-intman-vxworks.adb: delete unnecessary declarations related to
8049 using Ada interrupt facilities for handling signals.
8050 Delete Initialize_Interrupts. Use __gnat_install_handler instead.
8051 * s-intman-vxworks.ads: Import __gnat_install_handler as
8052 Initialize_Interrupts.
8053 * s-taprop-vxworks.adb: Delete Signal_Mask.
8054 (Abort_Handler): change construction of mask to unblock exception
8055 signals.
8056
273adcdf
AC
80572011-08-02 Jerome Guitton <guitton@adacore.com>
8058
8059 * a-except-2005.adb (Raise_From_Signal_Handler): Call
8060 Debug_Raise_Exception before propagation starts.
8061
80622011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8063
8064 * exp_ch6.adb (Expand_Call): Guard restriction checks with a call
8065 to Restriction_Check_Required.
8066 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
8067 * sem_res.adb (Resolve_Call): Likewise.
8068 * sem_attr.adb (Check_Stream_Attribute): Likewise.
8069
80702011-08-02 Bob Duff <duff@adacore.com>
8071
8072 * stylesw.ads: Update comment.
8073 * style.adb: Minor: Use Error_Msg_NE instead of Error_Msg_N.
8074 * errout.ads: Remove obsolete comment.
8075
80762011-08-02 Javier Miranda <miranda@adacore.com>
8077
8078 * einfo.ads, einfo.adb (Is_Safe_To_Reevaluate): new function.
8079 (Set_Is_Safe_To_Reevaluate): new procedure.
8080 * sem_ch5.adb (Analyze_Assignment): Add one assertion to ensure that no
8081 assignment is allowed on safe-to-reevaluate variables.
8082 (Analyze_Iteration_Schine.Process_Bounds.One_Bound): Decorate the
8083 temporary created to remove side effects in expressions that use
8084 the secondary stack as safe-to-reevaluate.
8085 * exp_util.adb (Side_Effect_Free): Add missing code to handle well
8086 variables that are not true constants.
8087
6320f5e1
AC
80882011-08-02 Robert Dewar <dewar@adacore.com>
8089
8090 * sem_ch5.adb, sem_ch7.adb, einfo.ads, sem_util.adb, sem_util.ads,
8091 sem_res.adb, sem_ch6.adb: Minor reformatting.
8092
80932011-08-02 Jerome Guitton <guitton@adacore.com>
8094
8095 * a-except-2005.adb (Raise_Current_Excep): Remove obsolete dead code.
8096
2fe829ae
ES
80972011-08-02 Ed Schonberg <schonberg@adacore.com>
8098
8099 * sem_ch6.adb (New_Overloaded_Entity, Check_Overriding_Indicator): Do
8100 not set Overridden_Operation if subprogram is an initialization
8101 procedure.
8102
e24329cd
YM
81032011-08-02 Yannick Moy <moy@adacore.com>
8104
8105 * par-ch6.adb: Correct obsolete name in comments
8106 * restrict.adb, restrict.ads (Check_Formal_Restriction): new function
8107 which takes two message arguments (existing function takes one), with
8108 second message used for continuation.
8109 * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject
8110 block statements that originate from a source block statement, not
8111 generated block statements
8112 * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for
8113 symmetry with procedure case
8114 * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new
8115 function to issue an error in formal mode if a package specification
8116 contains more than one tagged type or type extension.
8117 * sem_res.adb (Resolve_Actuals): in formal mode, check that actual
8118 parameters matching formals of tagged types are objects (or ancestor
8119 type conversions of objects), not general expressions. Issue an error
8120 on view conversions that are not involving ancestor conversion of an
8121 extended type.
8122 (Resolve_Type_Conversion): in formal mode, issue an error on the
8123 operand of an ancestor type conversion which is not an object
8124 * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the
8125 procedure so that it works also for actuals of function calls
8126 (Is_Actual_Tagged_Parameter): new function which determines if its
8127 argument is an actual parameter of a formal of tagged type in a
8128 subprogram call
8129 (Is_SPARK_Object_Reference): new function which determines if the tree
8130 referenced by its argument represents an object in SPARK
8131
176dadf6
AC
81322011-08-02 Robert Dewar <dewar@adacore.com>
8133
8134 * sem_ch3.adb: Minor reformatting
8135 Minor comment addition
8136 Minor error msg text change
8137
81382011-08-02 Javier Miranda <miranda@adacore.com>
8139
8140 * sem_ch5.adb (Analyze_Iteration_Scheme.Uses_Secondary_Stack): New
8141 function. Used to be more precise when we generate a variable plus one
8142 assignment to remove side effects in the evaluation of the Bound
8143 expressions.
8144 (Analyze_Iteration_Scheme): Clean attribute analyzed in all the nodes
8145 of the bound expression to force its re-analysis and thus expand the
8146 associated transient scope (if required). Code cleanup replacing the
8147 previous code that declared the constant entity by an invocation to
8148 routine Force_Evaluation which centralizes this work in the frontend.
8149
d8b962d8
AC
81502011-08-02 Robert Dewar <dewar@adacore.com>
8151
8152 * einfo.adb (Is_Base_Type): Improve efficiency by using a flag table
8153 (Base_Type): Now uses improved Is_Base_Type function
8154 * einfo.ads (Base_Type): Inline this function
8155
81562011-08-02 Robert Dewar <dewar@adacore.com>
8157
8158 * sem_prag.adb (Analyze_Pragma): Defend against infinite recursion
8159 (Analyze_Aspect_Specifications): Fix Sloc values for constructed pragmas
8160
81612011-08-02 Arnaud Charlet <charlet@adacore.com>
8162
8163 * gcc-interface/Make-lang.in: Update dependencies.
8164 * gcc-interface/Makefile.in: Use s-inmapop-vxworks.adb for all VxWorks
8165 targets.
8166
81672011-08-02 Yannick Moy <moy@adacore.com>
8168
8169 * par-ch3.adb (P_Delta_Constraint): issue an error in formal mode on
8170 non-simple expression used in delta constraint
8171 (P_Index_Or_Discriminant_Constraint): issue an error in formal mode on
8172 index constraint which is not a subtype mark
8173 * par.adb: With and use Restrict
8174 * sem_ch3.adb (Analyze_Component_Declaration): issue an error in formal
8175 mode on component type which is not a subtype mark and default
8176 expression on component
8177 (Analyze_Subtype_Declaration): issue an error in formal mode on subtype
8178 of string which does not have a lower index bound equal to 1
8179 (Array_Type_Declaration): issue an error in formal mode on index or
8180 component type which is not a subtype mark, and on aliased keyword on
8181 component
8182 (Derived_Type_Declaration): issue an error in formal mode on interface,
8183 limited or abstract type
8184 (Record_Type_Declaration): issue an error in formal mode on interface
8185 (Record_Type_Definition): issue an error in formal mode on tagged types
8186 and type extensions not declared in the specification of a library unit
8187 package; on null non-tagged record; on variant part
8188
81892011-08-02 Vincent Celier <celier@adacore.com>
8190
8191 * prj-nmsc.adb (Check_Library_Attributes): Do not report Library_Dir
8192 not declared for qualified library project when Library_Name is not
8193 declared, but Library_Dir is.
8194
81952011-08-02 Robert Dewar <dewar@adacore.com>
8196
8197 * sem_ch13.adb (Analyze_Aspect_Specification): Fix slocs on generated
8198 pragmas (affects aspects [Component_]Default_Value
8199 (Check_Aspect_At_Freeze_Point): For Component_Default_Value, use
8200 component type for the resolution
8201
f96b2d85
AC
82022011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8203
8204 * einfo.adb (Base_Type): Tune implementation for speed.
8205
82062011-08-02 Robert Dewar <dewar@adacore.com>
8207
8208 * freeze.adb: Minor reformatting.
8209
8b3c6430
AC
82102011-08-02 Thomas Quinot <quinot@adacore.com>
8211
8212 * scos.ads: Update comments.
8213
82142011-08-02 Ed Schonberg <schonberg@adacore.com>
8215
8216 * sem_ch3.adb (Build_Derived_Type): Inherit the convention from the
8217 base type, because the parent may be a subtype of a private type whose
8218 convention is established in a private part.
8219
82202011-08-02 Hristian Kirtchev <kirtchev@adacore.com>
8221
8222 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Wrap the return
8223 statement in a block when the expansion of the return expression has
8224 created a finalization chain.
8225 * freeze.adb (Freeze_Expression): Alphabetize all choices associated
8226 with the parent node.
8227 Add N_Extended_Return_Statement to handle the case where a transient
8228 object declaration appears in the Return_Object_Declarations list of
8229 an extended return statement.
8230
82312011-08-02 Matthew Gingell <gingell@adacore.com>
8232
8233 * adaint.c (__gnat_is_symbolic_link_attr): Supress warning on possibly
8234 unused parameter 'name'.
8235
82362011-08-02 Ed Schonberg <schonberg@adacore.com>
8237
8238 * sem_elim.adb (Set_Eliminated): If the overridden operation is an
8239 inherited operation, check whether its alias, which is the source
8240 operastion that it renames, has been marked eliminated.
8241
cae81f17
JM
82422011-08-02 Javier Miranda <miranda@adacore.com>
8243
8244 * exp_util.adb (Safe_Prefixed_Reference): Do not consider safe an
8245 in-mode parameter whose type is an access type since it can be used to
8246 modify its designated object. Enforce code that handles as safe an
8247 access type that is not access-to-constant but it is the result of a
8248 previous removal of side-effects.
8249 (Remove_Side_Effects): Minor code reorganization of cases which require
8250 no action. Done to incorporate documentation on new cases uncovered
8251 working in this ticket: no action needed if this routine was invoked
8252 too early and the nodes are not yet decorated.
8253 * sem_res.adb (Resolve_Slice): Minor code cleanup replacling two calls
8254 to routine Remove_Side_Effects by calls to Force_Evaluation since they
8255 were issued with actuals that are implicitly provided by
8256 Force_Evaluation.
8257
218e6dee
RD
82582011-08-02 Robert Dewar <dewar@adacore.com>
8259
8260 * sem_ch3.adb, sem_res.adb: Minor reformatting.
8261
7a489a2b
AC
82622011-08-02 Yannick Moy <moy@adacore.com>
8263
8264 * sem_attr.adb (Check_Formal_Restriction_On_Attribute): new procedure
8265 to issue an error in formal mode on attribute not supported in this mode
8266 (Analyze_Attribute): issue errors on standard attributes not supported
8267 in formal mode.
8268 * sem_ch3.adb (Modular_Type_Declaration): remove obsolete part of
8269 comment, and issue error in formal mode on modulus which is not a power
8270 of 2.
8271 (Process_Range_Expr_In_Decl): issue error in formal mode on non-static
8272 range.
8273 * sem_ch8.adb (Find_Type): issue error in formal mode on 'Base in
8274 subtype mark.
8275 * sem_res.adb (Resolve_Unary_Op): issue error in formal mode on unary
8276 operator on modular type (except 'not').
8277
82782011-08-02 Robert Dewar <dewar@adacore.com>
8279
8280 * gnat_rm.texi: Minor reformatting.
8281
cb7fa356
AC
82822011-08-02 Arnaud Charlet <charlet@adacore.com>
8283
8284 * s-osinte-linux.ads: Minor comment update and reformatting.
8285 * i-cexten.ads: Make this unit pure, as for its parent.
8286 Will allow its usage in more contexts if needed.
8287
82882011-08-02 Robert Dewar <dewar@adacore.com>
8289
8290 * s-utf_32.ads: Minor comment fix.
8291
82922011-08-02 Ed Schonberg <schonberg@adacore.com>
8293
8294 * sem_res.adb (Resolve_Actuals): if the subprogram is a primitive
8295 operation of a tagged synchronized type, handle the case where the
8296 controlling argument is overloaded.
8297
82982011-08-02 Yannick Moy <moy@adacore.com>
8299
8300 * gnat_rm.texi, opt.ads, sem_prag.adb, snames.ads-tmpl:
8301 Replace pragma SPARK_95 with pragma Restrictions (SPARK)
8302 * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): set
8303 SPARK mode and formal verification mode on processing SPARK restriction
8304 * s-rident.ads (Restriction_Id): add SPARK restriction in those not
8305 requiring consistency checking.
8306
5cc9353d
RD
83072011-08-02 Robert Dewar <dewar@adacore.com>
8308
8309 * sem_res.adb: Minor reformatting.
8310
e51537ff
RD
83112011-08-02 Robert Dewar <dewar@adacore.com>
8312
8313 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8314 a-cforse.ads: Remove unneeded with of Ada.Containers
8315 Remove commented out pragma Inline's
8316 Move specifications of new subprograms to the actual specs
8317
83fa09c5
AC
83182011-08-02 Yannick Moy <moy@adacore.com>
8319
8320 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8321 a-cforse.ads: Update comments.
8322
83232011-08-02 Ed Schonberg <schonberg@adacore.com>
8324
8325 * sem_attr.adb: add attribute name when 'Result has the wrong prefix.
8326
d11cfaf8
RD
83272011-08-02 Robert Dewar <dewar@adacore.com>
8328
8329 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8330 a-cforse.ads, a-cofove.ads: Minor reformatting.
8331
300b98bb
AC
83322011-08-02 Claire Dross <dross@adacore.com>
8333
8334 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8335 a-cofove.ads: Add comments.
8336
83372011-08-02 Yannick Moy <moy@adacore.com>
8338
8339 * gnat_rm.texi: Document formal containers.
8340
83412011-08-02 Emmanuel Briot <briot@adacore.com>
8342
8343 * g-comlin.adb (Goto_Section, Getopt): fix handling of "*" when there
8344 are empty sections.
8345
19fb051c
AC
83462011-08-02 Robert Dewar <dewar@adacore.com>
8347
8348 * mlib-prj.adb, restrict.ads, sem_aggr.adb, sem_ch12.adb: Minor
8349 reformatting.
8350
83512011-08-02 Robert Dewar <dewar@adacore.com>
8352
8353 * aspects.adb: New aspects Default_Value and Default_Component_Value
8354 New format of Aspect_Names table checks for omitted entries
8355 * aspects.ads: Remove mention of Aspect_Cancel and add documentation on
8356 handling of boolean aspects for derived types.
8357 New aspects Default_Value and Default_Component_Value
8358 New format of Aspect_Names table checks for omitted entries
8359 * einfo.ads, einfo.adb (Has_Default_Component_Value): New flag
8360 (Has_Default_Value): New flag
8361 (Has_Default_Component_Value): New flag
8362 (Has_Default_Value): New flag
8363 * par-ch13.adb (P_Aspect_Specifications): New format of Aspect_Names
8364 table.
8365 * par-prag.adb: New pragmas Default_Value and Default_Component_Value
8366 * sem_ch13.adb (Analyze_Aspect_Specifications): New aspects
8367 Default_Value and Default_Component_Value
8368 * sem_prag.adb: New pragmas Default_Value and Default_Component_Value
8369 New aspects Default_Value and Default_Component_Value
8370 * snames.ads-tmpl: New pragmas Default_Value and Default_Component_Value
8371 * sprint.adb: Print N_Aspect_Specification node when called from gdb
8372
83732011-08-02 Vincent Celier <celier@adacore.com>
8374
8375 * prj-nmsc.adb (Check_Library_Attributes): For virtual library project,
8376 inherit library kind.
8377
83782011-08-02 Ed Schonberg <schonberg@adacore.com>
8379
8380 * sem_res.adb: Add guards in calls to Matching_Static_Array_Bounds.
8381 Minor reformatting.
8382
83832011-08-02 Robert Dewar <dewar@adacore.com>
8384
8385 * i-cstrin.ads: Updates to make Interfaces.C.Strings match RM
8386
5f7747af
AC
83872011-08-02 Yannick Moy <moy@adacore.com>
8388
8389 * sem_aggr.adb (Resolve_Aggregate): Fix thinko.
8390
83912011-08-02 Robert Dewar <dewar@adacore.com>
8392
8393 * impunit.adb: Add comment.
8394
a5fe697b
AC
83952011-08-02 Yannick Moy <moy@adacore.com>
8396
8397 * sem_aggr.adb (Check_Qualified_Aggregate): new procedure which checks
8398 qualification of aggregates in formal mode
8399 (Is_Top_Level_Aggregate): returns True for an aggregate not contained in
8400 another aggregate
8401 (Resolve_Aggregate): complete the test that an aggregate is adequately
8402 qualified in formal mode
8403
84042011-08-02 Pascal Obry <obry@adacore.com>
8405
8406 * make.adb, bindgen.adb, gnatbind.adb: Minor reformatting.
8407 * mlib-prj.adb: Supress warning when compiling binder generated file.
8408 (Build_Library): Supress all warnings when compiling the binder
8409 generated file.
8410
bd65a2d7 84112011-08-02 Yannick Moy <moy@adacore.com>
d4487611 8412
bd65a2d7
AC
8413 * errout.adb, errout.ads (Check_Formal_Restriction): move procedure
8414 from here...
8415 * restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
8416 * sem_aggr.adb, sem_ch5.adb, sem_util.adb:
8417 Add with/use clauses to make Check_Formal_Restriction visible
8418
84192011-08-02 Ed Schonberg <schonberg@adacore.com>
8420
8421 * sem_ch12.adb (Check_Generic_Actuals): handle properly actual
8422 in-parameters when type of the generic formal is private in the generic
8423 spec and non-private in the body.
8424
84252011-08-02 Claire Dross <dross@adacore.com>
8426
8427 * a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
8428 a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
8429 a-cofove.adb, a-cofove.ads: New files implementing formal containers.
8430 * impunit.adb, Makefile.rtl: Take new files into account.
d4487611
AC
8431
84322011-08-02 Robert Dewar <dewar@adacore.com>
8433
8434 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, make.adb, sem_res.adb,
8435 sem_attr.adb, sem_ch6.adb, sem_ch8.adb: Minor reformatting.
8436
bd434b3f
YM
84372011-08-02 Yannick Moy <moy@adacore.com>
8438
8439 * sem_aggr.adb (Resolve_Aggregate): disable incorrectly placed check in
8440 formal mode
8441 * sem_util.adb (Matching_Static_Array_Bounds): proper detection of
8442 matching static array bounds, taking into account the special case of
8443 string literals
8444 * sem_ch3.adb: Typo in comment.
8445
fe5d3068
YM
84462011-08-02 Yannick Moy <moy@adacore.com>
8447
8448 * errout.adb, errout.ads (Check_Formal_Restriction): new procedure
8449 which issues an error in formal mode if its argument node is originally
8450 from source
8451 * sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
8452 has a discriminant specification so that it does not include the case
8453 of derived types
8454 (Derived_Type_Declaration): move here the test that a derived type has a
8455 discriminant specification
8456 * sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
8457 first element of a component association before accessing its choices
8458 (presence of component association is not enough)
8459 * exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
8460 declaration is a library item before accessing the next element in a
8461 list, as library items are not member of lists
8462 * sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
8463 sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
8464 Check_Formal_Restriction whenever possible.
8465
b60a3f26
AC
84662011-08-02 Ed Schonberg <schonberg@adacore.com>
8467
8468 * sem_ch3.adb (Find_Type_Of_Object): In ASIS mode, create an itype
8469 reference when needed.
8470
84712011-08-02 Bob Duff <duff@adacore.com>
8472
8473 * gnat_ugn.texi: Fix typo.
8474
84752011-08-02 Vincent Celier <celier@adacore.com>
8476
8477 * make.adb (Gnatmake): Use MLib.Tgt.Archive_Ext as the extension of
8478 archive file name. Do not use the full path name of archives for Open
8479 VMS.
8480
eaba57fb
RD
84812011-08-02 Robert Dewar <dewar@adacore.com>
8482
8483 * sem_ch12.adb, sem_ch11.adb: New calling sequence for
8484 Analyze_Aspect_Specifications
8485 * sem_ch13.adb
8486 (Analyze_Aspect_Specifications): New handling for boolean aspects
8487 * sem_ch13.ads (Analyze_Aspect_Specifications): New calling sequence
8488 * sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch9.adb: New calling
8489 sequence for Analyze_Aspect_Specifications
8490 * sem_prag.adb (Analyze_Pragma): Remove use of Aspect_Cancel entirely
8491 * sinfo.ads, sinfo.adb (Aspect_Cancel): Remove, no longer used
8492
84932011-08-02 Robert Dewar <dewar@adacore.com>
8494
8495 * freeze.adb (Freeze_Entity): Remove handling of delayed boolean
8496 aspects, since these no longer exist.
8497
84982011-08-02 Robert Dewar <dewar@adacore.com>
8499
8500 * par-ch13.adb (Aspect_Specifications_Present): Always return false on
8501 semicolon, do not try to see if there are aspects following it.
8502 * par-ch3.adb (P_Declarative_Items): Better message for unexpected
8503 aspect spec.
8504
8830d1d2
AC
85052011-08-02 Robert Dewar <dewar@adacore.com>
8506
8507 * sem_ch8.adb, aspects.ads: Minor reformatting.
8508
85092011-08-02 Eric Botcazou <ebotcazou@adacore.com>
8510
8511 * sem_ch13.ads (Analyze_Aspect_Specification): Add pragma Inline.
8512 * sem_ch13.adb (Analyze_Non_Null_Aspect_Specifications): New procedure
8513 extracted from...
8514 (Analyze_Aspect_Specifications): ...here. Call above procedure.
8515
7ff2d234
AC
85162011-08-02 Yannick Moy <moy@adacore.com>
8517
8518 * exp_ch6.adb (Expand_N_Subprogram_Declaration): issue error in formal
8519 mode on subprogram declaration outside of package specification, unless
8520 it is followed by a pragma Import
8521 * sem_ch3.adb (Access_Definition, Access_Subprogram_Declaration,
8522 Access_Type_Declaration): issue error in formal mode on access type
8523 (Analyze_Incomplete_Type_Decl): issue error in formal mode on
8524 incomplete type
8525 (Analyze_Object_Declaration): issue error in formal mode on object
8526 declaration which does not respect SPARK restrictions
8527 (Analyze_Subtype_Declaration): issue error in formal mode on subtype
8528 declaration which does not respect SPARK restrictions
8529 (Constrain_Decimal, Constrain_Float, Constrain_Ordinary_Fixed): issue
8530 error in formal mode on digits or delta constraint
8531 (Decimal_Fixed_Point_Type_Declaration): issue error in formal mode on
8532 decimal fixed point type
8533 (Derived_Type_Declaration): issue error in formal mode on derived type
8534 other than type extensions of tagged record types
8535 * sem_ch6.adb (Process_Formals): remove check in formal mode, redundant
8536 with check on access definition
8537 * sem_ch9.adb (Analyze_Protected_Definition): issue error in formal
8538 mode on protected definition.
8539 (Analyze_Task_Definition): issue error in formal mode on task definition
8540
85412011-08-02 Robert Dewar <dewar@adacore.com>
8542
8543 * make.adb, sem_ch8.adb, s-inmaop-vxworks.adb: Minor reformatting.
8544
806f6d37
AC
85452011-08-02 Javier Miranda <miranda@adacore.com>
8546
8547 * sem_ch6.adb (Can_Override_Operator): New function.
8548 (Verify_Overriding_Indicator): Add missing code to check overriding
8549 indicator in operators. Fixes regression.
8550 (Check_Overriding_Indicator): Minor reformating after replacing the
8551 code that evaluates if the subprogram can override an operator by
8552 invocations to the above new function.
8553 * einfo.adb
8554 (Write_Field26_Name): Add missing code to ensure that, following
8555 the documentation in einfo.ads, this field is not shown as attribute
8556 "Static_Initialization" on non-dispatching functions.
8557
85582011-08-02 Jose Ruiz <ruiz@adacore.com>
8559
8560 * sem_res.adb (Resolve_Call): A call to
8561 Ada.Real_Time.Timing_Events.Set_Handler violates restriction
8562 No_Relative_Delay (AI-0211) only when it sets a relative timing event,
8563 i.e., when the second parameter is of type Time_Span.
8564
85652011-08-02 Vincent Celier <celier@adacore.com>
8566
8567 * make.adb (Gnatmake): use <library dir>/lib<library name>.a to link
8568 with an archive instead of -L<library dir> -l<library name>.
8569
85702011-08-02 Ed Schonberg <schonberg@adacore.com>
8571
8572 * sem_ch8.adb (Analyze_Use_Type): If the clause is being re-analyzed,
8573 mark the base types In_Use in addition to making the operations
8574 use_visible.
8575
85762011-08-02 Ed Falis <falis@adacore.com>
8577
8578 * init.c: add and setup __gnat_signal_mask for the exception signals
8579 * s-inmaop-vxworks.adb: new file.
8580 * s-intman-vxworks.adb: remove unnecessary initializations and
8581 simplify remaining
8582 * s-intman-vxworks.ads: remove unnecessary variable
8583 * s-taprop-vxworks.adb: simplify signal initialization
8584
780d052e
RD
85852011-08-02 Robert Dewar <dewar@adacore.com>
8586
8587 * sem_ch8.adb: Minor code reorganization, comment updates.
8588
85892011-08-02 Robert Dewar <dewar@adacore.com>
8590
8591 * sem_res.adb (Matching_Static_Array_Bounds): Moved to Sem_Util
8592 * sem_util.ads, sem_util.adb (Matching_Static_Array_Bounds): Moved
8593 here from Sem_Res.
8594 (Matching_Static_Array_Bounds): Use Is_Ok_Static_Expression
8595 (Matching_Static_Array_Bounds): Moved here from Sem_Res
8596
29efbb8c
ES
85972011-08-02 Ed Schonberg <schonberg@adacore.com>
8598
8599 * atree.h, atree.ads, atree.adb: New subprograms to manipulate Elist5.
8600 * par_ch8.adb (P_Use_Type): initialize Used_Operations for node.
8601 * sinfo.ads, sinfo.adb (Used_Operations): new attribute of
8602 use_type_clauses, to handle more efficiently use_type and use_all_type
8603 constructs.
8604 * sem_ch8.adb: Rewrite Use_One_Type and End_Use_Type to handle the
8605 Ada2012 Use_All_Type clause.
8606 (Use_Class_Wide_Operations): new procedure.
8607
b0186f71
AC
86082011-08-02 Robert Dewar <dewar@adacore.com>
8609
8610 * exp_util.adb, par-ch10.adb, par-ch6.adb, sem.adb, sem_ch6.adb,
8611 sem_ch6.ads, sinfo.adb, sinfo.ads, sprint.adb: Change parameterized
8612 expression to expression function.
8613
86142011-08-02 Ed Schonberg <schonberg@adacore.com>
8615
8616 * sem_ch4.adb: transform simple Ada2012 membership into equality only
8617 if types are compatible.
8618
86192011-08-02 Yannick Moy <moy@adacore.com>
8620
8621 * sem_res.adb (Matching_Static_Array_Bounds): new function which
8622 returns True if its argument array types have same dimension and same
8623 static bounds at each index.
8624 (Resolve_Actuals): issue an error in formal mode on actuals passed as
8625 OUT or IN OUT paramaters which are not view conversions in SPARK.
8626 (Resolve_Arithmetic_Op): issue an error in formal mode on
8627 multiplication or division with operands of fixed point types which are
8628 not qualified or explicitly converted.
8629 (Resolve_Comparison_Op): issue an error in formal mode on comparisons of
8630 Boolean or array type (except String) operands.
8631 (Resolve_Equality_Op): issue an error in formal mode on equality
8632 operators for array types other than String with non-matching static
8633 bounds.
8634 (Resolve_Logical_Op): issue an error in formal mode on logical operators
8635 for array types with non-matching static bounds. Factorize the code in
8636 Matching_Static_Array_Bounds.
8637 (Resolve_Qualified_Expression): issue an error in formal mode on
8638 qualified expressions for array types with non-matching static bounds.
8639 (Resolve_Type_Conversion): issue an error in formal mode on type
8640 conversion for array types with non-matching static bounds
8641
767bb4e8
AC
86422011-08-02 Robert Dewar <dewar@adacore.com>
8643
8644 * par-ch10.adb: Minor code reorganization (use Nkind_In).
8645
86462011-08-02 Ed Schonberg <schonberg@adacore.com>
8647
8648 * par-ch9.adb: save location of entry for proper error message.
8649
4ac2477e
JM
86502011-08-02 Javier Miranda <miranda@adacore.com>
8651
8652 * sem_type.ads, sem_type.adb (Is_Ancestor): Addition of a new formal
8653 (Use_Full_View) which permits this routine to climb through the
8654 ancestors using the full-view of private parents.
8655 * sem_util.adb (Collect_Interfaces_Info, Implements_Interface): Set
8656 Use_Full_View to true in calls to Is_Ancestor.
8657 * sem_disp.adb (Override_Dispatching_Operation): Set Use_Full_View to
8658 true in call to Is_Ancestor.
8659 * exp_ch3.adb (Build_Offset_To_Top_Functions, Initialize_Tag): Set
8660 Use_Full_View to true in call to Is_Ancestor.
8661 * exp_ch7.adb (Controller_Component): Set Use_Full_View to true in
8662 call to Is_Ancestor.
8663 * exp_ch4.adb (Expand_N_Type_Conversion, Tagged_Membership): Set
8664 Use_Full_View to true in calls to Is_Ancestor.
8665 * exp_disp.adb (Expand_Interface_Actuals, Make_Secondary_DT, Make_DT,
8666 Make_Select_Specific_Data_Table, Register_Primitive,
8667 Set_All_DT_Position): Set Use_Full_View to true in calls to Is_Ancestor.
8668 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Set Use_Full_View
8669 to true in call to Is_Ancestor.
8670 * exp_util.adb (Find_Interface_ADT, Find_Interface_Tag): Set
8671 Use_Full_View to true in calls to Is_Ancestor.
8672 * exp_cg.adb
8673 (Write_Call_Info): Set Use_Full_View to true in call to Is_Ancestor.
8674 (Write_Type_Info): Set Use_Full_View to true in call to Is_Ancestor.
8675
9f90d123
AC
86762011-08-02 Robert Dewar <dewar@adacore.com>
8677
8678 * gnat_rm.texi: Minor reformatting.
8679 * sem_prag.adb: Minor reformatting.
8680
86812011-08-02 Tristan Gingold <gingold@adacore.com>
8682
8683 * vms_data.ads: Add VMS qualifier for -gnateP.
8684
86852011-08-02 Robert Dewar <dewar@adacore.com>
8686
8687 * par-ch13.adb (P_Aspect_Specification): New meaning of Decl = Empty
8688 * par-ch7.adb (P_Package): Proper placement of aspects for package
8689 decl/instantiation.
8690 * par-endh.adb (Check_End): Ad Is_Sloc parameter
8691 (End_Statements): Add Is_Sloc parameterr
8692 * par.adb (P_Aspect_Specification): New meaning of Decl = Empty
8693 (Check_End): Ad Is_Sloc parameter
8694 (End_Statements): Add Is_Sloc parameterr
8695
86962011-08-02 Vincent Celier <celier@adacore.com>
8697
8698 * ug_words: Add VMS qualifier equivalent to -gnateP:
8699 /SYMBOL_PREPROCESSING.
8700
87012011-08-02 Jose Ruiz <ruiz@adacore.com>
8702
8703 * gnat-style.texi: For hexadecimal numeric literals the typical
8704 grouping of digits is 4 to represent 2 bytes.
8705 A procedure spec which is split into several lines is indented two
8706 characters.
8707
87082011-08-02 Yannick Moy <moy@adacore.com>
8709
8710 * exp_aggr.adb (Is_Others_Aggregate): move function to other unit.
8711 * sem_aggr.adb, sem_aggr.ads (Is_Others_Aggregate): move function here
8712 (Resolve_Aggregate): issue errors in formal modes when aggregate is not
8713 properly qualified
8714 (Resolve_Array_Aggregate): issue errors in formal modes on non-static
8715 choice in array aggregate
8716 (Resolve_Extension_Aggregate): issue errors in formal modes on subtype
8717 mark as ancestor
8718 (Resolve_Record_Aggregate): issue errors in formal modes on mixed
8719 positional and named aggregate for record, or others in record
8720 aggregate, or multiple choice in record aggregate
8721 * sem_res.adb (Resolve_Logical_Op): issue errors in formal mode when
8722 array operands to logical operations AND, OR and XOR do not have the
8723 same static lower and higher bounds
8724 * sem_ch5.adb, sinfo.ads: Correct typos in comments
8725
2933b16c
RD
87262011-08-01 Robert Dewar <dewar@adacore.com>
8727
8728 * sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
8729 Replaces Last_Source_Node_In_Sequence.
8730 * err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
8731 * errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
8732 parens and blank in string (this was inconsistently implemented).
8733 * errout.ads
8734 (Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
8735 blank in string (this was inconsistently implemented).
8736 * gnat1drv.adb
8737 (Set_Global_Switches): Set formal mode switches appropriately
8738 * opt.ads, opt.adb: Formal mode is now global switches, more consistent
8739 * par-prag.adb
8740 (Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
8741 call Set_Error_Msg_Lang to set "spark" as language name.
8742 * par.adb: Remove unnecessary call to set formal language for errout
8743 * sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
8744 appropriately and call Set_Error_Msg_Lang to set "spark" as language
8745 name.
8746 * sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
8747 calls to it, moved after resolution so that types are known
8748 * sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
8749 result of concatenation is not of type String
8750 (Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
8751 concatenation is not properly restricted
8752 * gnat_rm.texi: Add doc on pragma Spark_95.
8753 * gcc-interface/Makefile.in: Remove obsolete target pairs for
8754 Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
8755 * gcc-interface/Make-lang.in: Update dependencies.
8756
05dbd302
AC
87572011-08-01 Javier Miranda <miranda@adacore.com>
8758
8759 * sem_disp.adb (Override_Dispatching_Operation): Enforce strictness of
8760 condition that detects if the overridden operation must replace an
8761 existing entity.
8762
87632011-08-01 Javier Miranda <miranda@adacore.com>
8764
8765 * exp_ch4.adb (Expand_N_Case_Expression): Propagate to the expanded
8766 code declarations inserted by Insert_Actions in each alternative of the
8767 N_Case_Expression node.
8768
87692011-08-01 Robert Dewar <dewar@adacore.com>
8770
8771 * sem_ch6.adb: Minor code reorganization.
8772 * sem_util.adb: Minor reformatting.
8773
af9e051f
PO
87742011-08-01 Pascal Obry <obry@adacore.com>
8775
8776 * prj-env.adb: Remove <prefix>/lib/gpr/<target> project search path.
8777 * gnat_ugn.texi: Add documentation for VERSIONINFO Windows resource.
8778
1d801f21
AC
87792011-08-01 Yannick Moy <moy@adacore.com>
8780
8781 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode on character
8782 literal or operator symbol which is prefixed
8783 * sem_attr.adb (Analyze_Access_Attribute): issue an error in formal
8784 mode on access attributes.
8785 * sem_ch4.adb (Analyze_Concatenation_Operand): new procedure to check
8786 that concatenation operands are properly restricted in formal mode
8787 (Analyze_Concatenation, Analyze_Concatenation_Rest): call new procedure
8788 Analyze_Concatenation_Operand. Issue an error in formal mode if the
8789 result of the concatenation has a type different from String.
8790 (Analyze_Conditional_Expression, Analyze_Explicit_Dereference,
8791 Analyze_Quantified_Expression, Analyze_Slice,
8792 Analyze_Null): issue an error in formal mode on unsupported constructs
8793 * sem_ch5.adb
8794 (Analyze_Block_Statement): only issue error on source block statement
8795 * sem_util.ads, sem_util.adb (Last_Source_Node_In_Sequence): new
8796 function which returns the last node in a list of nodes for which
8797 Comes_From_Source returns True, if any
8798 * sem_ch6.adb (Check_Missing_Return): minor refactoring to use
8799 Last_Source_Node_In_Sequence
8800 * sem_ch8.adb (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
8801 Analyze_Object_Renaming, Analyze_Use_Package): issue an error in formal
8802 mode on unsupported constructs
8803 * sem_ch9.adb Do not return after issuing error in formal mode, as the
8804 rest of the actions may be needed later on since the error is marked as
8805 not serious.
8806 * sinfo.ads: Typos in comments.
8807
88082011-08-01 Pascal Obry <obry@adacore.com>
8809
8810 * projects.texi: Minor editing.
8811
53beff22
YM
88122011-08-01 Yannick Moy <moy@adacore.com>
8813
8814 * err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
8815 insertion character ~~
8816 * errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
8817 (Set_Error_Msg_Lang): new procedure which fixes the language for use
8818 with insertion character ~~
8819 (Set_Msg_Text): treat insertion character ~~
8820 * par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
8821 sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
8822 Formal_Error_Msg_... procedures by equivalent Error_Msg_...
8823 procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
8824 errors related to the formal language restriction not serious
8825 (insertion character |).
8826 * par.adb (Par): set formal language for error messages if needed
8827 * sem_ch6.adb (Check_Missing_Return): take into account possible
8828 generated statements at the end of the function
8829 * snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
8830 enumeration value to define a new pragma SPARK_95
8831 * opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
8832 SPARK_Version): new type and variables to store the SPARK version
8833 (none by default).
8834 (SPARK_Mode): return True when SPARK_Version is set
8835 * par-prag.adb: Correct indentation
8836 (Prag): take Pragma_SPARK_95 into account
8837 * sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
8838 into account.
8839
8d606a78
RD
88402011-08-01 Robert Dewar <dewar@adacore.com>
8841
8842 * sem_ch3.adb, sem_ch3.ads, sem_ch5.adb, prj-part.adb, par-ch4.adb,
8843 sem_util.adb, sem_ch4.adb, sem_ch6.adb, sem_ch6.ads, sem_ch8.adb,
8844 sem_ch8.ads, sem_ch13.ads, par-ch5.adb, prj-env.ads: Minor reformatting
8845
1982d5a8
PO
88462011-08-01 Pascal Obry <obry@adacore.com>
8847
8848 * prj-part.ads, prj-part.adb (Parse): Add Target_Name parameter. Pass
8849 Target_Name to Get_Path call.
8850 (Parse_Single_Project): Likewise.
8851 (Post_Parse_Context_Clause): Likewise.
8852 * prj-env.ads, prj-env.adb (Find_Project): Add Target_Name parameter.
8853 Call Initialise_Project_Path with the proper Target_Name.
8854 (Initialize_Project_Path): Add <gnat_root>/<target_name>/lib/gnat
8855 search path.
8856 (Get_Path): Add Target_Name parameter. Call Initialise_Project_Path
8857 with the proper Target_Name.
8858 * prj-conf.adb (Get_Or_Create_Configuration_File): Pass Target_Name to
8859 Part.Parse routine.
8860 (Parse_Project_And_Apply_Config): Likewise.
8861 * prj-makr.adb (Initialize): Pass empty Target_Name to Parse routine.
8862 This is fine as this part of the code is supporting only native
8863 compilation.
8864 * prj-pars.adb (Parse): Pass empty Target_Name to Parse routine. This
8865 is fine as this part of the code is supporting only native compilation.
8866
0d53d36b
AC
88672011-08-01 Yannick Moy <moy@adacore.com>
8868
8869 * sem_util.adb (Enter_Name): issue error in formal mode on declaration
8870 of homonym, unless the homonym is one of the cases allowed in SPARK
8871 * par-ch5.adb (Parse_Decls_Begin_End): issue error in SPARK mode for
8872 package declaration occurring after a body.
8873
88742011-08-01 Robert Dewar <dewar@adacore.com>
8875
8876 * checks.adb, exp_ch4.adb: Minor reformatting.
8877
88782011-08-01 Javier Miranda <miranda@adacore.com>
8879
8880 * einfo.ads (Access_Disp_Table): Fix documentation.
8881 (Dispatch_Table_Wrappers): Fix documentation.
8882
88832011-08-01 Pascal Obry <obry@adacore.com>
8884
8885 * prj-env.adb, prj-env.ads: Minor reformatting.
8886
8ed68165
AC
88872011-08-01 Yannick Moy <moy@adacore.com>
8888
8889 * sem_util.ads, sem_util.adb, par.adb, par_util.adb
8890 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8891 procedures out of these packages.
2c7f9cc0 8892 * errout.ads, errout.adb
8ed68165
AC
8893 (Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
8894 procedures in of this package
8895 (Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
8896 * par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
8897 on misplaced later vs initial declarations, like in Ada 83
8898 * sem_attr.adb (Processing for Analyze_Attribute): issue error in
8899 formal mode on attribute of private type whose full type declaration
8900 is not visible
8901 * sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
8902 package declaration inside a package specification
8903 (Analyze_Full_Type_Declaration): issue error in formal mode on
8904 controlled type or discriminant type
8905 * sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
8906 user-defined operator means that it should come from the source
8907 (New_Overloaded_Entity): issue error in formal mode on overloaded
8908 entity.
8909 * sem_ch6.ads, sem_ch13.ads: typos in comments.
8910
89112011-08-01 Thomas Quinot <quinot@adacore.com>
8912
8913 * atree.adb: Minor reformatting.
8914 * checks.adb: Minor reformatting.
8915
4230bdb7
AC
89162011-08-01 Vincent Celier <celier@adacore.com>
8917
8918 * s-parame-vms-ia64.ads: Fix typo in comment
8919 Minor reformatting
8920 * s-parame-vms-restrict.ads: Removed, unused.
8921
89222011-08-01 Javier Miranda <miranda@adacore.com>
8923
8924 * exp_ch3.adb
8925 (Is_Variable_Size_Array): Remove local subprogram Is_Constant_Bound.
8926 * sem_ch3.adb
8927 (Constrain_Index): Remove side effects in the evaluation of the bounds.
8928 * sem_ch3.ads, sem_ch3.adb
8929 (Is_Constant_Bound): New extended version of the subprogram that was
8930 previously located inside function Exp_Ch3.Is_Variable_Size_Array.
8931 Moved here since it is shared by routines of sem_ch3 and exp_ch3.
8932 * sem_aux.ads (Constant_Value): Fix typo in comment.
8933 * checks.adb (Generate_Index_Checks): New implementation which, for
8934 array objects with constant bounds, generates the runtime check
8935 referencing the bounds of the array type. For other cases this routine
8936 provides its previous behavior obtaining such values from the array
8937 object.
8938 * sem_res.adb (Set_Slice_Subtype): Link a copied range subtree with its
8939 parent type.
8940 * atree.adb (New_Copy): Reset flag Is_Overloaded in the new copy since
8941 we cannot have semantic interpretations of the new node.
8942
2010d078
AC
89432011-08-01 Ed Schonberg <schonberg@adacore.com>
8944
8945 * sem_ch6.adb (Fully_Conformant_Expressions): handle quantified
8946 expressions.
8947
89482011-08-01 Arnaud Charlet <charlet@adacore.com>
8949
8950 * sem_ch8.adb: Minor code editing.
8951 * s-vxwext.adb: Remove trailing space.
8952 * freeze.adb, freeze.ads, errout.ads, erroutc.adb: Fix GPLv3 header for
8953 consistency with other files.
8954
89552011-08-01 Thomas Quinot <quinot@adacore.com>
8956
8957 * s-auxdec.ads, s-auxdec-vms_64.ads: Minor reformatting.
8958
89592011-08-01 Ed Schonberg <schonberg@adacore.com>
8960
8961 * par-ch10.adb: reject parameterized expressions as compilation unit.
8962 * sem_ch4.adb: handle properly conditional expression with overloaded
8963 then_clause and no else_clause.
8964
89652011-08-01 Tristan Gingold <gingold@adacore.com>
8966
8967 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads: Redeclare C_Address
8968 like done by System.Aux_DEC.
8969 * env.c (__gnat_setenv) [VMS]: Put logicals into LNM$PROCESS table.
8970
daec8eeb
YM
89712011-08-01 Yannick Moy <moy@adacore.com>
8972
8973 * par-endh.adb (Check_End): issue a syntax error in SPARK mode for
8974 missing label at end of declaration (subprogram or package)
8975 * par-ch4.adb (P_Name): issue a syntax error in SPARK mode for mixing
8976 of positional and named parameter association
8977 * par.adb, par-util.adb (Formal_Error_Msg_SP): new wrapper on
8978 Error_Msg_SP which adds a prefix to the error message giving the name
8979 of the formal language analyzed
8980 * sem_ch6.adb (Analyze_Return_Type): issue an error in formal mode for
8981 access result type in subprogram, unconstrained array as result type,.
8982 (Analyze_Subprogram_Declaration): issue an error in formal mode for null
8983 procedure
8984 * sem_ch8.adb: Code clean up.
8985
38171f43
AC
89862011-08-01 Javier Miranda <miranda@adacore.com>
8987
8988 * sem_ch7.adb (Uninstall_Declarations): Remove useless code.
8989 * einfo.ads (Access_Disp_Table): Fix documentation.
8990 (Dispatch_Table_Wrappers): Fix documentation.
8991 * einfo.adb (Access_Disp_Table, Dispatch_Table_Wrappers,
8992 Set_Access_Disp_Table, Set_Dispatch_Table_Wrappers): Fix the assertions
8993 to enforce the documentation of this attribute.
8994 (Set_Is_Interface): Cleanup the assertion.
8995 * exp_ch4.adb (Expand_Allocator_Expression, Tagged_Membership): Locate
8996 the Underlying_Type entity before reading attribute Access_Disp_Table.
8997 * exp_disp.adb (Expand_Dispatching_Call, Expand_Interface_Conversion):
8998 Locate the Underlying_Type before reading attribute Access_Disp_Table.
8999 * exp_aggr.adb (Build_Array_Aggr_Code, Build_Record_Aggr_Code): Locate
9000 the Underlying_Type entity before reading attribute Access_Disp_Table.
9001 * exp_ch3.adb (Build_Record_Init_Proc, Expand_N_Object_Declaration):
9002 Locate the Underlying_Type entity before reading attribute
9003 Access_Disp_Table.
9004
90052011-08-01 Ed Schonberg <schonberg@adacore.com>
9006
9007 * s-poosiz.ads: Additional overriding indicators.
9008
90092011-08-01 Yannick Moy <moy@adacore.com>
9010
9011 * sem_ch5.adb (Analyze_Exit_Statement): add return after error in
9012 formal mode.
9013 (Analyze_Iteration_Scheme): issue error in formal mode when loop
9014 parameter specification does not include a subtype mark.
9015 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): issue error in
9016 formal mode on abstract subprogram.
9017 (Analyze_Subprogram_Specification): issue error in formal mode on
9018 user-defined operator.
9019 (Process_Formals): issue error in formal mode on access parameter and
9020 default expression.
9021 * sem_ch9.adb (Analyze_Abort_Statement,
9022 Analyze_Accept_Statement, Analyze_Asynchronous_Select,
9023 Analyze_Conditional_Entry_Call, Analyze_Delay_Relative,
9024 Analyze_Delay_Until, Analyze_Entry_Call_Alternative,
9025 Analyze_Requeue, Analyze_Selective_Accept,
9026 Analyze_Timed_Entry_Call): issue error in formal mode on such constructs
9027 * sem_ch11.adb (Analyze_Raise_Statement, Analyze_Raise_xxx_Error):
9028 issue error in formal mode on user-defined raise statement.
9029
1f250383
AC
90302011-08-01 Thomas Quinot <quinot@adacore.com>
9031
9032 * sem_ch6.adb (Enter_Overloaded_Entity): Do not warn about a
9033 declaration being hidden when overriding an implicit inherited
9034 subprogram.
9035 * par-ch10.adb (P_Compilation_Unit): In syntax check only mode
9036 (-gnats), do not complain about a source file that contains only a
9037 pragma No_Body.
9038
90392011-08-01 Ed Schonberg <schonberg@adacore.com>
9040
9041 * sem_ch5.adb (Analyze_Iterator_Scheme): Do not overwrite type of loop
9042 variable if already set.
9043
607d0635
AC
90442011-08-01 Arnaud Charlet <charlet@adacore.com>
9045
9046 * g-socket-dummy.adb, s-osinte-linux.ads, g-socket-dummy.ads,
9047 g-debuti.adb, g-tasloc.adb, g-debuti.ads, g-tasloc.ads,
9048 s-osinte-hpux.ads, g-sercom.adb, g-soliop-solaris.ads, g-sercom.ads,
9049 g-sptain.ads, g-curexc.ads, s-tasloc.adb, s-tasloc.ads, s-tataat.adb,
9050 g-ctrl_c.adb, a-reatim.adb, s-tataat.ads, g-dirope.adb, g-ctrl_c.ads,
9051 g-dirope.ads, g-boubuf.adb, g-calend.adb, g-boubuf.ads, g-souinf.ads,
9052 g-table.adb, g-bytswa-x86.adb, g-wispch.adb, g-io.adb, g-table.ads,
9053 g-wispch.ads, g-io.ads, g-memdum.adb, g-memdum.ads, g-busorg.adb,
9054 g-busorg.ads, g-regpat.adb, g-sothco-dummy.adb, g-encstr.adb,
9055 g-regpat.ads, g-sothco-dummy.ads, s-osinte-aix.ads, g-encstr.ads,
9056 g-sercom-mingw.adb, s-mastop-vms.adb, g-diopit.adb, g-diopit.ads,
9057 s-vxwext.adb, g-dyntab.adb, g-dyntab.ads, g-crc32.adb,
9058 g-sercom-linux.adb, g-crc32.ads, s-regpat.adb, g-flocon.ads,
9059 s-regpat.ads, g-stheme.adb, g-sestin.ads, s-taspri-posix-noaltstack.ads,
9060 g-soliop.ads, s-inmaop-posix.adb, g-locfil.ads, g-enblsp-vms-alpha.adb,
9061 g-socthi-dummy.adb, g-socthi-dummy.ads, gnat.ads, g-moreex.adb,
9062 g-moreex.ads, g-dynhta.adb, g-dynhta.ads, g-deutst.ads, g-htable.adb,
9063 g-cgicoo.adb, g-htable.ads, g-cgicoo.ads, a-interr.adb,
9064 g-socthi-vms.adb, g-socthi-vms.ads, g-hesora.adb, g-bubsor.adb,
9065 g-hesora.ads, g-bubsor.ads, g-md5.adb, g-md5.ads, s-intman-irix.adb,
9066 s-htable.adb, s-osinte-vms.adb, s-htable.ads, s-osinte-vms.ads,
9067 s-taprob.adb, g-bytswa.adb, g-bytswa.ads, s-osinte-solaris-posix.ads,
9068 a-suenco.adb, g-comver.adb, g-comver.ads, g-exctra.adb,
9069 s-osinte-solaris.adb, g-exctra.ads, s-osinte-irix.ads,
9070 s-osinte-solaris.ads, a-caldel-vms.adb, g-socthi-vxworks.adb,
9071 g-expect.adb, g-socthi-vxworks.ads, g-expect.ads, g-comlin.ads,
9072 g-heasor.adb, g-heasor.ads, g-traceb.adb, g-traceb.ads, g-decstr.adb,
9073 g-spipat.adb, g-decstr.ads, g-spipat.ads, s-mastop-tru64.adb,
9074 g-except.ads, g-thread.adb, g-hesorg.adb, g-thread.ads, g-hesorg.ads,
9075 g-expect-vms.adb, a-stuten.ads, g-spchge.adb, g-spchge.ads,
9076 g-u3spch.adb, g-u3spch.ads, g-spitbo.adb, g-spitbo.ads,
9077 s-osinte-dummy.ads, s-osinte-posix.adb, g-pehage.adb, g-pehage.ads,
9078 s-gloloc-mingw.adb, g-sha1.ads, s-traceb-hpux.adb,
9079 g-trasym-unimplemented.adb, g-trasym-unimplemented.ads, g-io_aux.adb,
9080 g-regexp.adb, g-io_aux.ads, g-socthi-mingw.adb, g-regexp.ads,
9081 s-osinte-hpux-dce.adb, g-socthi-mingw.ads, g-cgi.adb,
9082 s-osinte-hpux-dce.ads, g-cgi.ads, g-byorma.adb, g-boumai.ads,
9083 g-byorma.ads, a-caldel.adb, s-regexp.adb, s-regexp.ads,
9084 g-soliop-mingw.ads, g-sptavs.ads, s-osinte-tru64.ads, g-speche.adb,
9085 g-speche.ads, g-socthi.adb, g-stsifd-sockets.adb, g-socthi.ads,
9086 s-osinte-darwin.ads, i-vxwork-x86.ads, g-awk.adb, i-vxwork.ads,
9087 g-awk.ads, g-zspche.adb, g-zspche.ads, g-socket.adb, g-sptabo.ads,
9088 g-socket.ads, g-semaph.adb, g-semaph.ads, s-taspri-posix.ads,
9089 g-enblsp-vms-ia64.adb, g-cgideb.adb, g-cgideb.ads, g-sothco.adb,
9090 s-osinte-freebsd.ads, g-sothco.ads, g-catiio.adb, g-casuti.adb,
9091 g-catiio.ads, g-casuti.ads, g-trasym.adb, g-trasym.ads, s-casuti.adb,
9092 g-os_lib.adb, s-traceb-mastop.adb, g-busora.adb, s-interr-dummy.adb,
9093 g-busora.ads, g-enutst.ads, s-os_lib.adb, a-tasatt.adb,
9094 s-osinte-mingw.ads: Update to GPLv3 run-time license.
9095 Use GNAT instead of GNARL.
9096
90972011-08-01 Bob Duff <duff@adacore.com>
9098
9099 * a-cdlili.ads, a-cihama.ads, a-coinve.ads, a-ciorse.ads, a-coorma.ads,
9100 a-cidlli.ads, a-ciormu.ads, a-cihase.ads, a-cohama.ads, a-coorse.ads,
9101 a-ciorma.ads, a-coormu.ads, a-convec.ads, a-cohase.ads: Minor
9102 reformatting.
9103
91042011-08-01 Yannick Moy <moy@adacore.com>
9105
9106 * debug.adb (d.D) reverve flag for the SPARK mode
9107 (d.E) reverve flag for SPARK generation mode
9108 (d.F) reverve flag for Why generation mode
2c7f9cc0 9109 * opt.ads, opt.adb (ALFA_Mode, ALFA_Through_SPARK_Mode,
607d0635
AC
9110 ALFA_Through_Why_Mode, Formal_Verification_Mode, SPARK_Mode): New
9111 functions which return True when the corresponding modes are set
9112 (Formal_Language): return "spark" or "alfa" when in formal verification
9113 mode.
9114 * sem_util.ads, sem_util.adb (Formal_Error_Msg): new wrapper on
9115 Error_Msg to prefix the error message with a tag giving the formal
9116 language
9117 (Formal_Error_Msg_N): new wrapper on Error_Msg_N to prefix the error
9118 message with a tag giving the formal language
9119 * sem_ch5.adb (Analyze_Block_Statement): issue error in formal mode on
9120 block statement
9121 (Analyze_Case_Statement): issue error in formal mode on case statement
9122 with a single "others" case alternative
9123 (Analyze_Exit_Statement): issue errors in formal mode on exit
9124 statements which do not respect SPARK restrictions
9125 (Analyze_Goto_Statement): issue error in formal mode on goto statement
9126 (Check_Unreachable_Code): always issue an error (not a warning) in
9127 formal mode on unreachable code (concerns both code after an infinite
9128 loop and after an unconditional jump, both not allowed in SPARK)
9129 * sem_ch6.adb (Analyze_Return_Statement): add call to
9130 Set_Return_Present for a procedure containing a return statement
9131 (already done for functions in Analyze_Function_Return)
9132 (Analyze_Function_Return): issue error in formal mode on extended
9133 return or if return is not last statement in function
9134 (Check_Missing_Return): issue error in formal mode if function does
9135 not end with return or if procedure contains a return
9136 * sem_ch8.ads, sem_ch8.adb (Has_Loop_In_Inner_Open_Scopes): new
9137 function to detect if there is an inner scope of its parameter S which
9138 is a loop.
9139
91402011-08-01 Thomas Quinot <quinot@adacore.com>
9141
9142 * sem_ch6.ads: Minor reformatting.
9143
d8b3ccb9
AC
91442011-08-01 Javier Miranda <miranda@adacore.com>
9145
9146 * sem_util.adb (Abstract_Interface_List): Complete condition when
9147 processing private type declarations to avoid reading unavailable
9148 attribute.
9149 (Is_Synchronized_Tagged_Type): Complete condition when processing
9150 private extension declaration nodes to avoid reading unavailable
9151 attribute.
9152
91532011-08-01 Thomas Quinot <quinot@adacore.com>
9154
9155 * sem_ch3.adb: Minor reformatting.
9156
91572011-08-01 Thomas Quinot <quinot@adacore.com>
9158
9159 * s-parame-ae653.ads, s-parame-vms-alpha.ads, s-parame-hpux.ads,
9160 i-cpoint.adb, i-cstrin.adb, i-cpoint.ads, i-cstrin.ads,
9161 s-parame-vms-ia64.ads, s-parame.ads, i-c.ads, s-parame-vxworks.ads,
9162 s-parame-vms-restrict.ads: Remove duplicated Interfaces.C.* packages
9163 for VMS, instead parametrize the common implementation with
9164 System.Parameters declarations.
9165
0bb9276c
AC
91662011-08-01 Eric Botcazou <ebotcazou@adacore.com>
9167
9168 * gnat_rm.texi: Document limitation of Pragma No_Strict_Aliasing.
9169
91702011-08-01 Tristan Gingold <gingold@adacore.com>
9171
9172 * seh_init.c: Fix SEH handler installation on win64.
9173
91742011-08-01 Ed Schonberg <schonberg@adacore.com>
9175
9176 * sem_ch3.adb (Access_Subprogram_Declaration): in Asis mode, prevent
9177 double analysis of an anonymous access to subprogram, because it can
9178 lead to improper sharing of profiles and a back-end crash.
9179
6a2e4f0b
AC
91802011-08-01 Robert Dewar <dewar@adacore.com>
9181
9182 * make.adb, sem_ch4.adb: Minor reformatting.
9183 * gcc-interface/Make-lang.in: Update dependencies.
9184 * sem_util.adb, exp_ch5.adb: Minor reformatting.
9185
91862011-08-01 Arnaud Charlet <charlet@adacore.com>
9187
9188 * gnat_rm.texi: Fix definition of Long_Integer.
9189
91902011-08-01 Ed Schonberg <schonberg@adacore.com>
9191
9192 * exp_aggr.adb: check limit size of static aggregate unconditionally,
9193 to prevent storage exhaustion.
9194 * exp_ch7.adb (Clean_Simple_Protected_Objects): if the scope being
9195 finalized is a function body, insert the cleanup code before the final
9196 return statement, to prevent spurious warnings.
9197 * s-pooglo.ads: add overriding indicator.
9198
4561baf7
ES
91992011-08-01 Ed Schonberg <schonberg@adacore.com>
9200
9201 * sem_ch4.adb (Operator_Check): improve error message when both a
9202 with_clause and a use_clause are needed to make operator usage legal.
9203 * sem_util.ads, sem_util.adb (Unit_Is_Visible): new predicate to
9204 determine whether a compilation unit is visible within an other,
9205 either through a with_clause in the current unit, or a with_clause in
9206 its library unit or one one of its parents.
9207
383e179e
AC
92082011-08-01 Ed Schonberg <schonberg@adacore.com>
9209
9210 * exp_ch5.adb (Expand_N_Iterator_Loop): handle properly an iterator
9211 over an arbitrary expression of an array or container type.
9212 * lib-xref.adb: clarify comment.
9213
92142011-08-01 Bob Duff <duff@adacore.com>
9215
9216 * einfo.ads: Minor reformatting.
9217 * debug.adb: Minor comment improvement.
9218
92192011-08-01 Javier Miranda <miranda@adacore.com>
9220
9221 * sem_ch4.adb (Try_Object_Operation): For class-wide subprograms do not
9222 consider hidden subprograms as valid candidates.
9223
92242011-08-01 Arnaud Charlet <charlet@adacore.com>
9225
9226 * make.adb (Compile): Strip -mxxx switches in CodePeer mode.
9227
92282011-08-01 Vasiliy Fofanov <fofanov@adacore.com>
9229
9230 * gnat_ugn.texi: Fix typo.
9231
61c161b2
AC
92322011-08-01 Robert Dewar <dewar@adacore.com>
9233
9234 * i-cstrin.adb, sem_util.adb, exp_ch11.adb, sem_ch8.adb,
9235 lib-xref.adb: Minor reformatting
9236
92372011-08-01 Gary Dismukes <dismukes@adacore.com>
9238
9239 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Replace test of
9240 when to generate a call to Move_Final_List.
9241 (Has_Controlled_Parts): Remove this function.
9242
84df40f7
AC
92432011-08-01 Geert Bosch <bosch@adacore.com>
9244
9245 * par-ch3.adb (P_Discrete_Choice_List): Improve error message for extra
9246 "," in choice list.
9247
92482011-08-01 Thomas Quinot <quinot@adacore.com>
9249
9250 * exp_ch11.adb (Expand_N_Raise_Statement): Mark N_Raise_xxx_Error for
9251 explicit raise of a predefined exception as Comes_From_Source if the
9252 original N_Raise_Statement comes from source.
9253
92542011-08-01 Robert Dewar <dewar@adacore.com>
9255
9256 * sinfo.ads: Add comment.
9257 * sem_ch6.adb: Minor reformatting.
9258
92592011-08-01 Robert Dewar <dewar@adacore.com>
9260
9261 * freeze.adb (Freeze_Entity): Refine check for bad component size
9262 clause to avoid rejecting confirming clause when atomic/aliased present.
9263
92642011-08-01 Ed Schonberg <schonberg@adacore.com>
9265
9266 * sem_ch8.adb (Find_Direct_Name, Analyze_Expanded_Name): use Is_LHS to
9267 better determine whether an entity reference is a write.
9268 * sem_util.adb (Is_LHS): refine predicate to handle assignment to a
9269 subcomponent.
9270 * lib-xref.adb (Output_References): Do no suppress a read reference at
9271 the same location as an immediately preceeding modify-reference, to
9272 handle properly in-out actuals.
9273
92742011-08-01 Tristan Gingold <gingold@adacore.com>
9275
9276 * env.c (__gnat_setenv) [VMS]: Refine previous change.
9277
92782011-08-01 Quentin Ochem <ochem@adacore.com>
9279
9280 * i-cstrin.adb (New_String): Changed implementation, now uses only the
9281 heap to compute the result.
9282
c7f0d2c0
AC
92832011-08-01 Robert Dewar <dewar@adacore.com>
9284
9285 * atree.ads: Minor reformatting.
9286
92872011-08-01 Emmanuel Briot <briot@adacore.com>
9288
9289 * g-expect.adb (Get_Command_Output): Fix memory leak.
9290
92912011-08-01 Geert Bosch <bosch@adacore.com>
9292
9293 * cstand.adb (P_Float_Type): New procedure to print the definition of
9294 predefined fpt types.
9295 (P_Mixed_Name): New procedure to print a name using mixed case
9296 (Print_Standard): Use P_Float_Type for printing floating point types
9297 * einfo.adb (Machine_Emax_Value): Add preliminary support for quad
9298 precision IEEE float.
9299
93002011-08-01 Thomas Quinot <quinot@adacore.com>
9301
9302 * sem_ch3.adb: Minor reformatting.
9303
93042011-08-01 Ed Schonberg <schonberg@adacore.com>
9305
9306 * sem_ch6.adb (Analyze_Parameterized_Expression): If the expression is
9307 the completion of a generic function, insert the new body rather than
9308 rewriting the original.
9309
93102011-08-01 Yannick Moy <moy@adacore.com>
9311
9312 * sinfo.ads, errout.ads: Typos in comments.
9313
1c54829e
AC
93142011-08-01 Robert Dewar <dewar@adacore.com>
9315
9316 * par-endh.adb: Minor reformatting.
9317
93182011-08-01 Robert Dewar <dewar@adacore.com>
9319
9320 * aspects.ads, aspects.adb: Add aspects for library unit pragmas
9321 (Pre_Post_Aspects): New subtype.
9322 * par-ch12.adb (P_Generic): New syntax for aspects in packages
9323 * par-ch13.adb (P_Aspect_Specifications): Add Semicolon parameter
9324 * par-ch7.adb (P_Package): Remove Decl parameter
9325 (P_Package): Handle new syntax for aspects (before IS)
9326 * par-ch9.adb (P_Protected_Definition): Remove Decl parameter, handle
9327 new aspect syntax
9328 (P_Task_Definition): Remove Decl parameter, handle new aspect syntax
9329 * par.adb (P_Aspect_Specifications): Add Semicolon parameter
9330 (P_Package): Remove Decl parameter
9331 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle library unit
9332 aspects
9333 * sem_ch7.adb (Analyze_Package_Declaration): Analyze new format aspect
9334 specs
9335 * sem_util.ads, sem_util.adb (Static_Boolean): New function
9336 * sinfo.ads: Document new syntax for aspects in packages etc.
9337 * sprint.adb: Handle new syntax of aspects before IS in package
9338
93392011-08-01 Thomas Quinot <quinot@adacore.com>
9340
9341 * atree.ads: Minor reformatting.
9342 * sem_prag.adb: Minor reformatting.
9343
93442011-08-01 Robert Dewar <dewar@adacore.com>
9345
9346 * exp_util.adb (Insert_Actions): Fix error in handling Actions for
9347 case expr alternative.
9348
93492011-08-01 Ed Schonberg <schonberg@adacore.com>
9350
9351 * sem_ch12.adb: Fix typo.
9352
9eea4346
GB
93532011-08-01 Geert Bosch <bosch@adacore.com>
9354
9355 * sem_prag.adb (Check_No_Link_Name): New procedure.
9356 (Process_Import_Or_Interface): Use Check_No_Link_Name.
9357 * cstand.adb (Create_Standard): Use Esize (Standard_Long_Long_Float)
9358 instead of Standard_Long_Long_Float_Size global. Preparation for
9359 eventual removal of per type constants.
9360 * exp_util.ads (Get_Stream_Size): New function returning the stream
9361 size value of subtype E.
9362 * exp_util.adb (Get_Stream_Size): Implement new function.
9363 * exp_strm.adb (Build_Elementary_Input_Call): Use Get_Stream_Size
9364 function.
9365 * exp_attr.adb (Attribute_Stream_Size): Use Get_Stream_Size
9366 * einfo.adb:
9367 (Machine_Mantissa_Value): Handle 128-bit quad precision IEEE floats
9368
3d6c3bd7
GB
93692011-08-01 Geert Bosch <bosch@adacore.com>
9370
9371 * cstand.adb: Fix comments.
9372 * sem_prag.adb (Analyze_Pragma): Use List_Length instead of explicit
9373 count of arguments.
9374
e7d897b8
AC
93752011-08-01 Robert Dewar <dewar@adacore.com>
9376
9377 * exp_ch4.adb, sem_cat.adb: Minor reformatting.
9378
93792011-08-01 Geert Bosch <bosch@adacore.com>
9380
9381 * atree.ads: Fix comment.
9382
c228a069
AC
93832011-08-01 Robert Dewar <dewar@adacore.com>
9384
9385 * aspects.ads, aspects.adb (Aspect_Names): Moved from body to spec.
9386 * par-ch13.adb (P_Aspect_Specifications): Check misspelled aspect name.
9387 * par.adb: Add with for Namet.Sp.
9388 * par-tchk.adb: Minor reformatting.
9389
93902011-08-01 Vincent Celier <celier@adacore.com>
9391
9392 * mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb
9393 (Build_Dynamic_Library): Use new function Init_Proc_Name to get the name
9394 of the init procedure of a SAL.
9395 * mlib-tgt-vms_common.ads, mlib-tgt-vms_common.adb (Init_Proc_Name):
9396 New procedure.
9397
93982011-08-01 Thomas Quinot <quinot@adacore.com>
9399
9400 * exp_ch4.adb, s-tasini.ads, sem_attr.adb, s-soflin.ads: Minor
9401 reformatting.
9402
94032011-08-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9404
9405 * adaint.c (__gnat_file_time_name_attr): Get rid of warning.
9406
94072011-08-01 Thomas Quinot <quinot@adacore.com>
9408
9409 * sem_util.adb, sem_util.ads (Has_Overriding_Initialize): Make function
9410 conformant with its spec (return True only for types that have
9411 an overriding Initialize primitive operation that prevents them from
9412 having preelaborable initialization).
9413 * sem_cat.adb (Validate_Object_Declaration): Fix test for preelaborable
9414 initialization for controlled types in Ada 2005 or later mode.
9415
857ade1b
RD
94162011-08-01 Robert Dewar <dewar@adacore.com>
9417
9418 * aspects.ads, aspects.adb: Add aspect Type_Invariant, Precondition,
9419 Postcondition.
9420 (Same_Aspect): New function.
9421 * sem_ch13.adb (Analyze_Aspect_Specifications): Add aspect
9422 Type_Invariant, Precondition, Postcondition.
9423 * snames.ads-tmpl: Add Name_Type_Invariant.
9424
bd949ee2
RD
94252011-08-01 Robert Dewar <dewar@adacore.com>
9426
9427 * freeze.adb (Freeze_Entity): Don't call Check_Aspect_At_Freeze_Point
9428 here.
9429 (Freeze_All_Ent): Fix error in handling inherited aspects.
9430 * sem_ch13.adb (Analyze_Aspect_Specifications): Skip aspect that is
9431 already analyzed, but don't skip entire processing of a declaration,
9432 that's wrong in some cases of declarations being rewritten.
9433 (Analyze_Aspect_Specification): Set Is_Delayed_Aspect in aspects.
9434 Don't delay for integer, string literals
9435 Treat predicates in usual manner for delay, remove special case code,
9436 not needed.
9437 (Analyze_Freeze_Entity): Make call to Check_Aspect_At_Freeze_Point
9438 (Build_Predicate_Function): Update saved expression in aspect
9439 (Build_Invariant_Procedure): Update saved expression in aspect
9440 * exp_ch4.adb (Expand_N_Selected_Component): Only do the optimization
9441 of replacement of discriminant references if the reference is simple.
9442
f1c952af
RD
94432011-08-01 Robert Dewar <dewar@adacore.com>
9444
9445 * aspects.ads, aspects.adb: Add Static_Predicate and Dynamic_Predicate.
9446 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing for
9447 Static_Predicate and Dynamic_Predicate.
9448 (Build_Predicate_Function): Add processing for Static_Predicate
9449 and Dynamic_Predicate.
9450 * sinfo.ads, sinfo.adb (From_Dynamic_Predicate): New flag
9451 (From_Static_Predicate): New flag
9452 * snames.ads-tmpl: Add Name_Static_Predicate and Name_Dynamic_Predicate
9453
94542011-08-01 Robert Dewar <dewar@adacore.com>
9455
9456 * usage.adb: Documentation cleanup for Ada version modes in usage.
9457 * expander.adb: Minor reformatting.
9458
47e11d08
AC
94592011-08-01 Robert Dewar <dewar@adacore.com>
9460
9461 * atree.ads: Minor comment fix.
9462 * a-stwifi.adb, a-stzfix.adb, a-strfix.adb, a-ztexio.ads, a-textio.ads,
9463 a-witeio.ads, sem_prag.adb: Minor reformatting.
9464
94652011-08-01 Doug Rupp <rupp@adacore.com>
9466
9467 * env.c (__gnat_setenv) [VMS]: Force 32bit on item list structure
9468 pointers. Use descrip.h header file for convenience. Add some
9469 comments.
9470
94712011-08-01 Robert Dewar <dewar@adacore.com>
9472
9473 * freeze.adb (Freeze_Entity): Call Check_Aspect_At_Freeze_Point
9474 (Freeze_All): Call Check_Aspect_At_End_Of_Declarations
9475 * sem_ch13.ads, sem_ch13.adb (Check_Aspect_At_Freeze_Point):
9476 New procedure.
9477 (Check_Aspect_At_End_Of_Declarations): New procedure
9478 (Analye_Aspect_Specification): Minor changes for above procedures
9479 * sinfo.ads, sinfo.adb (Is_Delayed_Aspect): Now set in aspect
9480 specification node as well.
9481
94822011-08-01 Pascal Obry <obry@adacore.com>
9483
9484 * adaint.c (_gnat_stat): GetFilesAttributesEx() would fail on special
9485 Windows files. Use GetFilesAttributes() in this case to check for file
9486 existence instead of returning with an error code.
9487
a3a16b21
VC
94882011-08-01 Vincent Celier <celier@adacore.com>
9489
9490 * a-stzfix.adb, a-stwifi.adb (Replace_Slice): Fixed computation when
9491 High is above Source length.
9492
ff58cc69
RD
94932011-08-01 Robert Dewar <dewar@adacore.com>
9494
9495 * a-ztexio.ads, a-textio.ads, a-witeio.ads: Fix comment.
9496
6bb88533
AC
94972011-08-01 Robert Dewar <dewar@adacore.com>
9498
9499 * aspects.ads (Boolean_Aspects): New subtype.
9500 * exp_ch13.adb (Expand_Freeze_Entity): Fix errors in handling aspects
9501 for derived types in cases where the parent type and derived type have
9502 aspects.
9503 * freeze.adb (Freeze_Entity): Fix problems in handling derived type
9504 with aspects when parent type also has aspects.
9505 (Freeze_Entity): Deal with delay of boolean aspects (must evaluate
9506 boolean expression at this point).
9507 * sem_ch13.adb (Analyze_Aspect_Specifications): Delay all aspects in
9508 accordance with final decision on the Ada 2012 feature.
9509 * sinfo.ads, sinfo.adb (Is_Boolean_Aspect): New flag.
9510
95112011-08-01 Matthew Heaney <heaney@adacore.com>
9512
9513 * a-chtgbo.adb (Delete_Node_Sans_Free): Replace iterator with selector.
9514
060a3f28
AC
95152011-08-01 Pascal Obry <obry@adacore.com>
9516
9517 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb:
9518 Fix Replace_Slice when High is above current string size.
9519 (Replace_Slice): Fix DL computation when High is above current
9520 string length.
9521
95222011-08-01 Gary Dismukes <dismukes@adacore.com>
9523
9524 * gnat_rm.texi: Add documentation for pragma Static_Elaboration_Desired.
9525
e7f567a3
AC
95262011-08-01 Matthew Heaney <heaney@adacore.com>
9527
9528 * a-rbtgbo.adb (Delete_Node_Sans_Free): Fixed assignment to left child
9529 of node.
9530
95312011-08-01 Pascal Obry <obry@adacore.com>
9532
9533 * a-stzunb-shared.adb, a-strunb-shared.adb, a-stwiun-shared.adb: Minor
9534 reformatting.
9535
1a265e78
AC
95362011-08-01 Ed Schonberg <schonberg@adacore.com>
9537
9538 * sem_attr.adb (Analyze_Attribute, case 'Access): Handle properly named
9539 access to protected subprograms in generic bodies.
9540 * sem_ch6.adb (Analyze_Subprogram_Declaration): If the context is a
9541 protected type, indicate that the convention of the subprogram is
9542 Convention_Protected, because it may be used in subsequent declarations
9543 within the protected declaration.
9544
95452011-08-01 Vincent Celier <celier@adacore.com>
9546
9547 * mlib-prj.adb (Build_Library): Use "ada_" as the prefix for the "init"
9548 and "final" procedures when the name of the library is "ada", to avoid
9549 duplicate symbols "adainit" and "adafinal" in executables.
9550
67e28ef8
ES
95512011-08-01 Ed Schonberg <schonberg@adacore.com>
9552
9553 * sem_attr.adb (Analyze_Attribute, case 'Result): Handle properly a
9554 quantified expression that appears within a postcondition and uses the
9555 Ada2012 'Result attribute.
9556
6da2ca7d
RO
95572011-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9558
9559 * init.c (__gnat_error_handler): Cast reason to int.
9560 (__gnat_install_handler): Explain sa_sigaction use.
9561
7d5997c6
EB
95622011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9563
9564 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: If the
9565 subprogram has copy-in copy-out parameters, try to promote the mode of
9566 the return type if it is passed in registers.
9567
4b4cfdd5
EB
95682011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9569
9570 * gcc-interface/utils2.c (build_binary_op) <ARRAY_REF>: Do not mark the
9571 left operand as addressable.
9572
f3d34576
EB
95732011-07-24 Eric Botcazou <ebotcazou@adacore.com>
9574
9575 * gcc-interface/gigi.h (build_function_stub): Remove.
9576 (build_return_expr): Likewise.
9577 (convert_vms_descriptor): Declare.
9578 * gcc-interface/utils.c (convert_vms_descriptor): Make global.
9579 (build_function_stub): Move to...
9580 * gcc-interface/utils2.c (build_return_expr): Move to...
9581 * gcc-interface/trans.c (build_function_stub): ...here.
9582 (build_return_expr): ...here.
9583 (Subprogram_Body_to_gnu): Add local variable for language_function.
9584 Disconnect the parameter attributes cache, if any, once done with it.
9585 Call end_subprog_body only after setting the end_locus.
9586 Build the stub associated with the function, if any, at the very end.
9587 (gnat_to_gnu) <N_Return_Statement>: Remove couple of useless local
9588 variables and streamline control flow.
9589
0a6ecc08
AC
95902011-07-23 Arnaud Charlet <charlet@adacore.com>
9591
9592 PR ada/49819
9593 * gcc-interface/Makefile.in (powerpc-linux): Remove reference to
9594 g-trasym-dwarf.adb.
9595
5b6d595b
RO
95962011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9597
9598 PR bootstrap/49794
9599 * init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
9600 Assign to act.sa_sigaction.
9601 * tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
9602 current->return_address to char * before arithmetic.
9603
94017021
RO
96042011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9605
9606 * init.c [sgi] (__gnat_error_handler): Update sigaction(2) citation.
9607 Correct argument types.
9608 Extract code from reason.
9609 (__gnat_install_handler): Assign to act.sa_sigaction.
9610
52fd02bb
EB
96112011-07-21 Eric Botcazou <ebotcazou@adacore.com>
9612
9613 * gcc-interface/Make-lang.in (GNAT1_ADA_OBJS): Move ada/b_gnat1.o to...
9614 (GNAT1_OBJS): ...here.
9615
f39a9ca2
EB
96162011-07-15 Eric Botcazou <ebotcazou@adacore.com>
9617
9618 PR ada/48711
9619 * g-socthi-mingw.adb (Fill): Fix formatting.
9620
9e36aa23
EB
9621 * gcc-interface/gigi.h: Move around comment.
9622
e3aca522
JDA
96232011-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
9624
9625 PR ada/46350
9626 * s-taprop-hpux-dce.adb (Abort_Task): Remove unnecessary cast.
9627
696b1960
FW
96282011-07-14 Florian Weimer <fw@deneb.enyo.de>
9629
9630 PR ada/48711
9631 * g-socthi-mingw.adb (Fill): Guard against invalid MSG_WAITALL.
9632
f542c405
EB
96332011-07-13 Eric Botcazou <ebotcazou@adacore.com>
9634
9635 * gcc-interface/utils.c (build_vms_descriptor32): Skip the 32-bit
9636 range comparison if Pmode is SImode.
9637
9e9bd455
LG
96382011-07-12 Laurent GUERBY <laurent@guerby.net>
9639 Eric Botcazou <ebotcazou@adacore.com>
9640
9641 * adadecode.c: Wrap up in extern "C" block.
9642 * adadecode.h: Likewise.
9643 * adaint.c: Likewise. Remove 'const' keyword.
9644 * adaint.h: Likewise.
9645 * argv.c: Likewise.
9646 * atree.h: Likewise.
9647 * cio.c: Likewise.
9648 * cstreams.c: Likewise.
9649 * env.c: Likewise.
9650 * exit.c: Likewise.
9651 * fe.h: Likewise.
9652 * final.c: Likewise.
9653 * init.c: Likewise.
9654 * initialize.c: Likewise.
9655 * link.c: Likewise.
9656 * namet.h: Likewise.
9657 * nlists.h: Likewise.
9658 * raise.c: Likewise.
9659 * raise.h: Likewise.
9660 * repinfo.h: Likewise.
9661 * seh_init.c: Likewise.
9662 * targext.c: Likewise.
9663 * tracebak.c: Likewise.
9664 * uintp.h: Likewise.
9665 * urealp.h: Likewise.
9666 * xeinfo.adb: Wrap up generated C code in extern "C" block.
9667 * xsinfo.adb: Likewise.
9668 * xsnamest.adb: Likewise.
9669 * gcc-interface/gadaint.h: Wrap up in extern "C" block.
9670 * gcc-interface/gigi.h: Wrap up some prototypes in extern "C" block.
9671 * gcc-interface/misc.c: Likewise.
9672 * gcc-interface/Make-lang.in (GCC_LINK): Use LINKER.
9673 (GNAT1_C_OBJS): Remove ada/b_gnat1.o. List ada/seh_init.o and
9674 ada/targext.o here...
9675 (GNAT_ADA_OBJS): ...and not here.
9676 (GNAT1_ADA_OBJS): Add ada/b_gnat1.o.
9677 (GNATBIND_OBJS): Reorder.
9678
7644b3c7
RH
96792011-07-07 Richard Henderson <rth@redhat.com>
9680
9681 * gcc-interface/misc.c (gnat_init_gcc_eh): Don't call
9682 dwarf2out_frame_init.
9683
8384ac41
EB
96842011-07-07 Eric Botcazou <ebotcazou@adacore.com>
9685
9686 * gcc-interface/misc.c (gnat_init): Tweak previous change.
9687
fbdd5d87
RO
96882011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9689
9690 PR target/39150
9691 * gcc-interface/Makefile.in: Handle x86_64-solaris2.
9692
1a072294
RG
96932011-07-06 Richard Guenther <rguenther@suse.de>
9694
8384ac41
EB
9695 * gcc-interface/misc.c (gnat_init): Merge calls to
9696 build_common_tree_nodes and build_common_tree_nodes_2.
1a072294
RG
9697 Re-initialize boolean_false_node.
9698
bc712852
EB
96992011-07-02 Eric Botcazou <ebotcazou@adacore.com>
9700 Olivier Hainque <hainque@adacore.com>
9701 Nicolas Setton <setton@adacore.com>
9702
9703 * gcc-interface/utils.c (record_builtin_type): Set TYPE_ARTIFICIAL on
9704 the type according to the ARTIFICIAL_P parameter.
9705 (create_type_decl): Likewise.
9706 (create_type_stub_decl): Set TYPE_ARTIFICIAL on the type to 1.
9707
2eb22389
EB
97082011-07-01 Eric Botcazou <ebotcazou@adacore.com>
9709
9710 * gcc-interface/Make-lang.in (gnat1): Prepend '+' to the command.
9711 (gnatbind): Likewise.
9712
4bdaaf2f
RO
97132011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9714
9715 * gcc-interface/Makefile.in (TOOLS_LIBS): Add $(LIBINTL).
9716
c020c92b
EB
97172011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9718
9719 * gcc-interface/decl.c (gnat_to_gnu_component_type): Use GNAT_TYPE
9720 local variable throughout. Remove useless call to Base_Type.
9721 (gnat_to_gnu_field): Use GNAT_FIELD_TYPE local variable throughout.
9722 Take it also into account for the volatileness of the field. Set the
9723 TREE_SIDE_EFFECTS flag as well in this case. Reorder some warnings.
9724
96769d32
EB
97252011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9726
9727 * gcc-interface/trans.c (Identifier_to_gnu): Don't set TREE_THIS_NOTRAP
9728 on a dereference built for a by-ref object if it has an address clause.
9729
7e4680c1
EB
97302011-06-18 Eric Botcazou <ebotcazou@adacore.com>
9731
9732 * einfo.ads (Address_Taken): Document use for the second argument of
9733 Asm_Input and Asm_Output attributes.
9734 * sem_attr.adb (Analyze_Attribute) <Attribute_Asm_Input>: If the second
9735 argument is an entity name, then set Address_Taken on it.
9736 <Attribute_Asm_Output>: Likewise.
9737 * gcc-interface/trans.c (lvalue_required_for_attribute_p): Handle the
9738 Attr_Asm_Input and Attr_Asm_Output attributes explicitly.
9739 (gnat_to_gnu) <N_Code_Statement>: If an operand is going to end up in
9740 memory and is a CONST_DECL, retrieve its corresponding VAR_DECL.
9741
97422011-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
d5cc9181
JR
9743
9744 PR middle-end/46500
9745 * gcc-interface/decl.c (gnat_to_gnu_param): Use pack_cumulative_args.
9746
677f3fa8
JM
97472011-06-14 Joseph Myers <joseph@codesourcery.com>
9748
9749 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Use ggc-none.o.
9750 (ada/utils.o): Update dependencies.
9751 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Add
9752 ../../../libcpp/libcpp.a.
9753 * gcc-interface/utils.c: Include common/common-target.h.
9754 (process_attributes): Use targetm_common.have_named_sections.
9755
009db074
RG
97562011-06-07 Richard Guenther <rguenther@suse.de>
9757
0bad0e23
EB
9758 * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call
9759 set_sizetype.
009db074 9760
3bfc61cf
EB
97612011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9762
0bad0e23 9763 * gcc-interface/utils2.c (gnat_stabilize_reference): Propagate the
3bfc61cf
EB
9764 TREE_THIS_NOTRAP flag.
9765
5c4a1c7b
EB
97662011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9767
9768 * gcc-interface/utils2.c (gnat_stabilize_reference) <COMPOUND_EXPR>:
9769 Fix thinko.
9770
e9f57686
EB
97712011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9772
9773 * gcc-interface/trans.c (Identifier_to_gnu): Also handle deferred
9774 constants whose full view has discriminants specially.
9775
10e4d056
EB
97762011-06-06 Eric Botcazou <ebotcazou@adacore.com>
9777
9778 * gcc-interface/utils.c: Include diagnostic.h.
9779 (gnat_write_global_declarations): Output debug information for all
9780 global type declarations before finalizing the compilation unit.
9781 * gcc-interface/Make-lang.in (ada/utils.o): Add dependency.
9782
0957c029
JJ
97832011-05-25 Jakub Jelinek <jakub@redhat.com>
9784
9785 * gcc-interface/utils.c (def_fn_type): Remove extra va_end.
9786
52d0a7ac
KT
97872011-05-25 Kai Tietz <ktietz@redhat.com>
9788
9789 * adaint.c (__gnat_to_canonical_file_list_next): Use array
9790 initialization instead of const/none-const pointer assignment.
9791
1ed1641d
JM
97922011-05-24 Joseph Myers <joseph@codesourcery.com>
9793
9794 * gcc-interface/Make-lang.in (GNAT1_OBJS): Don't include
9795 $(EXTRA_GNAT1_OBJS).
9796 (GNATBIND_OBJS): Don't include $(EXTRA_GNATBIND_OBJS).
9797 (EXTRA_GNAT1_OBJS, EXTRA_GNATBIND_OBJS): Remove.
9798 (gnat1$(exeext), gnatbind$(exeext)): Use libcommon-target.a.
9799 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use
9800 libcommon-target.a instead of prefix.o.
9801
9fe72ebd
JM
98022011-05-21 Joseph Myers <joseph@codesourcery.com>
9803
9804 PR ada/49097
0bad0e23 9805 * gcc-interface/Make-lang.in (gnatbind$(exeext)): Depend on $(LIBDEPS).
9fe72ebd 9806
2691e6d7
JM
98072011-05-20 Joseph Myers <joseph@codesourcery.com>
9808
0bad0e23
EB
9809 * gcc-interface/Make-lang.in (EXTRA_GNATBIND_OBJS): Remove version.o.
9810 * gcc-interface/Makefile.in (EXTRA_GNATTOOLS_OBJS): Use libcommon.a
9811 instead of version.o.
2691e6d7 9812
bf6490b5
KT
98132011-05-18 Kai Tietz <ktietz@redhat.com>
9814
9815 * gcc-interface/trans.c (Exception_Handler_to_gnu_sjlj): Use
9816 boolean_false_node instead of integer_zero_node.
9817 (convert_with_check): Likewise.
9818 * gcc-interface/decl.c (choices_to_gnu): Likewise.
9819
7bf9a5ac
EB
98202011-05-12 Eric Botcazou <ebotcazou@adacore.com>
9821
9822 * gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
9823 type of the parameter is an unconstrained array, convert the actual to
9824 the type of the formal in the In Out and Out cases as well.
9825
e5b00edf
NF
98262011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9827
9828 * gcc-interface/utils.c (def_fn_type): Don't call build_function_type;
9829 call build_function_type_array or build_varargs_function_type_array
9830 instead.
9831 (create_subprog_type): Don't call build_function_type; call
9832 build_function_type_vec instead.
9833
51545682
NF
98342011-05-11 Nathan Froyd <froydnj@codesourcery.com>
9835
9836 * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL.
9837 (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL.
9838 (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL.
9839
c99c0026
EB
98402011-05-07 Eric Botcazou <ebotcazou@adacore.com>
9841
f620bd21
EB
9842 * gcc-interface/decl.c (intrin_arglists_compatible_p): Remove spaces.
9843
c99c0026
EB
9844 * gcc-interface/gigi.h (global_bindings_p): Adjust prototype.
9845 * gcc-interface/utils.c (global_bindings_p): Return bool and simplify.
9846
3d528853
NF
98472011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9848
c99c0026 9849 * gcc-interface/trans.c (Case_Statement_to_gnu): Call build_case_label.
3d528853 9850
d7d058c5
NF
98512011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9852
9853 * gcc-interface/decl.c (intrin_arglists_compatible_p): Use iterators
9854 instead of accessing TYPE_ARG_TYPES directly.
9855 * gcc-interface/utils.c (handle_nonnull_attribute): Likewise.
9856
805e60a0
EB
98572011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9858
9859 PR ada/48844
9860 * gcc-interface/gigi.h (get_variant_part): Declare.
9861 * gcc-interface/decl.c (get_variant_part): Make global.
9862 * gcc-interface/utils2.c (find_common_type): Do not return T1 if the
9863 types have the same constant size, are record types and T1 has a
9864 variant part while T2 doesn't.
9865
907a08d9
EB
98662011-05-05 Eric Botcazou <ebotcazou@adacore.com>
9867
9868 * gcc-interface/utils.c (begin_subprog_body): Do not call
9869 get_pending_sizes.
9870 (end_subprog_body): Likewise.
9871
d35936ab
RG
98722011-05-04 Richard Guenther <rguenther@suse.de>
9873
9874 * gcc-interface/trans.c (gnat_to_gnu): Remove zero notrunc argument to
9875 int_const_binop.
9876 (pos_to_constructor): Likewise.
9877
c1fd8753 98782011-05-03 Nathan Froyd <froydnj@codesourcery.com>
2c7f9cc0 9879 Eric Botcazou <ebotcazou@adacore.com>
c1fd8753
NF
9880
9881 * gcc-interface/trans.c (gigi): Call build_function_type_list instead
9882 of build_function_type. Adjust calls to...
9883 (build_raise_check): ...this. Do not take a void_tree parameter.
9884 Call build_function_type_list instead of build_function_type.
9885 Fix head comment and swap couple of conditional blocks.
9886
4fb87d2b
EB
98872011-04-30 Eric Botcazou <ebotcazou@adacore.com>
9888
9889 * gnatvsn.ads (Library_Version): Bump to 4.7.
9890 (Current_Year): Bump to 2011.
9891
fa5e5a76
MM
98922011-04-29 Michael Matz <matz@suse.de>
9893
9894 * gcc-interface/misc.c (gnat_handle_option): Set
9895 warn_maybe_uninitialized.
9896
8d6a2f69
GP
98972011-04-23 Gerald Pfeifer <gerald@pfeifer.com>
9898
9899 * gnat_ugn.texi (Complexity Metrics Control): Update link to
9900 the Watson/McCabe paper.
9901
770937fd
JM
99022011-04-23 Jim Meyering <meyering@redhat.com>
9903
9904 * gnat_ugn.texi (Examples of gnatxref Usage): Fix typo: s/it it/it is/
9905
eb601ae1
EB
99062011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9907
9908 * gcc-interface/decl.c (make_packable_type): Copy DECL_PARALLEL_TYPE
9909 onto the new type.
9910
7d7fcb08
EB
99112011-04-22 Eric Botcazou <ebotcazou@adacore.com>
9912
9913 * gcc-interface/gigi.h (create_subprog_decl): Add ARTIFICIAL_FLAG
9914 parameter.
9915 * gcc-interface/utils.c (create_subprog_decl): Likewise. Set
9916 DECL_ARTIFICIAL and DECL_NO_INLINE_WARNING_P on the DECL accordingly.
9917 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
9918 ARTIFICIAL_FLAG local variable and pass it to create_subprog_decl.
9919 <all>: Do not set flags on the reused DECL node coming from an alias.
9920 Set DECL_IGNORED_P on the DECL node built for subprograms if they
9921 don't need debug info here...
9922 * gcc-interface/trans.c (Subprogram_Body_to_gnu): ...and not here.
9923 (gigi): Adjust calls to create_subprog_decl.
9924 (build_raise_check): Likewise.
9925 (establish_gnat_vms_condition_handler): Likewise.
9926 (Compilation_Unit_to_gnu): Likewise.
9927 (gnat_to_gnu): Likewise.
9928
e1876cac
EB
99292011-04-21 Eric Botcazou <ebotcazou@adacore.com>
9930
9931 * gcc-interface/Makefile.in (NO_SIBLING_ADAFLAGS): Always define.
9932 (NO_REORDER_ADAFLAGS): New variable.
9933 (EXTRA_GNATTOOLS): Always define.
9934 (../stamp-gnatlib1-$(RTSDIR): Copy tsystem.h.
9935 Clean up and adjust list of files compiled with special options.
9936 * gcc-interface/Make-lang.in: Likewise.
9937 (ada/decl.o): Cosmetical change.
9938 (ada/misc.o): Remove dependency on $(PLUGIN_H).
9939
04695783
JM
99402011-04-20 Jim Meyering <meyering@redhat.com>
9941
9942 * initialize.c (__gnat_initialize): Remove useless if-before-free.
9943
23399579
EB
99442011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9945
9946 * gcc-interface/Make-lang.in (gnatbind): Replace $(ALL_CFLAGS) with
9947 $(CFLAGS) on the link line.
9948
51c5169c
EB
99492011-04-17 Eric Botcazou <ebotcazou@adacore.com>
9950
9951 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Declare the
9952 padded type built for the return type if it is unconstrained.
9953
61e46a7d
NF
99542011-04-14 Nathan Froyd <froydnj@codesourcery.com>
9955
9956 * gcc-interface/utils.c (gnat_poplevel): Use block_chainon.
9957
81f653d6
NF
99582011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9959
b4867846
EB
9960 * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON
9961 before calling TREE_CHAIN.
81f653d6
NF
9962 * gcc-interface/misc.c (gnat_init_ts): New function.
9963 (LANG_HOOKS_INIT_TS): Define.
9964
a358e188
MJ
99652011-04-12 Martin Jambor <mjambor@suse.cz>
9966
b4867846
EB
9967 * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node
9968 instead of cgraph_node.
a358e188 9969
29b1c5a4
EB
99702011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9971
9972 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set minimum
9973 alignment on fields of the RETURN type built for the Copy-In Copy-Out
9974 mechanism.
9975
88872b00
EB
99762011-04-08 Eric Botcazou <ebotcazou@adacore.com>
9977
9978 * gcc-interface/trans.c (Identifier_to_gnu): Do not return initializers
9979 of aggregate types that contain a placeholder.
9980
dcf0c47e
NF
99812011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9982
9983 * gcc-interface/utils.c (handle_sentinel_attribute): Don't use
b4867846 9984 TYPE_ARG_TYPES.
dcf0c47e
NF
9985 (handle_type_generic_attribute): Likewise.
9986
53e3000c
EB
99872011-04-04 Eric Botcazou <ebotcazou@adacore.com>
9988
9989 PR ada/47163
9990 * s-oscons-tmplt.c (MSG_WAITALL): Fix thinko in previous change.
9991
ab380bb4
KT
99922011-04-04 Kai Tietz <ktietz@redhat.com>
9993
9994 PR ada/47163
0bad0e23
EB
9995 * s-oscons-tmplt.c (MSG_WAITALL): Define it for native windows targets
9996 to flag value.
ab380bb4 9997
8ffac116
EB
99982011-04-02 Eric Botcazou <ebotcazou@adacore.com>
9999
10000 * gcc-interface/utils2.c (build_allocator): In the unconstrained array
10001 type case, do not strip a padding type around the array type.
10002
de9528f0
EB
100032011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10004
10005 * gcc-interface/utils.c (update_pointer_to): Finalize named pointer
10006 types.
10007
d9d7a26c
EB
100082011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10009
10010 * gcc-interface/lang.opt (feliminate-unused-debug-types): Delete.
10011 * gcc-interface/misc.c (gnat_handle_option): Remove special handling
de9528f0 10012 code for -feliminate-unused-debug-types.
d9d7a26c
EB
10013 (gnat_post_options): Likewise.
10014
4cb12a90
EB
100152011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10016
10017 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10018 declaration of a pointer type, then set DECL_ORIGINAL_TYPE to a
10019 distinct copy.
10020
acccc61c
EB
100212011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10022
10023 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force the
10024 DECL_ARTIFICIAL flag on enumeration types.
10025
583eb0c9
EB
100262011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10027
10028 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do not make
10029 fat pointer types artificial unconditionally.
10030 <E_Array_Subtype>: Attach the base array type as a parallel type if it
10031 isn't artificial.
10032
e3edbd56
EB
100332011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10034
10035 * gcc-interface/gigi.h (get_dummy_type): Declare.
10036 (build_dummy_unc_pointer_types): Likewise.
10037 (finish_fat_pointer_type): Likewise.
10038 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: If a dummy
10039 fat pointer type has been built, complete it in place.
10040 <E_Access_Type>: Call build_dummy_unc_pointer_types to build dummy fat
10041 and thin pointers. Remove useless variable.
10042 (finish_fat_pointer_type): Make global and move to...
10043 * gcc-interface/utils.c (finish_fat_pointer_type): ...here.
10044 (get_dummy_type): New function.
10045 (build_dummy_unc_pointer_types): Likewise.
10046 (gnat_pushdecl): Propage the name to the anonymous variants only.
10047 (update_pointer_to): Only adjust the pointer types in the unconstrained
10048 array case.
10049
65444786
EB
100502011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10051
10052 * gcc-interface/ada-tree.h (DECL_TAFT_TYPE_P): New flag.
10053 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Incomplete_Type>: Set it
10054 if this is a Taft amendment type and the full declaration is available.
10055 * gcc-interface/trans.c (process_type): Likewise.
10056 If there is an old type, mark the new one as used if DECL_TAFT_TYPE_P.
10057 (process_freeze_entity): Likewise.
10058 * gcc-interface/utils.c (dummy_global): New static variable.
10059 (gnat_write_global_declarations): If there are types declared as used
10060 at the global level, insert them in the global hash table.
10061
1aeb40dd
EB
100622011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10063
10064 * gcc-interface/gigi.h (record_builtin_type): Add ARTIFICIAL_P param.
10065 * gcc-interface/utils.c (gnat_pushdecl): If this is a non-artificial
10066 declaration of an array type, then set DECL_ORIGINAL_TYPE to a distinct
10067 copy.
10068 (record_builtin_type): Add ARTIFICIAL_P parameter. Set DECL_ARTIFICIAL
10069 flag of the type accordingly.
10070 * gcc-interface/trans.c (gigi): Adjust calls to record_builtin_type.
10071
80ec8b4c
EB
100722011-04-02 Eric Botcazou <ebotcazou@adacore.com>
10073
10074 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10075 finalizing types when updating the pointers to the designated type.
10076 <all>: Finalize the deferred types even if we didn't defer processing
10077 of incomplete types in this invocation.
10078
2a9d769a 100792011-04-01 Olivier Hainque <hainque@adacore.com>
2c7f9cc0
AS
10080 Nicolas Setton <setton@adacore.com>
10081 Eric Botcazou <ebotcazou@adacore.com>
2a9d769a
OH
10082
10083 * gcc-interface/misc.c (gnat_descriptive_type): New function.
10084 (LANG_HOOKS_DESCRIPTIVE_TYPE): Redefine to gnat_descriptive_type.
10085
2438d7a6
KT
100862011-03-28 Kai Tietz <ktietz@redhat.com>
10087
333d8aff 10088 * gcc-interface/Makefile.in (SO_LIB): Handle multilib build for native
80ec8b4c
EB
10089 Windows targets.
10090 (EH_MECHANISM): Use GCC exception mechanism for native Windows targets.
10091 * system-mingw.ads (System): Change ZCX_By_Default default to True.
333d8aff 10092
80ec8b4c 10093 * raise-gcc.c (PERSONALITY_FUNCTION): Add prototype.
2438d7a6 10094
8ad150f6
TG
100952011-03-28 Tristan Gingold <gingold@adacore.com>
10096
10097 PR ada/44431
80ec8b4c
EB
10098 * gcc-interface/Make-lang.in (ada/b_gnat1.adb): Replace ada/b_gnat1.c.
10099 Use ada output of gnatbind.
8ad150f6
TG
10100 (ada/b_gnatb.adb): Ditto.
10101 (ada/b_gnat1.o, ada/b_gnatb.o): New rules.
10102 (ada.mostlyclean, ada.stage1)
10103 (ada.stage2, ada.stage3, ada.stage4, ada.stageprofile)
10104 (ada.stagefeedback): Adjust.
80ec8b4c 10105 * gcc-interface/Makefile.in (b_gnatl.adb): Replace b_gnatl.c.
8ad150f6
TG
10106 Use ada output of gnatbind.
10107 (b_gnatm.adb): Ditto.
10108 (b_gnatl.o, b_gnatm.o): New rules.
10109
51c7954d
EB
101102011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10111
10112 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10113 for the padded type built to support a specified size or alignment.
10114
6ddf9843
EB
101152011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10116
10117 * gcc-interface/gigi.h (finalize_from_with_types): Adjust comment.
10118 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Defer
10119 unconditionally to the end of the unit when the designated type is
10120 limited_with'ed.
10121 <all>: Rename local variable. Attempt to un-defer types only and do it
10122 for limited_with'ed types as well.
10123 (finalize_from_with_types): Adjust comment. Rename variable and tidy.
10124 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Use GNAT_UNIT
10125 consistently and remove redundant call to finalize_from_with_types.
10126
5daed84a
EB
101272011-03-26 Eric Botcazou <ebotcazou@adacore.com>
10128
10129 * inline.adb (Back_End_Cannot_Inline): Lift restriction on calls to
10130 subprograms without a previous spec declared in the same unit.
10131 * gcc-interface/trans.c (Compilation_Unit_to_gnu): Process inlined
10132 subprograms at the end of the unit instead of at the beginning.
10133 * gcc-interface/utils.c (create_subprog_decl): Check that the entity
10134 isn't public for the special handling of non-inline functions nested
10135 inside inline external functions.
10136
0edf1bb2
JL
101372011-03-25 Jeff Law <law@redhat.com>
10138
5daed84a 10139 * gcc-interface/utils.c (def_fn_type): Add missing va_end.
0edf1bb2 10140
e3c4580e
EB
101412011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10142
10143 * einfo.ads (Size_Depends_On_Discriminant): Adjust description.
10144 * layout.adb (Compute_Size_Depends_On_Discriminant): New procedure
10145 to compute Set_Size_Depends_On_Discriminant.
10146 (Layout_Type): Call it on array types in back-end layout mode.
10147 * sem_util.adb (Requires_Transient_Scope): Return true for array
10148 types only if the size depends on the value of discriminants.
10149 * gcc-interface/utils2.c (build_binary_op) <MODIFY_EXPR>: Use the RHS
10150 type if the RHS is a call to a function that returns an unconstrained
10151 type with default discriminant.
10152
abbc8c7b
EB
101532011-03-24 Eric Botcazou <ebotcazou@adacore.com>
10154
10155 * gcc-interface/trans.c (gnat_to_gnu): Remove obsolete case of
10156 non-conversion to the nominal result type at the end.
10157
ddb5a105
EB
101582011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10159
10160 * gcc-interface/trans.c (create_temporary): New function taken from...
10161 (create_init_temporary): ...here. Call it.
10162 (call_to_gnu): Create the temporary for the return value early, if any.
10163 Create it for a function with copy-in/copy-out parameters if there is
10164 no target; in other cases of copy-in/copy-out, use another temporary.
10165 Push the new binding level lazily. Add and rename local variables.
10166
0d853156
EB
101672011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10168
10169 * gcc-interface/decl.c (validate_size): Improve comments and tweak
10170 error message.
10171 (set_rm_size): Likewise.
10172
4184ef1b
EB
101732011-03-23 Eric Botcazou <ebotcazou@adacore.com>
10174
10175 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create TYPE_DECL
10176 for the padded type built in order to support a specified alignment.
10177 Fix incorrect formatting.
10178
bf7eefab
EB
101792011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10180
10181 PR bootstrap/48216
10182 * gcc-interface/decl.c (elaborate_expression_1): Localize GNU_DECL.
10183
ef0feeb2
EB
101842011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10185
10186 * gcc-interface/decl.c (components_to_record): Add REORDER parameter,
10187 rename DEBUG_INFO_P into DEBUG_INFO and move P_GNU_REP_LIST parameter
10188 to the end of the list. Adjust recursive call. Rename local variable.
10189 If REORDER is true, reorder components of the record type.
10190 (gnat_to_gnu_entity): Pass OK_To_Reorder_Components flag as argument to
10191 components_to_record and adjust the parameter list.
10192
646f9414
EB
101932011-03-21 Eric Botcazou <ebotcazou@adacore.com>
10194
10195 * gcc-interface/decl.c (elaborate_expression_1): When optimization is
10196 disabled, use the variable for bounds of loop iteration scheme.
10197
62d784f7
KT
101982011-03-21 Kai Tietz <ktietz@redhat.com>
10199
10200 PR target/12171
0bad0e23 10201 * gcc-interface/utils.c (gnat_internal_attribute_table): Add column.
62d784f7 10202
f230d759
EB
102032011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10204
10205 * gcc-interface/decl.c (elaborate_expression_1): Try harder to find
10206 out whether the expression is read-only. Short-circuit placeholder
10207 case and rename a couple of local variables.
10208
bb1f7929
EB
102092011-03-17 Eric Botcazou <ebotcazou@adacore.com>
10210
10211 * gcc-interface/gigi.h (smaller_form_type_p): Declare.
10212 * gcc-interface/trans.c (smaller_form_type_p): Make global and move...
10213 * gcc-interface/utils.c (smaller_form_type_p): ...to here.
10214 (convert): Deal with conversions from a smaller form type specially.
10215
400a2d24
EB
102162011-02-14 Eric Botcazou <ebotcazou@adacore.com>
10217
10218 * gcc-interface/misc.c (gnat_init_options): Do not concatenate -I and
10219 its argument, except for the special -I- switch.
10220
c26bc3ad
GP
102212011-02-12 Gerald Pfeifer <gerald@pfeifer.com>
10222
0bad0e23
EB
10223 * gnat_ugn.texi (Compiling Different Versions of Ada): Update link to
10224 "Ada Issues".
c26bc3ad 10225
07b8e910
EB
102262011-02-08 Eric Botcazou <ebotcazou@adacore.com>
10227
10228 * gcc-interface/Makefile.in (x86-64 darwin): Handle multilibs.
10229
31a5a547
EB
102302011-02-03 Eric Botcazou <ebotcazou@adacore.com>
10231
10232 * gcc-interface/gigi.h (fill_vms_descriptor): Take GNU_TYPE instead of
10233 GNAT_FORMAL.
10234 * gcc-interface/utils2.c (fill_vms_descriptor): Move from here to...
10235 * gcc-interface/utils.c (fill_vms_descriptor): ...here. Take GNU_TYPE
10236 instead of GNAT_FORMAL. Protect the expression against multiple uses.
10237 Do not generate the check directly, instead instantiate the template
10238 check present in the descriptor.
10239 (make_descriptor_field): Move around.
10240 (build_vms_descriptor32): Build a template check in the POINTER field.
10241 (build_vms_descriptor): Remove useless suffixes.
10242 * gcc-interface/trans.c (call_to_gnu): Adjust fill_vms_descriptor call.
10243
dcf25f59
EB
102442011-01-26 Eric Botcazou <ebotcazou@adacore.com>
10245
10246 PR bootstrap/47467
10247 * targext.c: Include target files if IN_RTS is defined.
10248
0418e131
RG
102492011-01-26 Richard Guenther <rguenther@suse.de>
10250
10251 PR bootstrap/47467
10252 * targext.c: Include config.h.
10253 * gcc-interface/Make-lang.in (ada/targext.o): Add $(CONFIG_H)
10254 dependency.
10255
c6eecbd8 102562011-01-04 Pascal Obry <obry@adacore.com>
2c7f9cc0 10257 Eric Botcazou <ebotcazou@adacore.com>
c6eecbd8
PO
10258
10259 * gcc-interface/decl.c: Disable Stdcall convention handling for 64-bit.
10260
2d3c7e4f
EB
102612011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10262
10263 * gcc-interface/trans.c (Case_Statement_to_gnu): Put the SLOC of the
10264 end-of-case on the end label and its associated gotos, if any.
10265
0394741f
EB
102662011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10267
10268 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Evaluate the
10269 expressions of the parameter cache within the statement group of
10270 the CICO mechanism.
10271
2a02d090 102722011-01-04 Olivier Hainque <hainque@adacore.com>
2c7f9cc0 10273 Eric Botcazou <ebotcazou@adacore.com>
2a02d090
OH
10274
10275 * gcc-interface/trans.c (BLOCK_SOURCE_END_LOCATION): Provide default.
10276 (set_end_locus_from_node): New function.
10277 (Subprogram_Body_to_gnu): Use it to mark both the inner BIND_EXPR we
10278 make and the function end_locus.
10279 (Compilation_Unit_to_gnu): Call it instead of a straight Sloc_to_locus
10280 for the elaboration subprogram.
10281 (set_gnu_expr_location_from_node) <default case>: Use it to attempt to
10282 set the end_locus of the expression as well.
10283
89f5e978
EB
102842011-01-04 Eric Botcazou <ebotcazou@adacore.com>
10285
10286 PR ada/47131
10287 * gcc-interface/trans.c (Identifier_to_gnu): In SJLJ mode, do not make
10288 variables that are referenced in exception handlers volatile.
10289
10290
ad41bd84 10291\f
797103eb 10292Copyright (C) 2011 Free Software Foundation, Inc.
ad41bd84
JM
10293
10294Copying and distribution of this file, with or without modification,
10295are permitted in any medium without royalty provided the copyright
10296notice and this notice are preserved.