]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/ada/ChangeLog
Makefile-lan.in (ada.mostlyclean): Remove gnatbind and gnat1.
[thirdparty/gcc.git] / gcc / ada / ChangeLog
1 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
2
3 * gcc-interface/Makefile-lan.in (ada.mostlyclean): Remove gnatbind
4 and gnat1.
5
6 2015-04-13 Eric Botcazou <ebotcazou@adacore.com>
7
8 * gnatvsn.ads (Library_Version): Bump to 6.
9
10 2015-04-09 Iain Sandoe <iain@codesourcery.com>
11
12 * gcc-interface/Makefile.in (darwin, powerpc): Enable atomics.
13
14 2015-04-08 Eric Botcazou <ebotcazou@adacore.com>
15
16 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Function>: Do not make
17 a function returning an unconstrained type 'const' for the middle-end.
18
19 * gcc-interface/trans.c (Pragma_to_gnu) <case Pragma_Warning>: Use
20 exact condition to detect Reason => "..." pattern.
21
22 2015-03-31 Tom de Vries <tom@codesourcery.com>
23
24 PR ada/65490
25 * terminals.c (child_setup_tty): Fix warning 'argument to sizeof in
26 bzero call is the same expression as the destination'.
27
28 2015-03-26 Eric Botcazou <ebotcazou@adacore.com>
29
30 * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Deref>: New case.
31
32 2015-03-24 Gary Dismukes <dismukes@adacore.com>
33
34 * sem_ch3.adb: Minor typo fix (missing paren).
35
36 2015-03-24 Robert Dewar <dewar@adacore.com>
37
38 * sinfo.ads: Update comment.
39
40 2015-03-24 Robert Dewar <dewar@adacore.com>
41
42 * exp_attr.adb: Add entry for typ'Deref.
43 * sem_attr.adb (Deref): New GNAT attribute.
44 * sem_attr.ads: Add entry for new GNAT attribute Deref.
45 * snames.ads-tmpl: Add entries for new attribute Deref.
46
47 2015-03-24 Ed Schonberg <schonberg@adacore.com>
48
49 * sem_ch13.adb (Rep_Item_Too_Early): allow pragma Convention
50 on generic type.
51
52 2015-03-24 Gary Dismukes <dismukes@adacore.com>
53
54 * inline.adb: Minor typo fix.
55
56 2015-03-24 Arnaud Charlet <charlet@adacore.com>
57
58 * doc/gnat_ugn/building_executable_programs_with_gnat.rst,
59 doc/gnat_ugn/gnat_utility_programs.rst
60 doc/gnat_rm/implementation_defined_attributes.rst
61 doc/gnat_rm/implementation_defined_pragmas.rst
62 doc/gnat_rm/representation_clauses_and_pragmas.rst
63 doc/gnat_rm/about_this_guide.rst
64 doc/gnat_rm/implementation_of_ada_2012_features.rst: Doc improvements.
65 * gnat_rm.texi, gnat_ugn.texi: Regenerate.
66
67 2015-03-23 Jakub Jelinek <jakub@redhat.com>
68
69 PR bootstrap/65522
70 * adadecode.c (ada_demangle): Guard with IN_RTS instead of IN_GCC.
71
72 2015-03-20 Eric Botcazou <ebotcazou@adacore.com>
73
74 PR ada/65451
75 * gcc-interface/utils.c (gnat_pushdecl): Tidy up and improve comment.
76 Make sure to chain only main variants through TYPE_NEXT_PTR_TO.
77
78 * gcc-interface/trans.c (Attribute_to_gnu): Revert latest change.
79
80 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
81
82 * gcc-interface/utils2.c (gnat_invariant_expr): Return null if the type
83 of the expression ends up being composite.
84
85 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
86
87 * gcc-interface/decl.c (is_from_limited_with_of_main): New predicate.
88 (gnat_to_gnu_entity) <E_Subprogram_Type>: Invoke it on return and
89 parameter types to detect circularities in ASIS mode.
90 * gcc-interface/trans.c (Attribute_to_gnu): Mention AI05-0151.
91
92 2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
93
94 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Abstract_State>: Do not
95 short-circuit the regular handling.
96
97 2015-03-13 Robert Dewar <dewar@adacore.com>
98
99 * exp_unst.adb (Note_Uplevel_Reference): Eliminate duplicate
100 references.
101 (Actual_Ref): New function.
102 (AREC_String): Minor reformatting.
103 (Unnest_Subprogram): Use Actual_Ref.
104 * frontend.adb (Frontend): Turn off Unnest_Subprogram_Mode
105 before call to Instantiate_Bodies.
106
107 2015-03-13 Ed Schonberg <schonberg@adacore.com>
108
109 * freeze.adb (Freeze_Profile): If the return type of a function
110 being frozen is an untagged limited view and the function is
111 abstract, mark the type as frozen because there is no later
112 point at which the profile of the subprogram will be elaborated.
113
114 2015-03-13 Robert Dewar <dewar@adacore.com>
115
116 * einfo.adb, einfo.ads, atree.adb, atree.ads, atree.h: Add seventh
117 component to entities. Add new fields Field36-41 and Node36-41.
118
119 2015-03-13 Claire Dross <dross@adacore.com>
120
121 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Rewrite after review.
122
123 2015-03-13 Robert Dewar <dewar@adacore.com>
124
125 * exp_util.adb (Is_Volatile_Reference): Compile time known
126 value is never considered to be a volatile reference.
127
128 2015-03-13 Robert Dewar <dewar@adacore.com>
129
130 * sem_ch3.adb (Analyze_Object_Contract): Suppress "constant
131 cannot be volatile" for internally generated object (such as
132 FIRST and LAST constants).
133
134 2015-03-13 Ed Schonberg <schonberg@adacore.com>
135
136 * sem_ch12.adb (Validate_Access_Subprogram_Instance): If a
137 convention is specified for the formal parameter, verify that
138 the actual has the same convention.
139 * sem_prag.adb (Set_Convention_From_Pragma): Allow convention
140 pragma to be set on a generic formal type.
141 * sem_util.adb (Set_Convention): Ignore within an instance,
142 as it has already been verified in the generic unit.
143
144 2015-03-13 Claire Dross <dross@adacore.com>
145
146 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do not inline
147 subprograms with unconstrained record parameters containing
148 Itype declarations.
149 * sinfo.ads Document GNATprove assumption that type should match
150 in the AST.
151 * sem_ch6.adb (Analyze_Subprogram_Body_Contract):
152 Do not check for Refined_Depends and Refined_Globals contracts
153 as they are optional.
154
155 2015-03-13 Ed Schonberg <schonberg@adacore.com>
156
157 * sem_ch12.adb (Instantiate_Type): For a floating-point type,
158 capture dimension info if any, because the generated subtype
159 declaration does not come from source and will not process dimensions.
160 * sem_dim,adb (Analyze_Dimension_Extension_Or_Record_Aggregate):
161 Do not analyze expressions with an initialization procedure
162 because aggregates will have been checked at the point of record
163 declaration.
164
165 2015-03-13 Robert Dewar <dewar@adacore.com>
166
167 * aspects.ads, aspects.adb: Add entries for aspect Unimplemented.
168 * einfo.ads, einfo.adb (Is_Unimplemented): New flag.
169 * sem_ch13.adb: Add dummy entry for aspect Unimplemented.
170 * snames.ads-tmpl: Add entry for Name_Unimplemented.
171
172 2015-03-13 Gary Dismukes <dismukes@adacore.com>
173
174 * style.adb (Missing_Overriding): Apply the
175 Comes_From_Source test to the Original_Node of the subprogram
176 node, to handle the case of a null procedure declaration that
177 has been rewritten as an empty procedure body.
178
179 2015-03-13 Robert Dewar <dewar@adacore.com>
180
181 * exp_util.ads: Minor fix to comment.
182 * sem_ch3.adb (Constrain_Index): Correct pasto from previous
183 change.
184
185 2015-03-13 Robert Dewar <dewar@adacore.com>
186
187 * exp_util.ads, exp_util.adb (Force_Evaluation): Add Related_Id and
188 Is_Low/High_Bound params.
189 * sem_ch3.adb (Constrain_Index): Use new Force_Evaluation calling
190 sequence to simplify generation of FIRST/LAST temps for bounds.
191
192 2015-03-12 Olivier Hainque <hainque@adacore.com>
193
194 * gcc-interface/trans.c (Attribute_to_gnu) <Code_Address case>:
195 On targets where a function symbol designates a function descriptor,
196 fetch the function code address from the descriptor.
197 (USE_RUNTIME_DESCRIPTORS): Provide a default definition.
198
199 2015-03-04 Robert Dewar <dewar@adacore.com>
200
201 * sem_warn.adb: Minor reformatting.
202 * init.c: Minor tweaks.
203
204 2015-03-04 Dmitriy Anisimko <anisimko@adacore.com>
205
206 * a-coinho-shared.adb: Fix clear of already empty holder.
207
208 2015-03-04 Robert Dewar <dewar@adacore.com>
209
210 * exp_unst.adb (Check_Dynamic_Type): Ignore library level types.
211 (Check_Uplevel_Reference_To_Type): Ignore call inside generic.
212 (Note_Uplevel_Reference): Ignore call inside generic.
213 (Note_Uplevel_Reference): Fix check for no entity field.
214 (Unnest_Subprogram): Ignore call inside generic.
215 (Find_Current_Subprogram): Use Defining_Entity, not Defining_Unit_Name.
216 (Visit_Node): Ignore calls to Imported subprograms.
217 (Visit_Node): Fix problem in finding subprogram body in some cases.
218 (Add_Form_To_Spec): Use Defining_Entity, not Defining_Unit_Name.
219
220 2015-03-04 Robert Dewar <dewar@adacore.com>
221
222 * einfo.adb (Is_ARECnF_Entity): Removed.
223 (Last_Formal): Remove special handling of Is_ARECnF_Entity.
224 (Next_Formal): Remove special handling of Is_ARECnF_Entity.
225 (Next_Formal_With_Extras): Remove special handling of Is_ARECnF_Entity.
226 (Number_Entries): Minor reformatting.
227 * einfo.ads (Is_ARECnF_Entity): Removed.
228 * exp_unst.adb (Unnest_Subprogram): Remove setting of
229 Is_ARECnF_Entity.
230 (Add_Extra_Formal): Use normal Extra_Formal circuit.
231 * sprint.adb (Write_Param_Specs): Properly handle case where
232 there are no source formals, but we have at least one Extra_Formal
233 present.
234
235 2015-03-04 Ed Schonberg <schonberg@adacore.com>
236
237 * sem_aggr.adb (Resolve_Record_Aggregate,
238 Add_Discriminant_Values): If the value is a reference to the
239 current instance of an enclosing type, use its base type to check
240 against prefix of attribute reference, because the target type
241 may be otherwise constrained.
242
243 2015-03-04 Robert Dewar <dewar@adacore.com>
244
245 * atree.h: Add entries for Flag287-Flag309.
246 * einfo.adb: Add (unused) flags Flag287-Flag309.
247
248 2015-03-04 Ed Schonberg <schonberg@adacore.com>
249
250 * sem_util.adb (Collect_Interfaces, Collect): When gathering
251 interfaces of ancestors, handle properly a subtype of a private
252 extension.
253
254 2015-03-04 Robert Dewar <dewar@adacore.com>
255
256 * einfo.adb (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
257 (Next_Formal): Don't return ARECnF formal.
258 (Last_Formal): Don't consider ARECnF formal.
259 (Next_Formal_With_Extras): Do consider ARECnF formal.
260 * einfo.ads (Is_ARECnF_Entity): New flag (ARECnF is an extra formal).
261 * exp_unst.adb (Create_Entities): Set Is_ARECnF_Entity flag.
262
263 2015-03-04 Javier Miranda <miranda@adacore.com>
264
265 * exp_ch6.adb (Expand_Simple_Function_Return): When the returned
266 object is a class-wide interface object and we generate the
267 accessibility described in RM 6.5(8/3) then displace the pointer
268 to the object to reference the base of the object (to get access
269 to the TSD of the object).
270
271 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
272
273 * sem_prag.adb (Analyze_Abstract_State): Use routine
274 Malformed_State_Error to issue general errors.
275 (Analyze_Pragma): Diagnose a syntax error related to a state
276 declaration with a simple option.
277 (Malformed_State_Error): New routine.
278
279 2015-03-04 Robert Dewar <dewar@adacore.com>
280
281 * a-strsup.adb (Super_Slice): Deal with super flat case.
282 * einfo.ads: Minor reformatting.
283 * s-imgdec.adb (Set_Decimal_Digits): Add comment about possibly
284 redundant code.
285
286 2015-03-04 Claire Dross <dross@adacore.com>
287
288 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
289 a-cforse.ads, a-cofove.ads: Use Default_Initial_Condition on formal
290 containers.
291
292 2015-03-04 Ed Schonberg <schonberg@adacore.com>
293
294 * sem_warn.adb (Check_References): When checking for an unused
295 in-out parameter of a class- wide type, use its type to determine
296 whether it is private, in order to avoid a spurious warning when
297 subprogram spec and body are in different units.
298
299 2015-03-04 Yannick Moy <moy@adacore.com>
300
301 * sem_attr.adb: Improve warning messages.
302
303 2015-03-04 Robert Dewar <dewar@adacore.com>
304
305 * exp_ch6.adb (Expand_N_Subprogram_Body): Avoid trying to unnest
306 generic subprograms.
307 * exp_unst.adb (Check_Dynamic_Type): Handle record types properly
308 (Note_Uplevel_Reference): Ignore uplevel references to non-types
309 (Get_Level): Consider only subprograms, not blocks.
310 (Visit_Node): Set proper condition for generating ARECnF entity.
311 Ignore indirect calls. Ignore calls to subprograms
312 outside our nest.
313 (Unnest_Subprogram): Minor changes in dealing with ARECnF entity.
314 (Add_Form_To_Spec): Properly set Last_Entity field.
315 (Unnest_Subprogram): Set current subprogram scope for analyze calls.
316 Handle case of no uplevel refs in outer subprogram
317 Don't mark uplevel entities as aliased.
318 Don't deal with calls with no ARECnF requirement.
319
320 2015-03-04 Robert Dewar <dewar@adacore.com>
321
322 * s-valrea.adb (Scan_Real): Remove redundant tests from scaling loops.
323 * s-imgdec.adb (Set_Decimal_Digits): Remove redundant Max
324 operation in computing LZ.
325 * sem_attr.adb: Minor typo fix
326
327 2015-03-04 Robert Dewar <dewar@adacore.com>
328
329 * exp_ch7.adb: Minor reformatting.
330 * exp_unst.adb (Build_Tables): Fix minor glitch for no separate
331 spec case.
332 * erroutc.adb (Delete_Msg): add missing decrement of info msg counter.
333
334 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
335
336 * exp_ch6.adb (Build_Pragma_Check_Equivalent): Suppress
337 references to formal parameters subject to pragma Unreferenced.
338 (Suppress_Reference): New routine.
339 * sem_attr.adb (Analyze_Attribute): Reimplement the analysis
340 of attribute 'Old. Attributes 'Old and 'Result now share
341 common processing.
342 (Analyze_Old_Result_Attribute): New routine.
343 (Check_Placement_In_Check): Removed.
344 (Check_Placement_In_Contract_Cases): Removed.
345 (Check_Placement_In_Test_Case): Removed.
346 (Check_Use_In_Contract_Cases): Removed.
347 (Check_Use_In_Test_Case): Removed.
348 (In_Refined_Post): Removed.
349 (Is_Within): Removed.
350 * sem_warn.adb (Check_Low_Bound_Tested): Code cleanup.
351 (Check_Low_Bound_Tested_For): New routine.
352
353 2015-03-04 Hristian Kirtchev <kirtchev@adacore.com>
354
355 * exp_ch3.adb (Expand_N_Object_Declaration):
356 Generate a runtime check to test the expression of pragma
357 Default_Initial_Condition when the object is default initialized.
358
359 2015-03-02 Robert Dewar <dewar@adacore.com>
360
361 * scng.adb (Scan): Ignore illegal character in relaxed
362 semantics mode.
363
364 2015-03-02 Ed Schonberg <schonberg@adacore.com>
365
366 * sem_ch4.adb (Analyze_Set_Membership); Retain Overloaded flag
367 on left operand, so it can be properly resolved with type of
368 alternatives of right operand.
369 * sem_res.adb (Resolve_Set_Membership): Handle properly an
370 overloaded left-hand side when the alternatives on the right
371 hand side are literals of some universal type. Use first
372 non-overloaded alternative to find expected type.
373
374 2015-03-02 Ed Schonberg <schonberg@adacore.com>
375
376 * exp_ch7.adb (Make_Set_Finalize_Address_Call): Use underlying
377 type to retrieve designated type, because the purported access
378 type may be a partial (private) view, when it is declared in
379 the private part of a nested package, and finalization actions
380 are generated when completing compilation of enclosing unit.
381
382 2015-03-02 Robert Dewar <dewar@adacore.com>
383
384 * back_end.adb (Call_Back_End): Remove previous patch,
385 the back end now gets to see the result of -gnatd.1
386 (Unnest_Subprogram_Mode) processing.
387 * elists.ads, elists.adb (List_Length): New function.
388 * exp_unst.ads, exp_unst.adb: Major changes, first complete version.
389 * sem_util.adb (Check_Nested_Access): Handle formals in
390 Unnest_Subprogram_Mode.
391 (Adjust_Named_Associations): Minor reformatting.
392 * sprint.adb (Sprint_Node_Actual): Fix failure to print aliased
393 for parameters.
394
395 2015-03-02 Robert Dewar <dewar@adacore.com>
396
397 * atree.ads, atree.adb (Uint24): New function
398 (Set_Uint24): New procedure.
399 * atree.h (Uint24): New macro for field access.
400 * back_end.adb (Call_Back_End): For now, don't call back end
401 if unnesting subprogs.
402 * einfo.adb (Activation_Record_Component): New field
403 (Subps_Index): New field.
404 * einfo.ads (Activation_Record_Component): New field
405 (Subps_Index): New field Minor reordering of comments into alpha order.
406 * exp_unst.ads, exp_unst.adb: Continued development.
407
408 2015-03-02 Gary Dismukes <dismukes@adacore.com>
409
410 * exp_disp.ads: Minor reformatting.
411
412 2015-03-02 Ed Schonberg <schonberg@adacore.com>
413
414 * sem_ch8.adb (Chain_Use_Clause): Do not chain use clause from
415 ancestor to list of use clauses active in descendant unit if we
416 are within the private part of an intervening parent, to prevent
417 circularities in use clause list.
418
419 2015-03-02 Javier Miranda <miranda@adacore.com>
420
421 * exp_ch9.adb (Build_Corresponding_Record): Propagate type
422 invariants to the corresponding record type.
423 * exp_disp.ad[sb] (Set_DT_Position_Value): New subprogram
424 which sets the value of the DTC_Entity associated with a given
425 primitive of a tagged type and propagates the value to the
426 wrapped subprogram.
427 (Set_DTC_Entity_Value): Propagate the DTC
428 value to the wrapped entity.
429 * sem_ch13.adb (Build_Invariant_Procedure): Append the code
430 associated with invariants of progenitors.
431 * sem_ch3.adb (Build_Derived_Record_Type): Inherit type invariants
432 of parents and progenitors.
433 (Process_Full_View): Check hidden inheritance of class-wide type
434 invariants.
435 * sem_ch7.adb (Analyze_Package_Specification): Do not generate
436 the invariant procedure for interface types; build the invariant
437 procedure for tagged types inheriting invariants from their
438 progenitors.
439 * sem_prag.adb (Pragma_Invariant) Allow invariants in interface
440 types but do not build their invariant procedure since their
441 invariants will be propagated to the invariant procedure of
442 types covering the interface.
443 * exp_ch6.adb, exp_disp.adb, sem_ch3.adb, sem_ch7.adb,
444 sem_ch8.adb, sem_disp.adb: Replace all calls to Set_DT_Position
445 by calls to Set_DT_Position_Value.
446
447 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
448
449 * sem_attr.adb (Analyze_Attribute): Factor out heavily indented
450 code in Denote_Same_Function. Do not analyze attribute 'Result
451 when it is inside procedure _Postconditions. Remove a misplaced
452 warning diagnostic. Code cleanup.
453 (Denote_Same_Function): New routine.
454 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Code
455 cleanup. Warn on pre/postconditions on an inlined subprogram.
456 (Analyze_Pragma, Refined_Post case): Warn on pre/postconditions on
457 an inlined subprogram.
458 (Analyze_Pre_Post_Condition_In_Decl_Part): Code cleanup. Warn on
459 pre/post condition on an inlined subprogram.
460 (Analyze_Test_Case_In_Decl_Part): Code cleanup. Warn on
461 pre/postconditions on an inlined subprogram.
462 (Check_Postcondition_Use_In_Inlined_Subprogram): New routine.
463
464 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
465
466 * sem_prag.adb (Ensure_Aggregate_Form):
467 Ensure that the name denoted by the Chars of a pragma argument
468 association has the proper Sloc when converted into an aggregate.
469
470 2015-03-02 Bob Duff <duff@adacore.com>
471
472 * sem_ch6.adb (Check_Private_Overriding): Capture
473 Incomplete_Or_Partial_View in a constant. This is cleaner and
474 more efficient.
475
476 2015-03-02 Gary Dismukes <dismukes@adacore.com>
477
478 * einfo.ads, exp_unst.ads: Minor reformatting.
479
480 2015-03-02 Ed Schonberg <schonberg@adacore.com>
481
482 * a-strsea.adb (Find_Token): Ensure that the range of iteration
483 does not perform any improper character access. This prevents
484 erroneous access in the unusual case of an empty string target
485 and a From parameter less than Source'First.
486
487 2015-03-02 Robert Dewar <dewar@adacore.com>
488
489 * elists.adb (List_Length): Fix incorrect result.
490
491 2015-03-02 Bob Duff <duff@adacore.com>
492
493 * sem_ch6.adb (Check_Private_Overriding): Refine the legality
494 checks here. It used to check that the function is merely
495 overriding SOMEthing. Now it checks that the function is
496 overriding a corresponding public operation. This is a correction
497 to the implementation of the rule in RM-3.9.3(10).
498
499 2015-03-02 Robert Dewar <dewar@adacore.com>
500
501 * debug.adb: Document new debug flag -gnatd.1.
502 * einfo.ads, einfo.adb (Has_Nested_Subprogram): New flag.
503 (Has_Uplevel_Reference): New flag (Is_Static_Type): New flag.
504 (Uplevel_Reference_Noted):New flag (Uplevel_References): New field.
505 * elists.ads elists.adb (List_Length): New function.
506 * exp_ch6.adb (Expand_N_Subprogram_Body): Call Unnest_Subprogram
507 when appropriate (Process_Preconditions): Minor code
508 reorganization and reformatting
509 * exp_unst.ads, exp_unst.adb: New files.
510 * gnat1drv.adb (Adjust_Global_Switches): Set
511 Unnest_Subprogram_Mode if -gnatd.1
512 * namet.ads, namet.adb (Name_Find_Str): New version of Name_Find with
513 string argument.
514 * opt.ads (Unnest_Subprogram_Mode): New flag.
515 * par-ch3.adb (P_Identifier_Declarations): Fixes to -gnatd.2 handling.
516 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
517 Has_Nested_Subprogram flag.
518 * sem_ch8.adb (Find_Direct_Name): New calling sequence for
519 Check_Nested_Access.
520 (Find_Selected_Component): Minor comment addition.
521 * sem_util.adb (Check_Nested_Access): New version for use with Exp_Unst.
522 (Note_Possible_Modification): New calling sequence for
523 Check_Nested_Access.
524 * sem_util.ads (Check_Nested_Access): New version for use with Exp_Unst.
525 * gcc-interface/Make-lang.in (GNAT1_OBJS): Add exp_unst.o
526
527 2015-03-02 Pierre-Marie de Rodat <derodat@adacore.com>
528
529 * gcc-interface/utils.c (gnat_pushdecl): For non-artificial pointer
530 types, preserve the original type and create copies just like the C
531 front-end does. For artificial ones, do not define a name for
532 the original type.
533 (create_type_decl): When gnat_pushdecl made the input type the
534 original type for the new declaration, do not define a stub
535 declaration for it.
536 * gcc-interface/utils2.c (build_binary_op): Accept two different
537 pointer types when they point to the same type.
538
539 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
540
541 * exp_util.adb (Possible_Bit_Aligned_Component): Do not process
542 an unanalyzed node.
543 * sem_util.adb (Kill_Current_Values): Do not invalidate and
544 de-null a constant.
545
546 2015-03-02 Robert Dewar <dewar@adacore.com>
547
548 * sem_ch3.adb, exp_attr.adb, checks.adb, exp_aggr.adb: Minor
549 reformatting.
550
551 2015-03-02 Ed Schonberg <schonberg@adacore.com>
552
553 * sem_ch8.adb: extend use of Available_Subtype.
554
555 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
556
557 * sem_prag.adb (Duplication_Error): Remove the special handling
558 of 'Class or _Class in the context of pre/postconditions.
559 (Process_Class_Wide_Condition): Remove the special handling of
560 'Class or _Class in the context of pre/postconditions.
561 * sem_util.adb (Original_Aspect_Pragma_Name): Names Pre_Class
562 and Post_Class no longer need to be converted to _Pre and _Post.
563 * sem_util.ads (Original_Aspect_Pragma_Name): Update the comment
564 on usage.
565
566 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
567
568 * exp_ch6.adb (Process_Preconditions): Modify the
569 mechanism that find the first source declaration to correct exit
570 the loop once it has been found.
571
572 2015-03-02 Gary Dismukes <dismukes@adacore.com>
573
574 * a-strsea.adb: Minor typo fix.
575
576 2015-03-02 Bob Duff <duff@adacore.com>
577
578 * einfo.ads: Minor comment fixes.
579
580 2015-03-02 Gary Dismukes <dismukes@adacore.com>
581
582 * einfo.adb, checks.adb: Minor reformatting and typo fixes.
583
584 2015-03-02 Ed Schonberg <schonberg@adacore.com>
585
586 * exp_aggr.adb (Get_Assoc_Expr): If the Default_Component_Value
587 is defined for the array type, use it instead of a Default_Value
588 specified for the component type itself.
589
590 2015-03-02 Thomas Quinot <quinot@adacore.com>
591
592 * exp_attr.adb (Expand_N_Attribute_Reference, case Input): When
593 expanding a 'Input attribute reference for a class-wide type,
594 do not generate a separate object declaration for the controlling
595 tag dummy object; instead, generate the expression inline in the
596 dispatching call. Otherwise, the declaration (which involves a
597 call to String'Input, returning a dynamically sized value on the
598 secondary stack) will be expanded outside of proper secondary
599 stack mark/release operations, and will thus cause a secondary
600 stack leak.
601
602 2015-03-02 Hristian Kirtchev <kirtchev@adacore.com>
603
604 * checks.adb (Add_Validity_Check): Change the names of all
605 formal parameters to better illustrate their purpose. Update
606 the subprogram documentation. Update all occurrences of the
607 formal parameters. Generate a pre/postcondition pragma by
608 calling Build_Pre_Post_Condition.
609 (Build_PPC_Pragma): Removed.
610 (Build_Pre_Post_Condition): New routine.
611 * einfo.adb Node8 is no longer used as Postcondition_Proc. Node14
612 is now used as Postconditions_Proc. Flag240 is now renamed to
613 Has_Expanded_Contract. (First_Formal): The routine can now
614 operate on generic subprograms.
615 (First_Formal_With_Extras): The routine can now operate on generic
616 subprograms.
617 (Has_Expanded_Contract): New routine.
618 (Has_Postconditions): Removed.
619 (Postcondition_Proc): Removed.
620 (Postconditions_Proc): New routine.
621 (Set_Has_Expanded_Contract): New routine.
622 (Set_Has_Postconditions): Removed.
623 (Set_Postcondition_Proc): Removed.
624 (Set_Postconditions_Proc): New routine.
625 (Write_Entity_Flags): Remove the output of Has_Postconditions. Add
626 the output of Has_Expanded_Contract.
627 (Write_Field8_Name): Remove the output of Postcondition_Proc.
628 (Write_Field14_Name): Add the output of Postconditions_Proc.
629 * einfo.ads New attributes Has_Expanded_Contract and
630 Postconditions_Proc along with occurrences in entities.
631 Remove attributes Has_Postconditions and Postcondition_Proc
632 along with occurrences in entities.
633 (Has_Expanded_Contract): New routine along with pragma Inline.
634 (Has_Postconditions): Removed along with pragma Inline.
635 (Postcondition_Proc): Removed along with pragma Inline.
636 (Postconditions_Proc): New routine along with pragma Inline.
637 (Set_Has_Expanded_Contract): New routine along with pragma Inline.
638 (Set_Has_Postconditions): Removed along with pragma Inline.
639 (Set_Postcondition_Proc): Removed along with pragma Inline.
640 (Set_Postconditions_Proc): New routine along with pragma Inline.
641 * exp_ch6.adb (Add_Return): Code cleanup. Update the
642 generation of the call to the _Postconditions routine of
643 the procedure. (Expand_Non_Function_Return): Reformat the
644 comment on usage. Code cleanup. Update the generation of
645 the call to the _Postconditions routine of the procedure or
646 entry [family].
647 (Expand_Simple_Function_Return): Update the
648 generation of the _Postconditions routine of the function.
649 (Expand_Subprogram_Contract): Reimplemented.
650 * exp_ch6.ads (Expand_Subprogram_Contract): Update the parameter
651 profile along the comment on usage.
652 * exp_ch9.adb (Build_PPC_Wrapper): Code cleanup.
653 (Expand_N_Task_Type_Declaration): Generate pre/postconditions
654 wrapper when the entry [family] has a contract with
655 pre/postconditions.
656 * exp_prag.adb (Expand_Attributes_In_Consequence): New routine.
657 (Expand_Contract_Cases): This routine and its subsidiaries now
658 analyze all generated code.
659 (Expand_Old_In_Consequence): Removed.
660 * sem_attr.adb Add with and use clause for Sem_Prag.
661 (Analyze_Attribute): Reimplment the analysis of attribute 'Result.
662 (Check_Use_In_Test_Case): Use routine Test_Case_Arg to obtain
663 "Ensures".
664 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
665 a generic subprogram.
666 (Analyze_Object_Declaration): Do not create a contract node.
667 (Derive_Subprogram): Do not create a contract node.
668 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Do
669 not create a contract node.
670 (Analyze_Completion_Contract): New routine.
671 (Analyze_Function_Return): Alphabetize.
672 (Analyze_Generic_Subprogram_Body): Alphabetize. Do not create a
673 contract node. Do not copy pre/postconditions to the original
674 generic template.
675 (Analyze_Null_Procedure): Do not create a contract node.
676 (Analyze_Subprogram_Body_Contract): Reimplemented.
677 (Analyze_Subprogram_Body_Helper): Do not mark the enclosing scope
678 as having postconditions. Do not create a contract node. Analyze
679 the subprogram body contract of a body that acts as a compilation
680 unit. Expand the subprogram contract after the declarations have
681 been analyzed.
682 (Analyze_Subprogram_Contract): Reimplemented.
683 (Analyze_Subprogram_Specification): Do not create a contract node.
684 (List_Inherited_Pre_Post_Aspects): Code cleanup.
685 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Update the
686 comment on usage.
687 (Analyze_Subprogram_Contract): Update the
688 parameter profile and the comment on usage.
689 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not create a
690 contract node.
691 (Analyze_Package_Declaration): Do not create a
692 contract node.
693 (Is_Subp_Or_Const_Ref): Ensure that the prefix has an entity.
694 * sem_ch8.adb (Analyze_Subprogram_Renaming): Do not create a
695 contract node.
696 * sem_ch9.adb (Analyze_Entry_Declaration): Do not create a
697 contract node.
698 * sem_ch10.adb (Analyze_Compilation_Unit): Move local variables to
699 their proper section and alphabetize them. Analyze the contract of
700 a [generic] subprogram after all Pragmas_After have been analyzed.
701 (Analyze_Subprogram_Body_Stub_Contract): Alphabetize.
702 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Do not
703 create a contract node.
704 (Analyze_Generic_Subprogram_Declaration):
705 Alphabetize local variables. Do not create a contract
706 node. Do not generate aspects out of pragmas for ASIS.
707 (Analyze_Subprogram_Instantiation): Instantiate
708 the contract of the subprogram. Do not create a
709 contract node. (Instantiate_Contract): New routine.
710 (Instantiate_Subprogram_Body): Alphabetize local variables.
711 (Save_Global_References_In_Aspects): New routine.
712 (Save_References): Do not save the global references found within
713 the aspects of a generic subprogram.
714 * sem_ch12.ads (Save_Global_References_In_Aspects): New routine.
715 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not use
716 Original_Node for establishing linkages.
717 (Insert_Pragma): Insertion in a subprogram body takes precedence over
718 the case where the subprogram body is also a compilation unit.
719 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part): Use
720 Get_Argument to obtain the proper expression. Install the generic
721 formals when the related context is a generic subprogram.
722 (Analyze_Depends_In_Decl_Part): Use Get_Argument to obtain
723 the proper expression. Use Corresponding_Spec_Of to obtain
724 the spec. Install the generic formal when the related context
725 is a generic subprogram.
726 (Analyze_Global_In_Decl_Part): Use Get_Argument to obtain the proper
727 expression. Use Corresponding_Spec_Of to obtain the spec. Install the
728 generic formal when the related context is a generic subprogram.
729 (Analyze_Initial_Condition_In_Decl_Part): Use Get_Argument
730 to obtain the proper expression. Remove the call to
731 Check_SPARK_Aspect_For_ASIS as the analysis is now done
732 automatically.
733 (Analyze_Pragma): Update all occurrences
734 to Original_Aspect_Name. Pragmas Contract_Cases, Depends,
735 Extensions_Visible, Global, Postcondition, Precondition and
736 Test_Case now carry generic templates when the related context
737 is a generic subprogram. The same pragmas are no longer
738 forcefully fully analyzed when the context is a subprogram
739 that acts as a compilation unit. Pragmas Abstract_State,
740 Initial_Condition, Initializes and Refined_State have been clean
741 up. Pragmas Post, Post_Class, Postcondition, Pre, Pre_Class
742 and Precondition now use the same routine for analysis. Pragma
743 Refined_Post does not need to check the use of 'Result or
744 the lack of a post-state in its expression. Reimplement the
745 analysis of pragma Test_Case.
746 (Analyze_Pre_Post_Condition): New routine.
747 (Analyze_Pre_Post_Condition_In_Decl_Part):
748 Reimplemented.
749 (Analyze_Refined_Depends_In_Decl_Part): Use Get_Argument to obtain the
750 proper expression.
751 (Analyze_Refined_Global_In_Decl_Part): Use Get_Argument to obtain
752 the proper expression.
753 (Analyze_Test_Case_In_Decl_Part): Reimplemented.
754 (Check_Pre_Post): Removed.
755 (Check_Precondition_Postcondition): Removed.
756 (Check_SPARK_Aspect_For_ASIS): Removed.
757 (Check_Test_Case): Removed.
758 (Collect_Subprogram_Inputs_Outputs): Use Get_Argument
759 to obtain the proper expression. Use Corresponding_Spec_Of to
760 find the proper spec.
761 (Create_Generic_Template): New routine.
762 (Duplication_Error): New routine.
763 (Expression_Function_Error): New routine.
764 (Find_Related_Subprogram_Or_Body): Moved to the spec
765 of Sem_Prag. Emit precise error messages. Account for cases of
766 rewritten expression functions, generic instantiations, handled
767 sequence of statements and pragmas from aspects.
768 (Get_Argument): New routine.
769 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
770 (Preanalyze_CTC_Args): Removed.
771 (Process_Class_Wide_Condition): New routine.
772 * sem_prag.ads (Analyze_Test_Case_In_Decl_Part): Update
773 the parameter profile along with the comment on usage.
774 (Find_Related_Subprogram_Or_Body): Moved from the body of Sem_Prag.
775 (Make_Aspect_For_PPC_In_Gen_Sub_Decl): Removed.
776 (Test_Case_Arg): New routine.
777 * sem_util.adb Add with and use clauses for Sem_Ch6.
778 (Add_Contract_Item): This routine now creates a contract
779 node the first time an item is added. Remove the duplicate
780 aspect/pragma checks.
781 (Check_Result_And_Post_State): Reimplemented.
782 (Corresponding_Spec_Of): New routine.
783 (Get_Ensures_From_CTC_Pragma): Removed.
784 (Get_Requires_From_CTC_Pragma): Removed.
785 (Has_Significant_Contract): New routine.
786 (Inherit_Subprogram_Contract): Inherit only if the source
787 has a contract.
788 (Install_Generic_Formals): New routine.
789 (Original_Aspect_Name): Removed.
790 (Original_Aspect_Pragma_Name): New routine.
791 * sem_util.ads (Check_Result_And_Post_State): Reimplemented.
792 (Corresponding_Spec_Of): New routine.
793 (Get_Ensures_From_CTC_Pragma): Removed.
794 (Get_Requires_From_CTC_Pragma): Removed.
795 (Has_Significant_Contract): New routine.
796 (Install_Generic_Formals): New routine.
797 (Original_Aspect_Name): Removed.
798 (Original_Aspect_Pragma_Name): New routine.
799 * sem_warn.adb Add with and use clauses for Sem_Prag.
800 (Within_Postcondition): Use Test_Case_Arg to extract "Ensures".
801
802 2015-03-02 Ed Schonberg <schonberg@adacore.com>
803
804 * sem_ch8.adb (Available_Subtype): Optimization in
805 Find_Selected_Component: when safe, use existing subtype of
806 array component, possibly discriminant-dependent, rather than
807 creating new subtype declaration for it. In this fashion different
808 occurrences of the component have the same subtype, rather than
809 just equivalent ones. Simplifies value tracing in GNATProve.
810
811 2015-03-01 Arnaud Charlet <charlet@adacore.com>
812
813 PR ada/65259
814
815 * doc/gnat_ugn/gnat_project_manager.rst,
816 doc/gnat_ugn/platform_specific_information.rst: Remove reference to
817 image, too troublesome with texi format.
818 * gnat_ugn.texi: Regenerate.
819
820 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
821
822 PR libgomp/64625
823 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Remove.
824 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
825 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
826
827 2015-02-23 Thomas Schwinge <thomas@codesourcery.com>
828
829 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8): Fix number of
830 arguments parameter.
831 (DEF_FUNCTION_TYPE_VAR_12): Likewise.
832
833 2015-02-22 Arnaud Charlet <charlet@adacore.com>
834
835 * doc/Makefile: postprocess texinfo files to update @dircategory
836 and update texi files under gcc/ada.
837 * gnat_ugn.texi, gnat_rm.texi: Regenerated.
838
839 2015-02-22 Arnaud Charlet <charlet@adacore.com>
840
841 * doc/gnat_ugn/project-manager-figure.png,
842 doc/gnat_ugn/rtlibrary-structure.png: New.
843
844 2015-02-22 Tom de Vries <tom@codesourcery.com>
845
846 PR ada/65100
847 * gnat-style.texi (@subsection Loop Statements): Replace @noindent by
848 @item, and fix warning '@itemize has text but no @item'.
849
850 2015-02-20 Ed Schonberg <schonberg@adacore.com>
851
852 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Pragma
853 legally applies to an abstract subprogram declaration.
854 * freeze.adb: Minor comment addition.
855
856 2015-02-20 Robert Dewar <dewar@adacore.com>
857
858 * errout.ads: Document replacement of Name_uPre/Post/Type_Invariant.
859 * erroutc.adb (Set_Msg_Str): Replace _xxx.
860 (Pre/Post/Type_Invariant) by xxx'Class.
861 * erroutc.ads (Set_Msg_Str): Replace _xxx.
862 (Pre/Post/Type_Invariant) by xxx'Class.
863 * sem_prag.adb (Fix_Error): Remove special casing of
864 Name_uType_Invariant.
865 (Analyze_Pre_Post_Condition_In_Decl_Part): Remove special casing of
866 Name_uPre and Name_uPost in aspect case (done in Errout now).
867
868 2015-02-20 Robert Dewar <dewar@adacore.com>
869
870 * g-alveop.adb: Minor style fixes.
871
872 2015-02-20 Robert Dewar <dewar@adacore.com>
873
874 * freeze.adb (Warn_Overlay): Guard against blow up with address
875 clause.
876
877 2015-02-20 Bob Duff <duff@adacore.com>
878
879 * exp_attr.adb (May_Be_External_Call): Remove this. There is no need
880 for the compiler to guess whether the call is internal or external --
881 it is always external.
882 (Expand_Access_To_Protected_Op): For P'Access, where P
883 is a protected subprogram, always create a pointer to the
884 External_Subprogram.
885
886 2015-02-20 Robert Dewar <dewar@adacore.com>
887
888 * a-dispat.adb, a-stcoed.ads: Minor reformatting.
889
890 2015-02-20 Robert Dewar <dewar@adacore.com>
891
892 * sem_ch13.adb (Build_Discrete_Static_Predicate): Allow static
893 predicate for non-static subtype.
894 (Build_Predicate_Functions): Do not assume subtype associated with a
895 static predicate must be static.
896
897 2015-02-20 Robert Dewar <dewar@adacore.com>
898
899 * errout.adb (Set_Msg_Node): Better handling of internal names
900 (Set_Msg_Node): Kill message when we cannot eliminate internal name.
901 * errout.ads: Document additional case of message deletion.
902 * namet.adb (Is_Internal_Name): Refined to consider wide
903 strings in brackets notation and character literals not to be
904 internal names.
905 * sem_ch8.adb (Find_Selected_Component): Give additional error
906 when selector name is a subprogram whose first parameter has
907 the same type as the prefix, but that type is untagged.
908
909 2015-02-20 Robert Dewar <dewar@adacore.com>
910
911 * g-allein.ads, g-alveop.adb, g-alveop.ads, opt.ads: Minor reformatting
912
913 2015-02-20 Tristan Gingold <gingold@adacore.com>
914
915 * opt.ads (GNAT_Mode_Config): New variable.
916 * opt.adb (Set_Opt_Config_Switches): Consider GNAT_Mode_Config
917 to set Assertions_Enabled.
918 * switch-c.adb (Scan_Front_End_Switches): Set GNAT_Mode_Config
919 for -gnatg.
920
921 2015-02-20 Robert Dewar <dewar@adacore.com>
922
923 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add an additional
924 comment regarding the handling of unterminated fixed-point
925 constants.
926 * s-valuns.ads (Scan_Raw_Unsigned): Add comments
927 corresponding to those previously added for
928 System.Val_LLU.Scan_Raw_Long_Long_Unsigned.
929
930 2015-02-20 Olivier Hainque <hainque@adacore.com>
931
932 * g-allein.ads, g-alveop.ads, g-alveop.adb: Code clean ups.
933
934 2015-02-20 Robert Dewar <dewar@adacore.com>
935
936 * sem_prag.adb: Minor comment clarification.
937
938 2015-02-20 Olivier Hainque <hainque@adacore.com>
939
940 * g-allein.ads (vec_ctf, vec_vcsfx, vec_vcfux): Remove.
941 * g-alleve.ads, g-alleva.adb (vcfux): Likewise.
942 * g-alveop.ads (vec_vcfsx, vec_vcfux): Just rename the ll versions.
943 (vec_ctf): Now renamings as well.
944
945 2015-02-20 Robert Dewar <dewar@adacore.com>
946
947 * switch-c.adb, bindgen.adb: Minor reformatting.
948
949 2015-02-20 Ed Schonberg <schonberg@adacore.com>
950
951 * sem_prag.adb (Analyze_Pragma, case Type_Invariant):
952 Invariant'class is allowed on an abstract type.
953
954 2015-02-20 Ed Schonberg <schonberg@adacore.com>
955
956 * sem_ch3.adb (Access_Definition): If the access definition is
957 for a protected component and defines an access to protected
958 subprogram, do not create an itype reference for it because a
959 full type declaration will be built in order to generate the
960 proper equivalent type.
961 (Analyze_Subtype_Declaration): Add information of incomplete
962 subtypes, for Ada 2012 extended uses of incomplete types.
963
964 2015-02-20 Gary Dismukes <dismukes@adacore.com>
965
966 * sem_res.adb: Minor reformatting.
967
968 2015-02-20 Vincent Celier <celier@adacore.com>
969
970 * switch-c.adb (Scan_Front_End_Switches): When comparing runtime
971 path name for several switches --RTS, use the normalized path
972 names.
973
974 2015-02-20 Vincent Celier <celier@adacore.com>
975
976 * bindgen.adb: Minor reformatting and code reorganization.
977
978 2015-02-20 Jose Ruiz <ruiz@adacore.com>
979
980 * a-stcoed.ads: Add spec for this package (Unimplemented_Unit).
981 * impunit.adb (Non_Imp_File_Names_12): Mark unit a-stcoed.ads as
982 defined by Ada 2012.
983
984 2015-02-20 Arnaud Charlet <charlet@adacore.com>
985
986 * sysdep.c, expect.c, s-oscons-tmplt.c, gsocket.h, adaint.c: Remove
987 obsolete references to RTX, nucleus, VMS.
988
989 2015-02-20 Ed Schonberg <schonberg@adacore.com>
990
991 * sem_prag.adb (Fix_Error): For an illegal Type_Invariant'Class
992 aspect, use name that mentions Class explicitly, rather than
993 compiler-internal name.
994
995 2015-02-20 Robert Dewar <dewar@adacore.com>
996
997 * debug.adb: Add documentation for -gnatd.2 (allow statements
998 in decl sequences).
999 * par-ch3.adb (P_Identifier_Declarations): Handle
1000 statement appearing where declaration expected more cleanly.
1001 (Statement_When_Declaration_Expected): Implement debug flag
1002 -gnatd.2.
1003
1004 2015-02-20 Jose Ruiz <ruiz@adacore.com>
1005
1006 * a-dinopr.ads: Add spec for this package (Unimplemented_Unit).
1007 * a-dispat.ads (Yield): Include procedure added in Ada 2012.
1008 * a-dispat.adb (Yield): Implement procedure added in Ada 2012.
1009 * impunit.adb (Non_Imp_File_Names_05): Mark unit a-dinopr.ads as
1010 defined by Ada 2005.
1011 * snames.ads-tmpl (Name_Non_Preemptive_FIFO_Within_Priorities):
1012 This is the correct name for the dispatching policy (FIFO was
1013 missing).
1014
1015 2015-02-20 Javier Miranda <miranda@adacore.com>
1016
1017 * sem_res.adb (Resolve_Type_Conversion): If the type of the
1018 operand is the limited-view of a class-wide type then recover
1019 the class-wide type of the non-limited view.
1020
1021 2015-02-20 Arnaud Charlet <charlet@adacore.com>
1022
1023 * gcc-interface/Makefile.in: Remove references to nucleus.
1024 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Procedure): Set
1025 extern_flag to true for Inline_Always subprograms with
1026 Intrinsic convention.
1027
1028 2015-02-20 Yannick Moy <moy@adacore.com>
1029
1030 * sem_prag.ads: Minor typo in comment.
1031
1032 2015-02-20 Pascal Obry <obry@adacore.com>
1033
1034 * s-osprim-mingw.adb: Fix Get_Base_Time parameter mode.
1035
1036 2015-02-20 Vincent Celier <celier@adacore.com>
1037
1038 * makeutl.adb (Get_Directories.Add_Dir): Add a directory only
1039 if it exists.
1040
1041 2015-02-20 Robert Dewar <dewar@adacore.com>
1042
1043 * sem_eval.ads: Minor reformatting.
1044
1045 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1046
1047 * freeze.adb (Size_Known): Do not set the packed size for
1048 independent type or component.
1049 (Freeze_Array_Type): Check for Independent[_Components] with packing
1050 or explicit component size clause.
1051 * gnat1drv.adb (Post_Compilation_Validation_Checks): Do the validation
1052 of independence pragmas only for non-GCC back-ends.
1053 * sem_ch13.adb (Initialize): Likewise for the initialization.
1054 * sem_prag.adb (Record_Independence_Check): New procedure to record an
1055 independence check in the table.
1056 (Analyze_Pragma): Use it throughout instead of doing it manually.
1057 * gcc-interface/decl.c (gnat_to_gnu_field): Add support for
1058 independent type or component.
1059
1060 2015-02-20 Thomas Quinot <quinot@adacore.com>
1061
1062 * adaint.c (__gnat_readdir): For Solaris, use 64 bit variants of
1063 struct direct and readdir. This is required for NFS filesystems
1064 mounted from servers that use 64-bit cookies.
1065
1066 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1067
1068 * sem_ch12.adb (Analyze_Subprogram_Instantiaion): New subprogram
1069 Build_Subprogram_Renaming, to create renaming of subprogram
1070 instance in the the declaration of the wrapper package rather
1071 than in its body, so that it is available for analysis of aspects
1072 propagated from generic to instantiation.
1073 (Check_Mismatch): An actual for a formal package that is an
1074 incomplete type matches a formal type that is incomplete.
1075 (Instantiate_Package_Body): Move code that builds subprogram
1076 renaming to Analyze_Subprogram_Instantiation.
1077 (Instantiate_Type): The generated subtype is a limited view if
1078 the actual is a limited view.
1079 (Load_Parent_Of_Generic): Retrieve instance declaration from
1080 its new position within wrapper package.
1081
1082 2015-02-20 Arnaud Charlet <charlet@adacore.com>
1083
1084 * s-parame-vxworks.adb, s-os_lib.ads: Update comments.
1085
1086 2015-02-20 Robert Dewar <dewar@adacore.com>
1087
1088 * s-osinte-vxworks.ads (To_Timespec): Add comment about the
1089 issue of negative arguments.
1090
1091 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1092
1093 * gnat1drv.adb: Minor consistency fix.
1094
1095 2015-02-20 Pascal Obry <obry@adacore.com>
1096
1097 * s-osprim-mingw.adb (Get_Base_Time): Properly release lock in all
1098 paths.
1099
1100 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1101
1102 * inline.adb (Expand_Inlined_Call): Skip again calls to subprogram
1103 renamings.
1104 * exp_ch6.adb (Expand_Call): Use back-end inlining
1105 instead of expansion for simple subprogram renamings.
1106
1107 2015-02-20 Robert Dewar <dewar@adacore.com>
1108
1109 * exp_util.adb: Minor reformatting.
1110
1111 2015-02-20 Vincent Celier <celier@adacore.com>
1112
1113 * switch-c.adb (Scan_Front_End_Switches): Do not fail when --RTS=
1114 is specified several times with different values that indicates
1115 the same runtime directory.
1116
1117 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1118
1119 * sem_attr.adb (Check_Not_Incomplete_Type): Clean up code to
1120 handle properly illegal uses of attributes on prefixes on an
1121 incomplete type, both when the type of the prefix is locally
1122 incomplete, and when it is a limited view of a type whose
1123 non-limited view is not available.
1124 (Analyze_Attribute): Add calls to Check_Not_Incomplete_Type for
1125 'Address and others.
1126
1127 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1128
1129 * exp_ch6.adb: Fix minor typo in comment.
1130
1131 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1132
1133 * sinfo.ads: Add comment.
1134
1135 2015-02-20 Olivier Hainque <hainque@adacore.com>
1136
1137 * opt.ads: Replace Opt.Suppress_All_Inlining by two separate
1138 flags controlling the actual FE inlining out of pragma Inline
1139 and pragma Inline_Always.
1140 * adabkend.adb (Scan_Compiler_Arguments): Set both flags to True
1141 on -fno-inline, which disables all inlining in compilers with
1142 an Ada back-end and without back-end inlining support.
1143 * back_end.adb (Scan_Back_End_Switches): Set the Inline related
1144 flag to True on -fno-inline and leave Inline_Always alone for
1145 gcc back-ends.
1146 * back_end.ads (Scan_Compiler_Arguments): Adjust spec wrt the
1147 names of the Opt flags it sets.
1148 * gnat1drv.adb (Adjust_Global_Switches): Remove test on
1149 Opt.Suppress_All_Inlining in the Back_End_Inlining computation.
1150 * sem_prag.adb (Make_Inline): Remove early return conditioned
1151 on Opt.Suppress_All_Inlining.
1152 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use the flags to
1153 disable the calls to Build_Body_To_Inline otherwise triggered
1154 by pragma Inline or Inline_Always. This will prevent actual
1155 front-end inlining of the subprogram on calls.
1156
1157 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1158
1159 * exp_ch3.adb (Default_Initialize_Object): Call Add_Inlined_Body on the
1160 Abort_Undefer_Direct function.
1161 * exp_ch5.adb (Expand_N_Assignment_Statement): Likewise.
1162 * exp_intr.adb (Expand_Unc_Deallocation): Likewise.
1163 * exp_prag.adb (Expand_Pragma_Abort_Defer): Likewise.
1164 * exp_ch4.adb (Expand_N_Selected_Component): Adjust call to
1165 Add_Inlined_Body.
1166 * exp_ch6.adb (Expand_Call): Adjust calls to Add_Inlined_Body.
1167 Remove call to Register_Backend_Call and move code resetting
1168 Needs_Debug_Info on inlined subprograms to...
1169 * inline.ads (Add_Inlined_Body): Add N parameter.
1170 (Register_Backend_Call): Delete.
1171 * inline.adb (Add_Inlined_Body): ...here and simplify.
1172 Register the call with Backend_Calls directly.
1173 (Register_Backend_Call): Delete.
1174 * s-stalib.ads (Abort_Undefer_Direct): Restore pragma Inline.
1175
1176 2015-02-20 Eric Botcazou <ebotcazou@adacore.com>
1177
1178 * s-stalib.ads: Fix typo.
1179
1180 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1181
1182 * exp_ch3.adb (Default_Initialize_Object): If the object has a
1183 delayed freeze, the actions associated with default initialization
1184 must be part of the freeze actions, rather that being inserted
1185 directly after the object declaration.
1186
1187 2015-02-20 Robert Dewar <dewar@adacore.com>
1188
1189 * lib-load.adb: Minor comment update.
1190
1191 2015-02-20 Vincent Celier <celier@adacore.com>
1192
1193 * prj-proc.adb (Process_Case_Construction): When there are
1194 incomplete withed projects and the case variable is unknown,
1195 skip the case construction.
1196
1197 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1198
1199 * exp_ch6.adb (Expand_Actuals): Add caller-side invariant checks
1200 when an actual is a view conversion, either because the call is
1201 to an inherited operation, or because the actual is an explicit
1202 type conversion to an ancestor type. Fixes ACATS 4.0D: C732001
1203
1204 2015-02-20 Robert Dewar <dewar@adacore.com>
1205
1206 * einfo.ads: Minor comment updates Fix missing pragma Inline
1207 for Set_Partial_View_Has_Unknown_Discr.
1208 * einfo.adb (Write_Entity_Flags): Add missing entry for
1209 Partial_View_Has_Unknown_Discr.
1210 * sem_ch3.adb: Minor reformatting.
1211
1212 2015-02-20 Vincent Celier <celier@adacore.com>
1213
1214 * opt.ads: Minor cleanup: remove mention of gprmake.
1215 * s-stalib.ads (Abort_Undefer_Direct): Do not inline.
1216 * s-tataat.adb: Do not call System.Tasking.Self but directly
1217 System.Task_Primitives.Operations.Self.
1218
1219 2015-02-20 Arnaud Charlet <charlet@adacore.com>
1220
1221 * gnat_rm.texi, gnat_ugn.texi: Now automatically generated from
1222 sphinx in the doc directory.
1223 * doc: New directory containing sphinx versions of gnat_rm and gnat_ugn
1224
1225 2015-02-20 Robert Dewar <dewar@adacore.com>
1226
1227 * sem_res.adb: Minor reformatting.
1228 * exp_ch9.adb (Build_Protected_Spec): Copy Aliased setting when
1229 building spec.
1230 * sem_ch13.adb (Analyze_Aspect_Specifications): Exclude Boolean
1231 aspects from circuitry setting delay required to false if the
1232 argument is an integer literal.
1233
1234 2015-02-20 Ed Schonberg <schonberg@adacore.com>
1235
1236 * einfo.ads. einfo.adb (Partial_View_Has_Unknown_Discr): New flag
1237 on type entities, to enforce AI12-0133: default initialization
1238 of types whose partial view has unknown discriminants does not
1239 get an invariant check, because clients of the unit can never
1240 declare objects of such types.
1241 * sem_ch3.adb (Find_Type_Name); Set new flag
1242 Partial_View_Has_Unknown_Discr when needed.
1243 * exp_ch3.adb (Expand_N_Object_Declaration): Use flag to suppress
1244 generation of invariant call on default-initialized object.
1245
1246 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
1247
1248 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
1249 if the parameter either is passed by reference or if the alignment
1250 would be lowered.
1251
1252 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
1253
1254 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
1255 detect primitive operations of tagged and untagged types.
1256
1257 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
1258
1259 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
1260 sets in presence of derivation for subprogram types.
1261
1262 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
1263
1264 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
1265 present in the same context as the declaration.
1266
1267 2015-02-07 Jakub Jelinek <jakub@redhat.com>
1268
1269 PR middle-end/64340
1270 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
1271 and optimization_current_node after tweaking global_options.
1272
1273 2015-02-05 Robert Dewar <dewar@adacore.com>
1274
1275 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
1276 prj-nmsc.adb: Minor reformatting.
1277
1278 2015-02-05 Ed Schonberg <schonberg@adacore.com>
1279
1280 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
1281 of a protected type may not be available, so to check conformance
1282 with an interface type, examine the interface list in the type
1283 declaration directly.
1284 (Write_Overloads): Improve information for indirect calls,
1285 for debugger use.
1286
1287 2015-02-05 Ed Schonberg <schonberg@adacore.com>
1288
1289 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
1290 expansion activity in ASIS mode.
1291
1292 2015-02-05 Javier Miranda <miranda@adacore.com>
1293
1294 * errout.adb (Error_Msg_PT): Add missing error.
1295 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
1296 RM rule. Code cleanup.
1297 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
1298 anonymous access types. Found working on the tests. Code cleanup.
1299
1300 2015-02-05 Vincent Celier <celier@adacore.com>
1301
1302 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
1303 when there are incomplete withs.
1304 * prj-nmsc.adb (Process_Naming): Do not try to get the value
1305 of an element when it is nil.
1306 (Check_Naming): Do not check a nil suffix for illegality
1307 * prj-proc.adb (Expression): Do not process an empty term.
1308 * prj-strt.adb (Attribute_Reference): If attribute cannot be
1309 found, parse a possible index to avoid cascading errors.
1310
1311 2015-02-05 Ed Schonberg <schonberg@adacore.com>
1312
1313 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
1314 for an access_to_subprogram declaration is not a derived type.
1315
1316 2015-02-05 Robert Dewar <dewar@adacore.com>
1317
1318 * errout.adb (Error_Msg_Internal): For non-serious error set
1319 Fatal_Error to Ignored.
1320 * lib-load.adb (Load_Unit): Minor comment updates.
1321 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
1322 setting from with'ed unit to with'ing unit.
1323 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
1324 of ambiguity.
1325
1326 2015-02-05 Yannick Moy <moy@adacore.com>
1327
1328 * sem_prag.adb, par-prag.adb: Minor code clean up.
1329
1330 2015-02-05 Yannick Moy <moy@adacore.com>
1331
1332 * par-prag.adb (Pragma_Warnings): Update for extended form
1333 of pragma Warnings. The "one" argument case may now have 2 or
1334 3 arguments.
1335 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
1336 extended form of pragma Warnings. Pragma with tool name is either
1337 rewritten as null or as an equivalent form without tool name,
1338 before reanalysis.
1339 * snames.ads-tmpl (Name_Gnatprove): New name.
1340
1341 2015-02-05 Robert Dewar <dewar@adacore.com>
1342
1343 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
1344 standard Boolean.
1345 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
1346 condition is standard Boolean, it can be non-standard derived
1347 Boolean.
1348
1349 2015-02-05 Robert Dewar <dewar@adacore.com>
1350
1351 * checks.adb (Enable_Range_Check): Disconnect attempted
1352 optimization for the case of range check for subscript of
1353 unconstrained array.
1354
1355 2015-02-05 Robert Dewar <dewar@adacore.com>
1356
1357 * par-ch13.adb (With_Present): New function
1358 (Aspect_Specifications_Present): Handle WHEN in place of WITH
1359 (Get_Aspect_Specifications): Comment update.
1360 * par.adb: Comment updates.
1361
1362 2015-02-05 Robert Dewar <dewar@adacore.com>
1363
1364 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
1365 * frontend.adb (Frontend): New setting of Fatal_Error.
1366 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
1367 Fatal_Error.
1368 (Load_Main_Source): New setting of Fatal_Error
1369 (Load_Unit): New setting of Fatal_Error.
1370 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
1371 Fatal_Error.
1372 (Ensure_System_Dependency): New setting of Fatal_Error.
1373 * lib.adb (Fatal_Error): New setting of Fatal_Error
1374 (Set_Fatal_Error): New setting of Fatal_Error.
1375 * lib.ads: New definition of Fatal_Error and associated routines.
1376 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
1377 * par-load.adb (Load): New setting of Fatal_Error.
1378 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
1379 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
1380 Fatal_Error.
1381 (Optional_Subunit): New setting of Fatal_Error.
1382 (Analyze_Proper_Body): New setting of Fatal_Error.
1383 (Load_Needed_Body): New setting of Fatal_Error.
1384
1385 2015-02-05 Ed Schonberg <schonberg@adacore.com>
1386
1387 * sem_res.adb (Resolve_Call): If the function being called has
1388 out parameters do not check for language version if the function
1389 comes from a predefined unit, as those are always compiled in
1390 Ada 2012 mode.
1391
1392 2015-02-05 Ed Schonberg <schonberg@adacore.com>
1393
1394 * sem_ch3.adb (Process_Full_View): Verify that the full view
1395 of a type extension must carry an explicit limited keyword if
1396 the partial view does (RM 7.3 (10.1)).
1397
1398 2015-02-05 Robert Dewar <dewar@adacore.com>
1399
1400 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
1401 sem_warn.ads: Minor reformatting.
1402 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
1403 deleted by -gnatI.
1404 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
1405 error for abstract type.
1406
1407 2015-02-05 Yannick Moy <moy@adacore.com>
1408
1409 * opt.ads (Warn_On_Suspicious_Contract): Update comment
1410 describing use.
1411 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
1412 suspicious uses of 'Update.
1413 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
1414 function issues warning on suspicious uses of 'Update.
1415 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
1416 package spec and body as SPARK_Mode Off.
1417
1418 2015-02-05 Robert Dewar <dewar@adacore.com>
1419
1420 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
1421 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
1422 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
1423 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
1424 for exported entity.
1425
1426 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
1427
1428 * sem_prag.adb (Check_Pragma_Conformance): Add
1429 local variable Arg. Ensure that all errors are associated with
1430 the pragma if it appears without an argument. Add comments on
1431 various cases.
1432
1433 2015-02-05 Robert Dewar <dewar@adacore.com>
1434
1435 * lib-xref.adb: Minor reformatting.
1436
1437 2015-02-05 Tristan Gingold <gingold@adacore.com>
1438
1439 PR ada/64349da/64349
1440 * env.c: Fix thinko: handle Darwin case before default one.
1441
1442 2015-01-30 Robert Dewar <dewar@adacore.com>
1443
1444 * a-assert.adb: Minor reformatting.
1445 * sem_ch13.adb: Minor comment clarification.
1446 * types.ads: Minor comment update.
1447 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
1448 when we have a predicate that is nothing but an inherited dynamic
1449 predicate.
1450
1451 2015-01-30 Jerome Guitton <guitton@adacore.com>
1452
1453 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
1454 include cert link spec.
1455
1456 2015-01-30 Robert Dewar <dewar@adacore.com>
1457
1458 * einfo.ads: Minor comment fix.
1459 * freeze.adb (Freeze_Profile): Add test for suspicious import
1460 in pure unit.
1461 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
1462 use in Pure unit is now moved to Freeze (to properly catch
1463 Pure_Function exemption).
1464
1465 2015-01-30 Bob Duff <duff@adacore.com>
1466
1467 * sem_res.ads: Minor comment fix.
1468 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
1469 check both operands of an operator.
1470
1471 2015-01-30 Yannick Moy <moy@adacore.com>
1472
1473 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
1474 policy for Pre to Ignore.
1475 (Assert): Add precondition.
1476
1477 2015-01-30 Robert Dewar <dewar@adacore.com>
1478
1479 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
1480 Pure unit.
1481 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
1482 documentation for some special cases of invalid attempts at
1483 based integers.
1484
1485 2015-01-30 Gary Dismukes <dismukes@adacore.com>
1486
1487 * errout.ads: Minor reformatting.
1488
1489 2015-01-30 Yannick Moy <moy@adacore.com>
1490
1491 * inline.adb (Process_Formals): Use the sloc of
1492 the inlined node instead of the sloc of the actual parameter,
1493 when replacing formal parameters by the actual one.
1494
1495 2015-01-30 Arnaud Charlet <charlet@adacore.com>
1496
1497 * g-expect.adb (Get_Command_Output): Use infinite timeout when
1498 calling Expect.
1499
1500 2015-01-30 Ed Schonberg <schonberg@adacore.com>
1501
1502 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
1503 defaulted in an instantiation, add an entry in the list of actuals
1504 to indicate the default value of the formal (as is already done
1505 for defaulted subprograms).
1506
1507 2015-01-30 Javier Miranda <miranda@adacore.com>
1508
1509 * errout.adb (Error_Msg_PT): Minor error phrasing update.
1510
1511 2015-01-30 Robert Dewar <dewar@adacore.com>
1512
1513 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
1514 for object case.
1515
1516 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
1517
1518 * exp_dbug.adb (Get_Encoded_Name): When
1519 -fgnat-encodings=minimal, do not generate names for biased types.
1520
1521 2015-01-30 Tristan Gingold <gingold@adacore.com>
1522
1523 PR ada/64349
1524 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
1525
1526 2015-01-30 Gary Dismukes <dismukes@adacore.com>
1527
1528 * freeze.adb: Minor reformatting.
1529
1530 2015-01-30 Javier Miranda <miranda@adacore.com>
1531
1532 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
1533 improve its documentation.
1534 * errout.adb (Error_Msg_PT): Improve the error message.
1535 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
1536 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
1537 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
1538
1539 2015-01-30 Robert Dewar <dewar@adacore.com>
1540
1541 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
1542 message for False case.
1543
1544 2015-01-30 Doug Rupp <rupp@adacore.com>
1545
1546 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
1547 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
1548 kernel.
1549
1550 2015-01-30 Gary Dismukes <dismukes@adacore.com>
1551
1552 * sem_attr.adb (Declared_Within_Generic_Unit):
1553 New function to test whether an entity is declared within the
1554 declarative region of a given generic unit.
1555 (Resolve_Attribute): For checking legality of subprogram'Access within
1556 a generic unit, call new Boolean function Declared_Within_Generic_Unit
1557 instead of simply comparing the results of Enclosing_Generic_Unit on
1558 the prefix and access type. Correct minor comment typos.
1559
1560 2015-01-30 Robert Dewar <dewar@adacore.com>
1561
1562 * freeze.adb, exp_util.ads: Update comment.
1563 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
1564 * sem_util.adb: Minor: fix typo.
1565
1566 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
1567
1568 * sem_attr.adb (Analyze_Attribute): Ensure that
1569 the check concerning Refined_Post takes precedence over the
1570 other cases.
1571
1572 2015-01-30 Gary Dismukes <dismukes@adacore.com>
1573
1574 * sem_prag.adb: Minor typo fixes and reformatting.
1575
1576 2015-01-30 Yannick Moy <moy@adacore.com>
1577
1578 * sem_attr.adb: Code clean up.
1579
1580 2015-01-30 Robert Dewar <dewar@adacore.com>
1581
1582 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
1583 * ali.ads (Unit_Record): Add new field Serious_Errors.
1584 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
1585 attribute in U line.
1586 * lib-writ.ads: New attribute SE (serious erors) in unit line.
1587
1588 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
1589
1590 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
1591 Lit_Indexes, Scale_Value, Storage_Size_Variable,
1592 String_Literal_Low_Bound along associated routines and
1593 Write_FieldX_Name.
1594 (Pending_Access_Types): New routine.
1595 (Set_Pending_Access_Types): New routine.
1596 (Write_Field15_Name): Add an entry for Pending_Access_Types.
1597 * einfo.ads Add new attribute Pending_Access_Types along
1598 with usage in nodes. Update the usage of attributes
1599 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
1600 Storage_Size_Variable, String_Literal_Low_Bound.
1601 (Pending_Access_Types): New routine along with pragma Inline.
1602 (Set_Pending_Access_Types): New routine along with pragma Inline.
1603 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
1604 Ins_Node. Determine the insertion node for anonynous access type
1605 that acts as a component type of an array. Update the call to
1606 Build_Finalization_Master.
1607 (Expand_Freeze_Record_Type): Update
1608 the calls to Build_Finalization_Master.
1609 (Freeze_Type): Remove
1610 local variable RACW_Seen. Factor out the code that deals with
1611 remote access-to-class-wide types. Create a finalization master
1612 when the designated type contains a private component. Fully
1613 initialize all pending access types.
1614 (Process_RACW_Types): New routine.
1615 (Process_Pending_Access_Types): New routine.
1616 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
1617 needs to set primitive Finalize_Address.
1618 (Expand_N_Allocator): Allocation no longer sets primitive
1619 Finalize_Address.
1620 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
1621 Update the call to Build_Finalization_Master.
1622 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
1623 needs to set primitive Finalize_Address.
1624 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
1625 (Build_Finalization_Master): New parameter profile. Associate
1626 primitive Finalize_Address with the finalization master if the
1627 designated type has been frozen, otherwise treat the access
1628 type as pending. Simplify the insertion of the master and
1629 related initialization code.
1630 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
1631 abstract types.
1632 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
1633 Simplify the implementation.
1634 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
1635 along with comment on usage.
1636 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
1637 the comment on usage.
1638 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
1639 Finalize_Address to retrieve the primitive.
1640 (Finalize_Address): New routine.
1641 (Find_Finalize_Address): Removed.
1642 * exp_util.ads (Finalize_Address): New routine.
1643 * freeze.adb (Freeze_All): Remove the generation of finalization
1644 masters.
1645 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
1646 pending access types from the partial to the full view.
1647
1648 2015-01-30 Robert Dewar <dewar@adacore.com>
1649
1650 * sem_disp.adb: Minor reformatting.
1651 * sem_disp.ads: Documentation update.
1652
1653 2015-01-30 Ed Schonberg <schonberg@adacore.com>
1654
1655 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
1656 or a function call, return True if type is class-wide.
1657 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
1658 Apply RM 4.5.7 (17/3): all or none of the dependent expression
1659 of a conditional expression must be dynamically tagged.
1660
1661 2015-01-30 Ed Schonberg <schonberg@adacore.com>
1662
1663 * sem_ch6.adb (Analyze_Function_Return): In an extended return
1664 statement, apply accessibility check to result object when there
1665 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
1666
1667 2015-01-30 Robert Dewar <dewar@adacore.com>
1668
1669 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
1670 Boolean for case where ELSE is omitted.
1671 * sem_res.adb: Minor reformatting.
1672
1673 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
1674
1675 Fix build under cygwin/64.
1676 * adaint.h: Add check for __CYGWIN__.
1677 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
1678
1679 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1680
1681 PR ada/64640
1682 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
1683 * mingw32.h: Don't include <tchar.h> under cygwin.
1684 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
1685
1686 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
1687
1688 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
1689 (DEF_FUNCTION_TYPE_VAR_12): New macros.
1690
1691 2015-01-09 Michael Collison <michael.collison@linaro.org>
1692
1693 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
1694 vec.h, double-int.h, input.h, alias.h, symtab.h,
1695 fold-const.h, wide-int.h, and inchash.h due to
1696 flattening of tree.h.
1697 * gcc-interface/decl.c: Ditto.
1698 * gcc-interface/misc.c: Ditto.
1699 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
1700 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
1701 fold-const.h, wide-int.h, and inchash.h due to
1702 flattening of tree.h.
1703 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
1704 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
1705 fold-const.h, wide-int.h, inchash.h due to
1706 flattening of tree.h.
1707 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
1708 vec.h, double-int.h, input.h, alias.h, symtab.h,
1709 fold-const.h, wide-int.h, and inchash.h due to
1710 flattening of tree.h.
1711 * gcc-interface/utils2.c: Ditto.
1712
1713 2015-01-07 Robert Dewar <dewar@adacore.com>
1714
1715 * sem_warn.adb (Check_One_Unit): Don't give unused entities
1716 warning for a package which is used as a generic parameter.
1717
1718 2015-01-07 Bob Duff <duff@adacore.com>
1719
1720 * usage.adb (Usage): Correct documentation of
1721 -gnatw.f switches.
1722
1723 2015-01-07 Robert Dewar <dewar@adacore.com>
1724
1725 * s-fileio.adb: Minor reformatting.
1726
1727 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1728
1729 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
1730 access to subprogram, replace its formals with new entities when
1731 building the object declaration, both if actual is present and
1732 when it is defaulted.
1733
1734 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1735
1736 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
1737 conversion and type of expression has invariant, apply invariant
1738 check on expression.
1739
1740 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1741
1742 * sem_ch3.adb (Create_Constrained_Components): A call to
1743 Gather_Components may detect an error if an inherited discriminant
1744 that controls a variant is non-static.
1745 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
1746 Gather_Components may report an error if an inherited discriminant
1747 in a variant in non-static.
1748 * sem_util.adb (Gather_Components): If a non-static discriminant
1749 is inherited do not report error here, but let caller handle it.
1750 (Find_Actual): Small optimization.
1751
1752 2015-01-07 Bob Duff <duff@adacore.com>
1753
1754 * usage.adb (Usage): Document -gnatw.f switch.
1755
1756 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1757
1758 * sem_ch12.adb: Code clean up and minor reformatting.
1759
1760 2015-01-07 Robert Dewar <dewar@adacore.com>
1761
1762 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
1763 Raise_Accessibility_Error call.
1764 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
1765 on handling of invalid digits in based constants.
1766 * s-fatgen.ads: Minor reformatting.
1767 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
1768 Avoid noting bogus modification for Valid test.
1769 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
1770 * einfo.ads: Minor reformatting.
1771 * sem_warn.adb: Minor comment clarification.
1772 * sem_ch12.adb: Minor reformatting.
1773
1774 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1775
1776 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
1777 over static predicates when the loop parameter specification
1778 carries a Reverse indicator.
1779
1780 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1781
1782 * sem_ch12.adb (Instantiate_Object): If formal has a default,
1783 actual is missing and formal has an anonymous access type, copy
1784 access definition in full so that tree for instance is properly
1785 formatted for ASIS use.
1786
1787 2015-01-07 Bob Duff <duff@adacore.com>
1788
1789 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
1790 for P'Access, where P is a subprogram in the same package as
1791 the P'Access, and the P'Access is evaluated at elaboration
1792 time, and occurs before the body of P. For example, "X : T :=
1793 P'Access;" would allow a subsequent call to X.all to be an
1794 access-before-elaboration error; hence the warning. This warning
1795 is enabled by the -gnatw.f switch.
1796 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
1797 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
1798 * gnat_ugn.texi: Document the new warning.
1799
1800 2015-01-07 Johannes Kanig <kanig@adacore.com>
1801
1802 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
1803 cross ref files.
1804
1805 2015-01-07 Robert Dewar <dewar@adacore.com>
1806
1807 * s-taprop-linux.adb, clean.adb: Minor reformatting.
1808
1809 2015-01-07 Arnaud Charlet <charlet@adacore.com>
1810
1811 * s-tassta.adb: Relax some overzealous assertions.
1812
1813 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1814
1815 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
1816 view of a type is legal when context is a thunk generated for
1817 operation inherited from an interface.
1818 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
1819 a thunk and return type is an incomplete type do not continue
1820 expansion; thunk will be fully elaborated when generating code.
1821
1822 2015-01-07 Doug Rupp <rupp@adacore.com>
1823
1824 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
1825 (QueryPerformanceFrequency): New imported procedure.
1826 * s-taprop-mingw.adb (RT_Resolution): Call above and return
1827 resolution vice a hardcoded value.
1828 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
1829 resolution vice a hardcoded value.
1830 * s-linux-android.ads (clockid_t): New subtype.
1831 * s-osinte-aix.ads (clock_getres): New imported subprogram.
1832 * s-osinte-android.ads (clock_getres): Likewise.
1833 * s-osinte-freebsd.ads (clock_getres): Likewise.
1834 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
1835 * s-osinte-darwin.ads (clock_getres): New subprogram.
1836 * s-osinte-darwin.adb (clock_getres): New subprogram.
1837 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
1838 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
1839 calculate resolution vice hard coded value.
1840
1841 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1842
1843 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
1844 limited view, use non-limited view when available to create
1845 equivalent record type.
1846
1847 2015-01-07 Vincent Celier <celier@adacore.com>
1848
1849 * gnatcmd.adb: Remove command Sync and any data and processing
1850 related to this command. Remove project processing for gnatstack.
1851 * prj-attr.adb: Remove package Synchonize and its attributes.
1852
1853 2015-01-07 Vincent Celier <celier@adacore.com>
1854
1855 * clean.adb: Minor error message change.
1856
1857 2015-01-07 Tristan Gingold <gingold@adacore.com>
1858
1859 PR ada/64349
1860 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
1861
1862 2015-01-07 Javier Miranda <miranda@adacore.com>
1863
1864 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
1865 protect the frontend against never ending recursion caused by
1866 circularities in the sources.
1867
1868 2015-01-07 Robert Dewar <dewar@adacore.com>
1869
1870 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
1871 exp_ch3.adb: Minor reformatting.
1872
1873 2015-01-07 Doug Rupp <rupp@adacore.com>
1874
1875 * s-linux.ads (clockid_t): New subtype.
1876 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
1877 (clockid_t): New subtype.
1878 (clock_getres): Import system call.
1879 * s-taprop-linux.adb (System.OS_Constants): With and rename.
1880 (RT_Resolution): Remove
1881 hardcoded value and call clock_getres.
1882 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
1883 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
1884
1885 2015-01-07 Robert Dewar <dewar@adacore.com>
1886
1887 * sem_warn.adb (Check_One_Unit): Guard against context item
1888 with no Entity field.
1889
1890 2015-01-07 Vincent Celier <celier@adacore.com>
1891
1892 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
1893 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
1894
1895 2015-01-07 Vincent Celier <celier@adacore.com>
1896
1897 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
1898 errors/warnings in the first parsing of the project files,
1899 to display the warnings when there is no errors.
1900
1901 2015-01-07 Tristan Gingold <gingold@adacore.com>
1902
1903 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
1904
1905 2015-01-07 Doug Rupp <rupp@adacore.com>
1906
1907 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
1908 value from Int_Lock as parameter to Int_Unlock.
1909 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
1910 * s-vxwext.ads (Int_Unlock): Likewise.
1911 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
1912 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
1913 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
1914 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
1915
1916 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
1917
1918 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
1919 keep ___XP suffixes
1920
1921 2015-01-07 Tristan Gingold <gingold@adacore.com>
1922
1923 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
1924 handle overlap.
1925
1926 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
1927
1928 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
1929 automatically set No_Strict_Aliasing on access types.
1930 * fe.h (No_Strict_Aliasing_CP): Declare.
1931 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
1932 No_Strict_Aliasing_CP is set.
1933
1934 2015-01-07 Johannes Kanig <kanig@adacore.com>
1935
1936 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
1937 not build function wrapper in gnatprove mode when the package
1938 is externally axiomatized.
1939
1940 2015-01-07 Jose Ruiz <ruiz@adacore.com>
1941
1942 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
1943 intermediate computations when the parameters have different signs.
1944
1945 2015-01-07 Javier Miranda <miranda@adacore.com>
1946
1947 * exp_ch3.adb (Build_Init_Procedure): For derived types,
1948 improve the code which takes care of identifying and moving to
1949 the beginning of the init-proc the call to the init-proc of the
1950 parent type.
1951
1952 2015-01-07 Olivier Hainque <hainque@adacore.com>
1953
1954 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
1955 Elaborate the expression as part of the same stmt group as the actions.
1956
1957 2015-01-07 Robert Dewar <dewar@adacore.com>
1958
1959 * sem_ch3.adb: Minor error message change.
1960
1961 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1962
1963 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
1964 Following AI05-028, the pragam applies legally to any composite type.
1965
1966 2015-01-07 Arnaud Charlet <charlet@adacore.com>
1967
1968 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
1969 (sigwait, sigwaitinfo): Removed, not needed after all on any
1970 VxWorks configurations.
1971
1972 2015-01-07 Robert Dewar <dewar@adacore.com>
1973
1974 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
1975
1976 2015-01-07 Javier Miranda <miranda@adacore.com>
1977
1978 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
1979 generation of accessibility check.
1980
1981 2015-01-07 Ed Schonberg <schonberg@adacore.com>
1982
1983 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
1984 illegal completion from a class- wide type, set etype of the
1985 derived type properly to prevent cascaded errors.
1986
1987 2015-01-07 Robert Dewar <dewar@adacore.com>
1988
1989 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
1990 reformatting.
1991
1992 2015-01-07 Robert Dewar <dewar@adacore.com>
1993
1994 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
1995 New procedure.
1996 (OK_No_Use_Of_Entity_Name): New function.
1997 (Set_Restriction_No_Use_Of_Entity): New procedure.
1998 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
1999 New procedure.
2000 (OK_No_Use_Of_Entity_Name): New function.
2001 (Set_Restriction_No_Use_Of_Entity): New procedure.
2002 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
2003 No_Use_Of_Entity.
2004 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2005 Add processing for new restriction No_Use_Of_Entity.
2006
2007 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
2008
2009 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
2010 component type as to Has_Atomic_Components type. Remove useless
2011 test on Is_Aliased component type.
2012
2013 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
2014
2015 * alloc.ads Alphabetize several declarations. Add constants
2016 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
2017 * atree.adb Add with and use clauses for Opt.
2018 (Allocate_Initialize_Node): Mark a node as ignored Ghost
2019 if it is created in an ignored Ghost region.
2020 (Ekind_In): New variant.
2021 (Is_Ignored_Ghost_Node): New routine.
2022 (Set_Is_Ignored_Ghost_Node): New routine.
2023 * atree.adb Aplhabetize several subprograms declarations. Flag
2024 Spare0 is now known as Is_Ignored_Ghost_Node.
2025 (Ekind_In): New variant.
2026 (Is_Ignored_Ghost_Node): New routine.
2027 (Set_Is_Ignored_Ghost_Node): New routine.
2028 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
2029 (Contains_Ignored_Ghost_Code): New routine.
2030 (Set_Contains_Ignored_Ghost_Code): New routine.
2031 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
2032 It is now possible to set this property on an unanalyzed entity.
2033 (Write_Entity_Flags): Output the status of flag
2034 Contains_Ignored_Ghost_Code.
2035 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
2036 usage in nodes.
2037 (Contains_Ignored_Ghost_Code): New routine
2038 along with pragma Inline.
2039 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
2040 * exp_ch3.adb Add with and use clauses for Ghost.
2041 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
2042 Set the Ghost_Mode in effect.
2043 (Restore_Globals): New routine.
2044 * exp_ch7.adb (Process_Declarations): Do not process a context
2045 that invoves an ignored Ghost entity.
2046 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
2047 construct that has been rewritten as a null statement.
2048 * exp_disp.adb Add with and use clauses for Ghost.
2049 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
2050 the Ghost_Mode in effect.
2051 (Restore_Globals): New routine.
2052 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
2053 does not require any clean up. Add two missing cases that deal
2054 with block statements.
2055 * freeze.adb Add with and use clauses for Ghost.
2056 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
2057 Set the Ghost_Mode in effect.
2058 (Restore_Globals): New routine.
2059 * frontend.adb Add with and use clauses for Ghost. Remove any
2060 ignored Ghost code from all units that qualify.
2061 * ghost.adb New unit.
2062 * ghost.ads New unit.
2063 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
2064 the table in package Ghost.
2065 * lib.ads: Alphabetize several subprogram declarations.
2066 * lib-xref.adb (Output_References): Do not generate reference
2067 information for ignored Ghost entities.
2068 * opt.ads Add new type Ghost_Mode_Type and new global variable
2069 Ghost_Mode.
2070 * rtsfind.adb (Load_RTU): Provide a clean environment when
2071 loading a runtime unit.
2072 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
2073 entry/exit as the node may set a different mode.
2074 (Do_Analyze):
2075 Capture/restore the value of Ghost_Mode on entry/exit as the
2076 unit may be withed from a unit with a different Ghost mode.
2077 * sem_ch3.adb Add with and use clauses for Ghost.
2078 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
2079 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
2080 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
2081 the entity as Ghost when there is a Ghost_Mode in effect.
2082 (Array_Type_Declaration): The implicit base type inherits the
2083 "ghostness" from the array type.
2084 (Derive_Subprogram): The
2085 alias inherits the "ghostness" from the parent subprogram.
2086 (Make_Implicit_Base): The implicit base type inherits the
2087 "ghostness" from the parent type.
2088 * sem_ch5.adb Add with and use clauses for Ghost.
2089 (Analyze_Assignment): Set the Ghost_Mode in effect.
2090 * sem_ch6.adb Add with and use clauses for Ghost.
2091 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
2092 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
2093 Set the Ghost_Mode in effect. Mark the entity as Ghost when
2094 there is a Ghost_Mode in effect.
2095 * sem_ch7.adb Add with and use clauses for Ghost.
2096 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
2097 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
2098 effect. Mark the entity as Ghost when there is a Ghost_Mode
2099 in effect.
2100 * sem_ch8.adb Add with and use clauses for Ghost.
2101 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
2102 Analyze_Object_Renaming, Analyze_Package_Renaming,
2103 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
2104 the entity as Ghost when there is a Ghost_Mode in effect.
2105 (Find_Type): Check the Ghost context of a type.
2106 * sem_ch11.adb Add with and use clauses for Ghost.
2107 (Analyze_Exception_Declaration): Set the Ghost_Mode in
2108 effect. Mark the entity as Ghost when there is a Ghost_Mode
2109 in effect.
2110 * sem_ch12.adb Add with and use clauses for Ghost.
2111 (Analyze_Generic_Package_Declaration,
2112 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
2113 Mark the entity as Ghost when there is a Ghost_Mode in effect.
2114 * sem_prag.adb Add with and use clauses for Ghost.
2115 (Analyze_Pragma): Ghost-related checks are triggered when there
2116 is a Ghost mode in effect.
2117 (Create_Abstract_State): Mark the
2118 entity as Ghost when there is a Ghost_Mode in effect.
2119 * sem_res.adb Add with and use clauses for Ghost.
2120 (Check_Ghost_Context): Removed.
2121 * sem_util.adb (Check_Ghost_Completion): Removed.
2122 (Check_Ghost_Derivation): Removed.
2123 (Incomplete_Or_Partial_View):
2124 Add a guard in case the entity has not been analyzed yet
2125 and does carry a scope.
2126 (Is_Declaration): New routine.
2127 (Is_Ghost_Entity): Removed.
2128 (Is_Ghost_Statement_Or_Pragma):
2129 Removed.
2130 (Is_Subject_To_Ghost): Removed.
2131 (Set_Is_Ghost_Entity):
2132 Removed.
2133 (Within_Ghost_Scope): Removed.
2134 * sem_util.adb (Check_Ghost_Completion): Removed.
2135 (Check_Ghost_Derivation): Removed.
2136 (Is_Declaration): New routine.
2137 (Is_Ghost_Entity): Removed.
2138 (Is_Ghost_Statement_Or_Pragma): Removed.
2139 (Is_Subject_To_Ghost): Removed.
2140 (Set_Is_Ghost_Entity): Removed.
2141 (Within_Ghost_Scope): Removed.
2142 * sinfo.ads Add a section on Ghost mode.
2143 * treepr.adb (Print_Header_Flag): New routine.
2144 (Print_Node_Header): Factor out code. Output flag
2145 Is_Ignored_Ghost_Node.
2146 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
2147
2148 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
2149
2150 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
2151 true test and unreachable 'else' arm.
2152
2153 2015-01-06 Vincent Celier <celier@adacore.com>
2154
2155 * prj-conf.adb (Check_Target): Improve error message when
2156 there are mismatched targets between the on in the configuration
2157 project file and the specified one, either in the main project
2158 file or in the --target= switch.
2159
2160 2015-01-06 Pascal Obry <obry@adacore.com>
2161
2162 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
2163 Install_Name attribute definitions.
2164
2165 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2166
2167 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
2168 generated Import pragma for the internal imported procedure does
2169 not come from an aspect, so that Is_Imported can be properly
2170 set for it.
2171
2172 2015-01-06 Gary Dismukes <dismukes@adacore.com>
2173
2174 * sem_ch12.adb (Might_Inline_Subp): Record whether
2175 any subprograms in the generic package are marked with
2176 pragma Inline_Always (setting flag Has_Inline_Always).
2177 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
2178 alongside existing test of Front_End_Inlining as alternative
2179 conditions for setting Inline_Now. Also add test of
2180 Has_Inline_Always along with Front_End_Inlining test as an
2181 alternative condition for setting Needs_Body to False.
2182
2183 2015-01-06 Tristan Gingold <gingold@adacore.com>
2184
2185 * i-cpoint.adb (Copy_Array): Handle overlap.
2186
2187 2015-01-06 Pascal Obry <obry@adacore.com>
2188
2189 * bindgen.adb: Minor style fix.
2190
2191 2015-01-06 Robert Dewar <dewar@adacore.com>
2192
2193 * sem_util.ads, sem_util.adb: Minor reformatting.
2194
2195 2015-01-06 Vincent Celier <celier@adacore.com>
2196
2197 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
2198 with flags before parsing the projects.
2199 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
2200 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
2201 to True in the flags, when Ignore_Missing_With is True and an
2202 imported project cannot be found.
2203 * prj-proc.adb (Expression): When there are incomplete withs and
2204 a variable or attribute is not found, set the variable/attribute
2205 to unknown.
2206 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
2207 defaulted to False.
2208
2209 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
2210
2211 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
2212 prj-err.adb: Add new switch --no-command-line.
2213
2214 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2215
2216 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
2217
2218 2015-01-06 Robert Dewar <dewar@adacore.com>
2219
2220 * sem_ch11.adb: Minor reformatting.
2221
2222 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2223
2224 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
2225 Build_Array_Aggr_Code, used to initialized components covered
2226 by a box association. If the component type is scalar and has
2227 a default aspect, use it to initialize such components.
2228
2229 2015-01-06 Pascal Obry <obry@adacore.com>
2230
2231 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
2232 control the setup of the exception handler.
2233 * initialize.c: Remove unused declaration.
2234 * bindgen.adb: Always call __gnat_runtime_initialize and pass
2235 whether the exeception handler must be set or not.
2236
2237 2015-01-06 Thomas Quinot <quinot@adacore.com>
2238
2239 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
2240 order to native from default, make sure to also adjust bit order.
2241 * exp_aggr.adb: Minor reformatting.
2242
2243 2015-01-06 Robert Dewar <dewar@adacore.com>
2244
2245 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
2246 s-valrea.adb, s-valrea.ads: Add some additional guards for
2247 Str'Last = Positive'Last.
2248
2249 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2250
2251 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
2252 subprograms.
2253
2254 2015-01-06 Javier Miranda <miranda@adacore.com>
2255
2256 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
2257
2258 2015-01-06 Thomas Quinot <quinot@adacore.com>
2259
2260 * sem_util.ads: Minor reformatting.
2261 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
2262 (In_RCI_Declaration) Return to old name, as proper checking of
2263 entity being in the visible part depends on entity kind and must
2264 be done by the caller.
2265
2266 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2267
2268 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
2269 for operators in SPARK.
2270
2271 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2272
2273 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
2274 expression in an others association before making copies for
2275 separate resolution and accessibility checks. This ensures that
2276 the type of the expression is available to ASIS in all cases,
2277 in particular if the expression is itself an aggregate.
2278
2279 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
2280
2281 * einfo.ads (Has_Independent_Components): Document extended
2282 usage.
2283 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
2284 (Set_Has_Independent_Components): Adjust assertion.
2285 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
2286 for pragma Atomic_Components. Set Has_Independent_Components
2287 on the object instead of the type for an object declaration with
2288 pragma Independent_Components.
2289
2290 2015-01-06 Olivier Hainque <hainque@adacore.com>
2291
2292 * set_targ.adb (Read_Target_Dependent_Values): Set
2293 Long_Double_Index when "long double" is read.
2294 (elaboration code): Register_Back_End_Types only when not reading from
2295 config files. Doing otherwise is pointless and error prone.
2296
2297 2015-01-06 Robert Dewar <dewar@adacore.com>
2298
2299 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
2300
2301 2015-01-06 Robert Dewar <dewar@adacore.com>
2302
2303 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
2304 Str'Last = Positive'Last.
2305
2306 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2307
2308 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
2309 where the non-limited type is a generic actual and appears as
2310 a subtype of the non-limited view of the other.
2311 * freeze.adb (Build_Renamed_Body): If the return type of the
2312 declaration that is being completed is a limited view and the
2313 non-limited view is available, use it in the specification of
2314 the generated body.
2315
2316 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2317
2318 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
2319 incomplete view, the type of the classwide type common to both
2320 views is the type being declared.
2321
2322 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
2323
2324 * einfo.ads (Is_Independent): Further document extended usage.
2325
2326 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
2327
2328 * einfo.ads (Is_Independent): Document extended usage.
2329 * einfo.adb (Is_Independent): Remove obsolete assertion.
2330 (Set_Is_Independent): Likewise.
2331 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
2332 (Process_Atomic_Independent_Shared_Volatile): ...this.
2333 Deal with pragma Independent here.
2334 (Analyze_Pragma): Adjust
2335 to above renaming and also invoke it for pragma Independent.
2336 Adjust comment for Independent_Components.
2337
2338 2015-01-06 Robert Dewar <dewar@adacore.com>
2339
2340 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
2341 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
2342
2343 2015-01-06 Robert Dewar <dewar@adacore.com>
2344
2345 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
2346 = Positive'Last.
2347 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
2348 Str'Last = Positive'Last.
2349
2350 2015-01-06 Robert Dewar <dewar@adacore.com>
2351
2352 * sem_prag.adb (Process_Inline): Remove redundant construct
2353 warning (-gnatw.r) for an ineffective pragma Inline.
2354
2355 2015-01-06 Robert Dewar <dewar@adacore.com>
2356
2357 * s-valint.adb: Fix typo in last checkin.
2358 * s-valuns.adb (Value_Unsigned): More efficient fix for
2359 Positive'Last case.
2360 * sem_attr.adb (Analyze_Attribute): Minor reformatting
2361 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
2362
2363 2015-01-06 Robert Dewar <dewar@adacore.com>
2364
2365 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
2366 Str'Last = Positive'Last
2367
2368 2015-01-06 Thomas Quinot <quinot@adacore.com>
2369
2370 * xoscons.adb: Display exception information and return non-zero
2371 exit status in top level exception handler.
2372
2373 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2374
2375 * sem_ch8.adb: Code clean up.
2376
2377 2015-01-06 Tristan Gingold <gingold@adacore.com>
2378
2379 * targparm.ads: Remove obsolete comment.
2380
2381 2015-01-06 Olivier Hainque <hainque@adacore.com>
2382
2383 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
2384 constructing a ref to variable, update inner_const_flag from the
2385 variable TREE_READONLY attribute.
2386 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
2387 definition.
2388 (get_target_float_size): Remove.
2389 (get_target_double_size): Remove.
2390 (get_target_long_double_size): Remove.
2391
2392 2015-01-06 Pascal Obry <obry@adacore.com>
2393
2394 * adaint.c (ProcListEvt): Set to NULL.
2395 * rtinit.c: New file.
2396 (__gnat_rt_init_count): New reference counter set to 0.
2397 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
2398 this code is actually needed for the runtime initialization. This
2399 routine returns immediately if the initialization has already been done.
2400 * final.c: Revert previous change.
2401 * rtfinal.c: New file.
2402 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
2403 section and event. The default version of this routine is empty (except
2404 for the reference counting code). This routine returns immediately if
2405 some others libraries are referencing the runtime.
2406 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
2407 remove circuitry to initialize the signal handler as this is
2408 now done by the runtime initialization routine.
2409 (Gen_Adafinal): Generate call to Runtime_Finalize.
2410 * gnat_ugn.texi: Update documentation about concurrency and
2411 initialization/finalization of the run-time.
2412 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
2413 references to rtfinal.o and rtinit.o
2414
2415 2015-01-06 Robert Dewar <dewar@adacore.com>
2416
2417 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
2418 for Enum_Image.
2419 * sem_attr.adb: Implement Enum_Image attribute.
2420 * snames.ads-tmpl: Add entries for Enum_Image attribute.
2421
2422 2015-01-06 Robert Dewar <dewar@adacore.com>
2423
2424 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
2425 * restrict.ads (No_Use_Of_Entity): New table.
2426 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2427 Ignore No_Use_Of_Entity (will be processed in parser).
2428 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
2429
2430 2015-01-06 Vincent Celier <celier@adacore.com>
2431
2432 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
2433 to check for an extended project, if a project does not have
2434 yet a project declaration.
2435
2436 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
2437
2438 * scos.ads: Update documentation about the SCO table build
2439 process and about table records format.
2440 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
2441 (SCO_Record_Filtered): New procedure.
2442 (Set_SCO_Logical_Operator): New procedure.
2443 (dsco): Update documentation.
2444 * par_sco.adb: Update library-level comments.
2445 (SCO_Generation_State_Type): New type.
2446 (SCO_Generation_State): New variable.
2447 (SCO_Raw_Table): New package instanciation.
2448 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
2449 ("<"): New.
2450 (Tristate): New type.
2451 (Is_Logical_Operator): Return Tristate and update documentation.
2452 (Has_Decision): Update call to Is_Logical_Operator and complete
2453 documentation.
2454 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
2455 comment, add an assertion for state checking and change
2456 references to SCO_Table into SCO_Raw_Table.
2457 (dsco): Refactor to dump the raw and the filtered tables.
2458 (Process_Decisions.Output_Decision_Operand): Handle putative
2459 short-circuit operators.
2460 (Process_Decisions.Output_Element): Update references
2461 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
2462 (Process_Decisions.Process_Decision_Operand): Update call
2463 to Is_Logical_Operator.
2464 (Process_Decisions.Process_Node): Handle putative short-circuit
2465 operators and change references to
2466 SCO_Table into SCO_Raw_Table.
2467 (SCO_Output): Add an assertion
2468 for state checking and remove code that used to stamp out SCO entries.
2469 (SCO_Pragma_Disabled): Change reference to SCO_Table
2470 into SCO_Raw_Table.
2471 (SCO_Record): Rename to SCO_Record_Raw,
2472 add an assertion for state checking and change references
2473 to SCO_Table into SCO_Raw_Table.
2474 (Set_SCO_Condition): Add an assertion for state checking, update
2475 references to Condition_Pragma_Hash_Table and change references to
2476 SCO_Table into SCO_Raw_Table.
2477 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
2478 change references to SCO_Table into SCO_Raw_Table.
2479 (Set_SCO_Logical_Operator): New procedure.
2480 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
2481 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
2482 (SCO_Record_Fildered): New procedure.
2483 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
2484 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
2485 output SCOs.
2486 * par-load.adb (Load): Update reference to SCO_Record.
2487 * par.adb (Par): Update reference to SCO_Record.
2488 * put_scos.adb (Put_SCOs): Add an assertion to check that no
2489 putative SCO condition reaches this end.
2490 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
2491 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
2492 when corresponding to an "and"/"or" operator affected by the
2493 Short_Circuit_And_Or pragma.
2494
2495 2015-01-06 Robert Dewar <dewar@adacore.com>
2496
2497 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
2498 msg for attempted USE of generic subprogram or subprogram.
2499
2500 2015-01-06 Robert Dewar <dewar@adacore.com>
2501
2502 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
2503 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
2504 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
2505
2506 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2507
2508 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
2509 that specify stream subprograms, if the prefix is a class-wide
2510 type then the generated attribute definition clause must apply
2511 to the same class-wide type.
2512 (Default_Iterator): An iterator defined by an aspect of some
2513 container type T must have a first parameter of type T, T'class,
2514 or an access to such (from code reading RM 5.5.1 (2/3)).
2515
2516 2015-01-06 Arnaud Charlet <charlet@adacore.com>
2517
2518 * gnat1drv.adb: Minor: complete previous change.
2519
2520 2015-01-06 Olivier Hainque <hainque@adacore.com>
2521
2522 * set_targ.ads (C_Type_For): New function. Return the name of
2523 a C type supported by the back-end and suitable as a basis to
2524 construct the standard Ada floating point type identified by
2525 the T parameter. This is used as a common ground to feed both
2526 ttypes values and the GNAT tree nodes for the standard floating
2527 point types.
2528 * set_targ.adb (Long_Double_Index): The index at which "long
2529 double" gets registered in the FPT_Mode_Table. This is useful to
2530 know whether we have a "long double" available at all and get at
2531 it's characteristics without having to search the FPT_Mode_Table
2532 when we need to decide which C type should be used as the
2533 basis for Long_Long_Float in Ada.
2534 (Register_Float_Type): Fill Long_Double_Index.
2535 (FPT_Mode_Index_For): New function. Return the index in
2536 FPT_Mode_Table that designates the entry corresponding to the
2537 provided C type name.
2538 (FPT_Mode_Index_For): New function. Return the index in
2539 FPT_Mode_Table that designates the entry for a back-end type
2540 suitable as a basis to construct the standard Ada floating point
2541 type identified by the input T parameter.
2542 (elaboration code): Register_Back_End_Types unconditionally,
2543 so C_Type_For can operate regardless of -gnateT. Do it
2544 early so we can query it for the floating point sizes, via
2545 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
2546 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
2547 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
2548 which C type should be used as the basis for the construction
2549 of the Standard Ada floating point types.
2550 * get_targ.ads (Get_Float_Size, Get_Double_Size,
2551 Get_Long_Double_Size): Remove.
2552 * get_targ.adb: Likewise.
2553
2554 2015-01-06 Thomas Quinot <quinot@adacore.com>
2555
2556 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
2557 parameter and rename to...
2558 (In_RCI_Visible_Declarations): Fix handling of private part of nested
2559 package.
2560 (Validate_RCI_Subprogram_Declaration): Reject illegal function
2561 returning anonymous access in RCI unit.
2562
2563 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2564
2565 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
2566 function wrapper may be a homonym of another local declaration.
2567 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
2568 build function and operator wrappers after the actual subprogram
2569 has been resolved, and replace the standard renaming declaration
2570 with the declaration of wrapper.
2571 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
2572 make public for use elsewhere.
2573 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
2574 rewrite, now that actual is fully resolved when wrapper is
2575 constructed.
2576
2577 2015-01-06 Javier Miranda <miranda@adacore.com>
2578
2579 * exp_disp.adb: Revert previous change.
2580
2581 2015-01-06 Robert Dewar <dewar@adacore.com>
2582
2583 * exp_util.adb: Change name Name_Table_Boolean to
2584 Name_Table_Boolean1.
2585 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
2586 Introduce Name_Table_Boolean2/3.
2587 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
2588 Introduce Name_Table_Boolean2/3.
2589 * par-ch13.adb: Change name Name_Table_Boolean to
2590 Name_Table_Boolean1.
2591
2592 2015-01-06 Bob Duff <duff@adacore.com>
2593
2594 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
2595
2596 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2597
2598 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
2599 others choice that covers multiple components, analyze each
2600 copy with the type of the component even in compile-only mode,
2601 to detect potential accessibility errors.
2602
2603 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
2604
2605 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
2606 (Resolve_Actuals): An effectively volatile out
2607 parameter cannot act as an in or in out actual in a call.
2608 (Resolve_Entity_Name): An effectively volatile out parameter
2609 cannot be read.
2610
2611 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2612
2613 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
2614 the expansion of an expression function it may be pre-analyzed
2615 if a 'access attribute is applied to the function, in which case
2616 last_entity may have been assigned already.
2617
2618 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2619
2620 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
2621 type and actual has the corresponding full view, there is no
2622 error, but a case of use of incomplete type in a predicate or
2623 invariant expression.
2624
2625 2015-01-06 Vincent Celier <celier@adacore.com>
2626
2627 * makeutl.adb (Insert_No_Roots): Make sure that the same source
2628 in two different project tree is checked in both trees, if they
2629 are sources of two different projects, extended or not.
2630
2631 2015-01-06 Arnaud Charlet <charlet@adacore.com>
2632
2633 * gnat1drv.adb: Minor code clean up.
2634 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
2635
2636 2015-01-06 Bob Duff <duff@adacore.com>
2637
2638 * osint.adb (Read_Source_File): Don't print out
2639 file name unless T = Source.
2640
2641 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2642
2643 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
2644 recognize improper uses of constant_reference types as actuals
2645 for in-out parameters.
2646 (Check_Function_Call): Do not collect identifiers if function
2647 name is missing because of previous error.
2648
2649 2015-01-06 Robert Dewar <dewar@adacore.com>
2650
2651 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
2652 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
2653 Minor change of name Name_Table_Info => Name_Table_Int.
2654
2655 2015-01-06 Robert Dewar <dewar@adacore.com>
2656
2657 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
2658 in previous checkin.
2659 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
2660 of bounds.
2661 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
2662
2663 2015-01-06 Vincent Celier <celier@adacore.com>
2664
2665 * a-strsup.adb (Times (Natural;String;Positive)): Raise
2666 Length_Error, not Index_Error, when the result is too long.
2667
2668 2015-01-06 Thomas Quinot <quinot@adacore.com>
2669
2670 * a-direct.adb (Create_Path): Minor error handling and
2671 performance improvement.
2672
2673 2015-01-06 Robert Dewar <dewar@adacore.com>
2674
2675 * checks.ads, sem_ch12.adb: Minor reformatting.
2676 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
2677 zero check for fixed-point case if Backend_Divide_Checks_On_Target
2678 is False.
2679
2680 2015-01-06 Robert Dewar <dewar@adacore.com>
2681
2682 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
2683 Do not set restriction No_Elaboration_Code unless the pragma
2684 appears in the main unit).
2685
2686 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2687
2688 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
2689 that with clause has already been analyzed before checking kind
2690 of with_clause.
2691
2692 2015-01-06 Robert Dewar <dewar@adacore.com>
2693
2694 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
2695 (as required by RM).
2696
2697 2015-01-06 Arnaud Charlet <charlet@adacore.com>
2698
2699 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
2700
2701 2015-01-06 Robert Dewar <dewar@adacore.com>
2702
2703 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
2704 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
2705
2706 2015-01-06 Javier Miranda <miranda@adacore.com>
2707
2708 * exp_disp.adb (Expand_Interface_Conversion): No displacement
2709 of the pointer to the object needed when the type of the operand
2710 is not an interface type and the interface is one of its parent
2711 types (since they share the primary dispatch table).
2712
2713 2015-01-06 Vincent Celier <celier@adacore.com>
2714
2715 * prj-env.adb: Minor comment update.
2716
2717 2015-01-06 Javier Miranda <miranda@adacore.com>
2718
2719 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
2720 access types whose target type is an interface type to operands
2721 that are access types; required to report an error when the
2722 operand is not an access type.
2723
2724 2015-01-06 Bob Duff <duff@adacore.com>
2725
2726 * a-cfinve.adb (Copy): Set the discriminant to the Length when
2727 Capacity = 0.
2728 * a-cofove.ads (Capacity): Add a postcondition.
2729 * a-cfinve.ads (Capacity): Add a postcondition.
2730 (Reserve_Capacity): Correct the postcondition in the case where
2731 Capacity = 0; that means "Capacity => Length (Container)".
2732 * a-cofove.adb (Elems[c]): Add a comment
2733 explaining the dangers and how to avoid them.
2734
2735 2015-01-06 Ed Schonberg <schonberg@adacore.com>
2736
2737 * sem_ch12.adb: Code clean up.
2738
2739 2015-01-06 Arnaud Charlet <charlet@adacore.com>
2740
2741 * gnatvsn.ads: Bump copyright year.
2742
2743 2015-01-06 Robert Dewar <dewar@adacore.com>
2744
2745 * s-taskin.ads, s-traces.ads: Minor reformatting.
2746 * exp_util.adb: Minor typo fix.
2747
2748 2015-01-06 Vincent Celier <celier@adacore.com>
2749
2750 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
2751 with the runtime name.
2752 * prj-env.adb (Initialize_Default_Project_Path): When both
2753 Target_Name and Runtime_Name are not empty string, add to the
2754 project path the two directories .../lib/gnat and .../share/gpr
2755 related to the runtime.
2756 * prj-env.ads (Initialize_Default_Project_Path): New String
2757 parameter Runtime_Name, defaulted to the empty string.
2758
2759 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
2760
2761 * frontend.adb: Guard against the case where a configuration
2762 pragma may be split into multiple pragmas and the original
2763 rewritten as a null statement.
2764 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
2765 pragma using Insert_Before rather than Insert_Action. This
2766 takes care of the configuration pragma case where Insert_Action
2767 would fail.
2768
2769 2015-01-06 Bob Duff <duff@adacore.com>
2770
2771 * a-coboho.ads (Element_Access): Add "pragma
2772 No_Strict_Aliasing (Element_Access);". This is needed because
2773 we are unchecked-converting from Address to Element_Access.
2774 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
2775 result to be 1.
2776
2777 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
2778
2779 * sem_res.adb (Resolve_Actuals): Remove the
2780 restriction which prohibits volatile actual parameters with
2781 enabled external propery Async_Writers to act appear in procedure
2782 calls where the corresponding formal is of mode OUT.
2783
2784 2015-01-05 Jakub Jelinek <jakub@redhat.com>
2785
2786 * gnat_ugn.texi: Bump @copying's copyright year.
2787
2788 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
2789
2790 PR ada/64492
2791 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
2792
2793 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
2794
2795 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
2796 of unchecked asprintf.
2797
2798 \f
2799 Copyright (C) 2015 Free Software Foundation, Inc.
2800
2801 Copying and distribution of this file, with or without modification,
2802 are permitted in any medium without royalty provided the copyright
2803 notice and this notice are preserved.