decl.c (gnat_to_gnu_param): Do not strip the padding if the parameter either is passe...
[gcc.git] / gcc / ada / ChangeLog
1 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
2
3 * gcc-interface/decl.c (gnat_to_gnu_param): Do not strip the padding
4 if the parameter either is passed by reference or if the alignment
5 would be lowered.
6
7 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
8
9 * gcc-interface/decl.c (is_cplusplus_method): Use Is_Primitive flag to
10 detect primitive operations of tagged and untagged types.
11
12 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
13
14 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias
15 sets in presence of derivation for subprogram types.
16
17 2015-02-08 Eric Botcazou <ebotcazou@adacore.com>
18
19 * gcc-interface/utils.c (begin_subprog_body): Assert that the body is
20 present in the same context as the declaration.
21
22 2015-02-07 Jakub Jelinek <jakub@redhat.com>
23
24 PR middle-end/64340
25 * gcc-interface/trans.c (gigi): Recreate optimization_default_node
26 and optimization_current_node after tweaking global_options.
27
28 2015-02-05 Robert Dewar <dewar@adacore.com>
29
30 * prj-proc.adb, sem_aux.adb, exp_ch9.adb, errout.adb, prj-dect.adb,
31 prj-nmsc.adb: Minor reformatting.
32
33 2015-02-05 Ed Schonberg <schonberg@adacore.com>
34
35 * sem_type.adb (Covers): In ASIS_Mode the Corresponding_Record
36 of a protected type may not be available, so to check conformance
37 with an interface type, examine the interface list in the type
38 declaration directly.
39 (Write_Overloads): Improve information for indirect calls,
40 for debugger use.
41
42 2015-02-05 Ed Schonberg <schonberg@adacore.com>
43
44 * exp_ch3.adb (Make_Tag_Assignment): Do not perform this
45 expansion activity in ASIS mode.
46
47 2015-02-05 Javier Miranda <miranda@adacore.com>
48
49 * errout.adb (Error_Msg_PT): Add missing error.
50 * sem_ch6.adb (Check_Synchronized_Overriding): Check the missing
51 RM rule. Code cleanup.
52 * exp_ch9.adb (Build_Wrapper_Spec): Propagate "constant" in
53 anonymous access types. Found working on the tests. Code cleanup.
54
55 2015-02-05 Vincent Celier <celier@adacore.com>
56
57 * prj-dect.adb (Parse_Attribute_Declaration): Continue scanning
58 when there are incomplete withs.
59 * prj-nmsc.adb (Process_Naming): Do not try to get the value
60 of an element when it is nil.
61 (Check_Naming): Do not check a nil suffix for illegality
62 * prj-proc.adb (Expression): Do not process an empty term.
63 * prj-strt.adb (Attribute_Reference): If attribute cannot be
64 found, parse a possible index to avoid cascading errors.
65
66 2015-02-05 Ed Schonberg <schonberg@adacore.com>
67
68 * sem_aux.adb (Is_Derived_Type): A subprogram_type generated
69 for an access_to_subprogram declaration is not a derived type.
70
71 2015-02-05 Robert Dewar <dewar@adacore.com>
72
73 * errout.adb (Error_Msg_Internal): For non-serious error set
74 Fatal_Error to Ignored.
75 * lib-load.adb (Load_Unit): Minor comment updates.
76 * sem_ch10.adb (Analyze_With_Clause): Propagate Fatal_Error
77 setting from with'ed unit to with'ing unit.
78 * sem_prag.adb (Analyze_Pragma, case Warnings): Document handling
79 of ambiguity.
80
81 2015-02-05 Yannick Moy <moy@adacore.com>
82
83 * sem_prag.adb, par-prag.adb: Minor code clean up.
84
85 2015-02-05 Yannick Moy <moy@adacore.com>
86
87 * par-prag.adb (Pragma_Warnings): Update for extended form
88 of pragma Warnings. The "one" argument case may now have 2 or
89 3 arguments.
90 * sem_prag.adb (Analyze_Pragma/Pragma_Warnings): Update for
91 extended form of pragma Warnings. Pragma with tool name is either
92 rewritten as null or as an equivalent form without tool name,
93 before reanalysis.
94 * snames.ads-tmpl (Name_Gnatprove): New name.
95
96 2015-02-05 Robert Dewar <dewar@adacore.com>
97
98 * sem_ch13.adb (Add_Invariants): Don't assume invariant is
99 standard Boolean.
100 * sem_prag.adb (Analyze_Pragma, case Check): Don't assume
101 condition is standard Boolean, it can be non-standard derived
102 Boolean.
103
104 2015-02-05 Robert Dewar <dewar@adacore.com>
105
106 * checks.adb (Enable_Range_Check): Disconnect attempted
107 optimization for the case of range check for subscript of
108 unconstrained array.
109
110 2015-02-05 Robert Dewar <dewar@adacore.com>
111
112 * par-ch13.adb (With_Present): New function
113 (Aspect_Specifications_Present): Handle WHEN in place of WITH
114 (Get_Aspect_Specifications): Comment update.
115 * par.adb: Comment updates.
116
117 2015-02-05 Robert Dewar <dewar@adacore.com>
118
119 * errout.adb (Handle_Serious_Error): New setting of Fatal_Error.
120 * frontend.adb (Frontend): New setting of Fatal_Error.
121 * lib-load.adb (Create_Dummy_Package_Unit): New setting of
122 Fatal_Error.
123 (Load_Main_Source): New setting of Fatal_Error
124 (Load_Unit): New setting of Fatal_Error.
125 * lib-writ.adb (Add_Preprocessing_Dependency): New setting of
126 Fatal_Error.
127 (Ensure_System_Dependency): New setting of Fatal_Error.
128 * lib.adb (Fatal_Error): New setting of Fatal_Error
129 (Set_Fatal_Error): New setting of Fatal_Error.
130 * lib.ads: New definition of Fatal_Error and associated routines.
131 * par-ch10.adb (P_Compilation_Unit): New setting of Fatal_Error.
132 * par-load.adb (Load): New setting of Fatal_Error.
133 * rtsfind.adb (Load_RTU): New setting of Fatal_Error.
134 * sem_ch10.adb (Analyze_Compilation_Unit): New setting of
135 Fatal_Error.
136 (Optional_Subunit): New setting of Fatal_Error.
137 (Analyze_Proper_Body): New setting of Fatal_Error.
138 (Load_Needed_Body): New setting of Fatal_Error.
139
140 2015-02-05 Ed Schonberg <schonberg@adacore.com>
141
142 * sem_res.adb (Resolve_Call): If the function being called has
143 out parameters do not check for language version if the function
144 comes from a predefined unit, as those are always compiled in
145 Ada 2012 mode.
146
147 2015-02-05 Ed Schonberg <schonberg@adacore.com>
148
149 * sem_ch3.adb (Process_Full_View): Verify that the full view
150 of a type extension must carry an explicit limited keyword if
151 the partial view does (RM 7.3 (10.1)).
152
153 2015-02-05 Robert Dewar <dewar@adacore.com>
154
155 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads,
156 sem_warn.ads: Minor reformatting.
157 * exp_ch13.adb (Expand_N_Freeze_Entity): Add guard for aspect
158 deleted by -gnatI.
159 * sem_prag.adb (Analyze_Pragma, case Type_Invariant): Give
160 error for abstract type.
161
162 2015-02-05 Yannick Moy <moy@adacore.com>
163
164 * opt.ads (Warn_On_Suspicious_Contract): Update comment
165 describing use.
166 * sem_attr.adb (Analyze_Attribute/Attribute_Update): Warn on
167 suspicious uses of 'Update.
168 * sem_warn.adb, sem_warn.ads (Warn_On_Suspicious_Update): New
169 function issues warning on suspicious uses of 'Update.
170 * g-rannum.adb, g-rannum.ads, s-rannum.adb, s-rannum.ads: Mark
171 package spec and body as SPARK_Mode Off.
172
173 2015-02-05 Robert Dewar <dewar@adacore.com>
174
175 * sem_prag.adb (Set_Elab_Unit_Name): New name for Set_Unit_Name
176 (Analyze_Pragma): Change Set_Unit_Name to Set_Elab_Unit_Name
177 (Set_Elab_Unit_Name): Generate reference for Elaborate[_All]
178 * sem_warn.adb (Warn_On_Unreferenced_Entity): Suppress warning
179 for exported entity.
180
181 2015-02-05 Hristian Kirtchev <kirtchev@adacore.com>
182
183 * sem_prag.adb (Check_Pragma_Conformance): Add
184 local variable Arg. Ensure that all errors are associated with
185 the pragma if it appears without an argument. Add comments on
186 various cases.
187
188 2015-02-05 Robert Dewar <dewar@adacore.com>
189
190 * lib-xref.adb: Minor reformatting.
191
192 2015-02-05 Tristan Gingold <gingold@adacore.com>
193
194 PR ada/64349da/64349
195 * env.c: Fix thinko: handle Darwin case before default one.
196
197 2015-01-30 Robert Dewar <dewar@adacore.com>
198
199 * a-assert.adb: Minor reformatting.
200 * sem_ch13.adb: Minor comment clarification.
201 * types.ads: Minor comment update.
202 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Avoid blow up
203 when we have a predicate that is nothing but an inherited dynamic
204 predicate.
205
206 2015-01-30 Jerome Guitton <guitton@adacore.com>
207
208 * gcc-interface/Makefile.in (x86-vxworks): Update GCC_SPEC_FILES to
209 include cert link spec.
210
211 2015-01-30 Robert Dewar <dewar@adacore.com>
212
213 * einfo.ads: Minor comment fix.
214 * freeze.adb (Freeze_Profile): Add test for suspicious import
215 in pure unit.
216 * sem_prag.adb (Process_Import_Or_Interface): Test for suspicious
217 use in Pure unit is now moved to Freeze (to properly catch
218 Pure_Function exemption).
219
220 2015-01-30 Bob Duff <duff@adacore.com>
221
222 * sem_res.ads: Minor comment fix.
223 * sem_type.adb: sem_type.adb (Remove_Conversions): Need to
224 check both operands of an operator.
225
226 2015-01-30 Yannick Moy <moy@adacore.com>
227
228 * a-assert.ads, a-assert.adb: Mark package spec in SPARK. Set assertion
229 policy for Pre to Ignore.
230 (Assert): Add precondition.
231
232 2015-01-30 Robert Dewar <dewar@adacore.com>
233
234 * sem_prag.adb (Process_Import_Or_Interface): Warn if used in
235 Pure unit.
236 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Clarify
237 documentation for some special cases of invalid attempts at
238 based integers.
239
240 2015-01-30 Gary Dismukes <dismukes@adacore.com>
241
242 * errout.ads: Minor reformatting.
243
244 2015-01-30 Yannick Moy <moy@adacore.com>
245
246 * inline.adb (Process_Formals): Use the sloc of
247 the inlined node instead of the sloc of the actual parameter,
248 when replacing formal parameters by the actual one.
249
250 2015-01-30 Arnaud Charlet <charlet@adacore.com>
251
252 * g-expect.adb (Get_Command_Output): Use infinite timeout when
253 calling Expect.
254
255 2015-01-30 Ed Schonberg <schonberg@adacore.com>
256
257 * sem_ch12.adb (Analyze_Associations): If an in-parameter is
258 defaulted in an instantiation, add an entry in the list of actuals
259 to indicate the default value of the formal (as is already done
260 for defaulted subprograms).
261
262 2015-01-30 Javier Miranda <miranda@adacore.com>
263
264 * errout.adb (Error_Msg_PT): Minor error phrasing update.
265
266 2015-01-30 Robert Dewar <dewar@adacore.com>
267
268 * sem_warn.adb (Warn_On_Known_Condition): Improve error message
269 for object case.
270
271 2015-01-30 Pierre-Marie de Rodat <derodat@adacore.com>
272
273 * exp_dbug.adb (Get_Encoded_Name): When
274 -fgnat-encodings=minimal, do not generate names for biased types.
275
276 2015-01-30 Tristan Gingold <gingold@adacore.com>
277
278 PR ada/64349
279 * env.c: Move vxworks and darwin includes out of #ifdef IN_RTS.
280
281 2015-01-30 Gary Dismukes <dismukes@adacore.com>
282
283 * freeze.adb: Minor reformatting.
284
285 2015-01-30 Javier Miranda <miranda@adacore.com>
286
287 * errout.ads (Error_Msg_PT): Replace Node_Id by Entity_Id and
288 improve its documentation.
289 * errout.adb (Error_Msg_PT): Improve the error message.
290 * sem_ch6.adb (Check_Conformance): Update call to Error_Msg_PT.
291 (Check_Synchronized_Overriding): Update call to Error_Msg_PT.
292 * sem_ch3.adb (Check_Abstract_Overriding): Code cleanup.
293
294 2015-01-30 Robert Dewar <dewar@adacore.com>
295
296 * sem_warn.adb (Warn_On_Known_Condition): Do special casing of
297 message for False case.
298
299 2015-01-30 Doug Rupp <rupp@adacore.com>
300
301 * s-vxwext-kernel.ads (Task_Cont): Remove imported subprogram body.
302 * s-vxwext-kernel.adb (Task_Cont): New subpprogram body specialized for
303 kernel.
304
305 2015-01-30 Gary Dismukes <dismukes@adacore.com>
306
307 * sem_attr.adb (Declared_Within_Generic_Unit):
308 New function to test whether an entity is declared within the
309 declarative region of a given generic unit.
310 (Resolve_Attribute): For checking legality of subprogram'Access within
311 a generic unit, call new Boolean function Declared_Within_Generic_Unit
312 instead of simply comparing the results of Enclosing_Generic_Unit on
313 the prefix and access type. Correct minor comment typos.
314
315 2015-01-30 Robert Dewar <dewar@adacore.com>
316
317 * freeze.adb, exp_util.ads: Update comment.
318 * exp_util.adb, exp_ch3.adb: Minor code reorganization and reformatting.
319 * sem_util.adb: Minor: fix typo.
320
321 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
322
323 * sem_attr.adb (Analyze_Attribute): Ensure that
324 the check concerning Refined_Post takes precedence over the
325 other cases.
326
327 2015-01-30 Gary Dismukes <dismukes@adacore.com>
328
329 * sem_prag.adb: Minor typo fixes and reformatting.
330
331 2015-01-30 Yannick Moy <moy@adacore.com>
332
333 * sem_attr.adb: Code clean up.
334
335 2015-01-30 Robert Dewar <dewar@adacore.com>
336
337 * ali.adb (Scan_ALI): Set Serious_Errors flag in Unit record.
338 * ali.ads (Unit_Record): Add new field Serious_Errors.
339 * lib-writ.adb (Write_Unit_Information): Set SE (serious errors)
340 attribute in U line.
341 * lib-writ.ads: New attribute SE (serious erors) in unit line.
342
343 2015-01-30 Hristian Kirtchev <kirtchev@adacore.com>
344
345 * einfo.adb Update the usage of attributes Entry_Bodies_Array,
346 Lit_Indexes, Scale_Value, Storage_Size_Variable,
347 String_Literal_Low_Bound along associated routines and
348 Write_FieldX_Name.
349 (Pending_Access_Types): New routine.
350 (Set_Pending_Access_Types): New routine.
351 (Write_Field15_Name): Add an entry for Pending_Access_Types.
352 * einfo.ads Add new attribute Pending_Access_Types along
353 with usage in nodes. Update the usage of attributes
354 Entry_Bodies_Array, Lit_Indexes, Scale_Value,
355 Storage_Size_Variable, String_Literal_Low_Bound.
356 (Pending_Access_Types): New routine along with pragma Inline.
357 (Set_Pending_Access_Types): New routine along with pragma Inline.
358 * exp_ch3.adb (Expand_Freeze_Array_Type): Add new local variable
359 Ins_Node. Determine the insertion node for anonynous access type
360 that acts as a component type of an array. Update the call to
361 Build_Finalization_Master.
362 (Expand_Freeze_Record_Type): Update
363 the calls to Build_Finalization_Master.
364 (Freeze_Type): Remove
365 local variable RACW_Seen. Factor out the code that deals with
366 remote access-to-class-wide types. Create a finalization master
367 when the designated type contains a private component. Fully
368 initialize all pending access types.
369 (Process_RACW_Types): New routine.
370 (Process_Pending_Access_Types): New routine.
371 * exp_ch4.adb (Expand_Allocator_Expression): Allocation no longer
372 needs to set primitive Finalize_Address.
373 (Expand_N_Allocator): Allocation no longer sets primitive
374 Finalize_Address.
375 * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call):
376 Update the call to Build_Finalization_Master.
377 (Make_Build_In_Place_Call_In_Allocator): Allocation no longer
378 needs to set primitive Finalize_Address.
379 * exp_ch7.adb (Add_Pending_Access_Type): New routine.
380 (Build_Finalization_Master): New parameter profile. Associate
381 primitive Finalize_Address with the finalization master if the
382 designated type has been frozen, otherwise treat the access
383 type as pending. Simplify the insertion of the master and
384 related initialization code.
385 (Make_Finalize_Address_Body): Allow Finalize_Address for class-wide
386 abstract types.
387 (Make_Set_Finalize_Address_Call): Remove forlam parameter Typ.
388 Simplify the implementation.
389 * exp_ch7.ads (Build_Finalization_Master): New parameter profile
390 along with comment on usage.
391 (Make_Set_Finalize_Address_Call): Remove formal parameter Typ. Update
392 the comment on usage.
393 * exp_util.adb (Build_Allocate_Deallocate_Proc): Use routine
394 Finalize_Address to retrieve the primitive.
395 (Finalize_Address): New routine.
396 (Find_Finalize_Address): Removed.
397 * exp_util.ads (Finalize_Address): New routine.
398 * freeze.adb (Freeze_All): Remove the generation of finalization
399 masters.
400 * sem_ch3.adb (Analyze_Full_Type_Declaration): Propagate any
401 pending access types from the partial to the full view.
402
403 2015-01-30 Robert Dewar <dewar@adacore.com>
404
405 * sem_disp.adb: Minor reformatting.
406 * sem_disp.ads: Documentation update.
407
408 2015-01-30 Ed Schonberg <schonberg@adacore.com>
409
410 * sem_disp.adb (Is_Dynamically_Tagged): when applied to an entity
411 or a function call, return True if type is class-wide.
412 * sem_res.adb (Resolve_Case_Expression, Resolve_If_Expression);
413 Apply RM 4.5.7 (17/3): all or none of the dependent expression
414 of a conditional expression must be dynamically tagged.
415
416 2015-01-30 Ed Schonberg <schonberg@adacore.com>
417
418 * sem_ch6.adb (Analyze_Function_Return): In an extended return
419 statement, apply accessibility check to result object when there
420 is no initializing expression (Ada 2012 RM 6.5 (5.4/3))
421
422 2015-01-30 Robert Dewar <dewar@adacore.com>
423
424 * sem_ch4.adb (Analyze_If_Expression): Allow for non-standard
425 Boolean for case where ELSE is omitted.
426 * sem_res.adb: Minor reformatting.
427
428 2015-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
429
430 Fix build under cygwin/64.
431 * adaint.h: Add check for __CYGWIN__.
432 * mingw32.h: Prevent windows.h from including x86intrin.h in GCC.
433
434 2015-01-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
435
436 PR ada/64640
437 * adaint.c: Handle __CYGWIN__ like __MINGW32__ here.
438 * mingw32.h: Don't include <tchar.h> under cygwin.
439 (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Set to _O_TEXT if not yet defined.
440
441 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
442
443 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_8)
444 (DEF_FUNCTION_TYPE_VAR_12): New macros.
445
446 2015-01-09 Michael Collison <michael.collison@linaro.org>
447
448 * gcc-interface/cuintp.c: Include hash-set.h, machmode.h,
449 vec.h, double-int.h, input.h, alias.h, symtab.h,
450 fold-const.h, wide-int.h, and inchash.h due to
451 flattening of tree.h.
452 * gcc-interface/decl.c: Ditto.
453 * gcc-interface/misc.c: Ditto.
454 * gcc-interface/targtyps.c: Include hash-set.h, machmode.h,
455 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h,
456 fold-const.h, wide-int.h, and inchash.h due to
457 flattening of tree.h.
458 * gcc-interface/trans.c: Include hash-set.h, machmode.h,
459 vec.h, double-int.h, input.h, alias.h, symtab.h, real.h,
460 fold-const.h, wide-int.h, inchash.h due to
461 flattening of tree.h.
462 * gcc-interface/utils.c: Include hash-set.h, machmode.h,
463 vec.h, double-int.h, input.h, alias.h, symtab.h,
464 fold-const.h, wide-int.h, and inchash.h due to
465 flattening of tree.h.
466 * gcc-interface/utils2.c: Ditto.
467
468 2015-01-07 Robert Dewar <dewar@adacore.com>
469
470 * sem_warn.adb (Check_One_Unit): Don't give unused entities
471 warning for a package which is used as a generic parameter.
472
473 2015-01-07 Bob Duff <duff@adacore.com>
474
475 * usage.adb (Usage): Correct documentation of
476 -gnatw.f switches.
477
478 2015-01-07 Robert Dewar <dewar@adacore.com>
479
480 * s-fileio.adb: Minor reformatting.
481
482 2015-01-07 Ed Schonberg <schonberg@adacore.com>
483
484 * sem_ch12.adb (Instantiate_Object): If formal is an anonymous
485 access to subprogram, replace its formals with new entities when
486 building the object declaration, both if actual is present and
487 when it is defaulted.
488
489 2015-01-07 Ed Schonberg <schonberg@adacore.com>
490
491 * sem_ch5.adb (Analyze_Assignment): If left-hand side is a view
492 conversion and type of expression has invariant, apply invariant
493 check on expression.
494
495 2015-01-07 Ed Schonberg <schonberg@adacore.com>
496
497 * sem_ch3.adb (Create_Constrained_Components): A call to
498 Gather_Components may detect an error if an inherited discriminant
499 that controls a variant is non-static.
500 * sem_aggr.adb (Resolve_Record_Aggregate, Step 5): The call to
501 Gather_Components may report an error if an inherited discriminant
502 in a variant in non-static.
503 * sem_util.adb (Gather_Components): If a non-static discriminant
504 is inherited do not report error here, but let caller handle it.
505 (Find_Actual): Small optimization.
506
507 2015-01-07 Bob Duff <duff@adacore.com>
508
509 * usage.adb (Usage): Document -gnatw.f switch.
510
511 2015-01-07 Ed Schonberg <schonberg@adacore.com>
512
513 * sem_ch12.adb: Code clean up and minor reformatting.
514
515 2015-01-07 Robert Dewar <dewar@adacore.com>
516
517 * exp_ch4.adb (Expand_N_Type_Conversion): Add guard for
518 Raise_Accessibility_Error call.
519 * s-valllu.ads (Scan_Raw_Long_Long_Unsigned): Add documentation
520 on handling of invalid digits in based constants.
521 * s-fatgen.ads: Minor reformatting.
522 * sem_attr.adb (Analyze_Attribute, case Unrestricted_Access):
523 Avoid noting bogus modification for Valid test.
524 * snames.ads-tmpl (Name_Attr_Long_Float): New Name.
525 * einfo.ads: Minor reformatting.
526 * sem_warn.adb: Minor comment clarification.
527 * sem_ch12.adb: Minor reformatting.
528
529 2015-01-07 Ed Schonberg <schonberg@adacore.com>
530
531 * exp_ch5.adb (Expand_Predicated_Loop): Handle properly loops
532 over static predicates when the loop parameter specification
533 carries a Reverse indicator.
534
535 2015-01-07 Ed Schonberg <schonberg@adacore.com>
536
537 * sem_ch12.adb (Instantiate_Object): If formal has a default,
538 actual is missing and formal has an anonymous access type, copy
539 access definition in full so that tree for instance is properly
540 formatted for ASIS use.
541
542 2015-01-07 Bob Duff <duff@adacore.com>
543
544 * sem_elab.adb (Check_Internal_Call_Continue): Give a warning
545 for P'Access, where P is a subprogram in the same package as
546 the P'Access, and the P'Access is evaluated at elaboration
547 time, and occurs before the body of P. For example, "X : T :=
548 P'Access;" would allow a subsequent call to X.all to be an
549 access-before-elaboration error; hence the warning. This warning
550 is enabled by the -gnatw.f switch.
551 * opt.ads (Warn_On_Elab_Access): New flag for warning switch.
552 * warnsw.adb (Set_Dot_Warning_Switch): Set Warn_On_Elab_Access.
553 * gnat_ugn.texi: Document the new warning.
554
555 2015-01-07 Johannes Kanig <kanig@adacore.com>
556
557 * lib-xref-spark_specific.adb (Collect_SPARK_Xrefs): Skip unneeded
558 cross ref files.
559
560 2015-01-07 Robert Dewar <dewar@adacore.com>
561
562 * s-taprop-linux.adb, clean.adb: Minor reformatting.
563
564 2015-01-07 Arnaud Charlet <charlet@adacore.com>
565
566 * s-tassta.adb: Relax some overzealous assertions.
567
568 2015-01-07 Ed Schonberg <schonberg@adacore.com>
569
570 * sem_ch6.adb (Analyze_Return_Type): An call that returns a limited
571 view of a type is legal when context is a thunk generated for
572 operation inherited from an interface.
573 * exp_ch6.adb (Expand_Simple_Function_Return): If context is
574 a thunk and return type is an incomplete type do not continue
575 expansion; thunk will be fully elaborated when generating code.
576
577 2015-01-07 Doug Rupp <rupp@adacore.com>
578
579 * s-osinte-mingw.ads (LARGE_INTEGR): New subtype.
580 (QueryPerformanceFrequency): New imported procedure.
581 * s-taprop-mingw.adb (RT_Resolution): Call above and return
582 resolution vice a hardcoded value.
583 * s-taprop-solaris.adb (RT_Resolution): Call clock_getres and return
584 resolution vice a hardcoded value.
585 * s-linux-android.ads (clockid_t): New subtype.
586 * s-osinte-aix.ads (clock_getres): New imported subprogram.
587 * s-osinte-android.ads (clock_getres): Likewise.
588 * s-osinte-freebsd.ads (clock_getres): Likewise.
589 * s-osinte-solaris-posix.ads (clock_getres): Likewise.
590 * s-osinte-darwin.ads (clock_getres): New subprogram.
591 * s-osinte-darwin.adb (clock_getres): New subprogram.
592 * thread.c (__gnat_clock_get_res) [__APPLE__]: New function.
593 * s-taprop-posix.adb (RT_Resolution): Call clock_getres to
594 calculate resolution vice hard coded value.
595
596 2015-01-07 Ed Schonberg <schonberg@adacore.com>
597
598 * exp_util.adb (Make_CW_Equivalent_Type): If root type is a
599 limited view, use non-limited view when available to create
600 equivalent record type.
601
602 2015-01-07 Vincent Celier <celier@adacore.com>
603
604 * gnatcmd.adb: Remove command Sync and any data and processing
605 related to this command. Remove project processing for gnatstack.
606 * prj-attr.adb: Remove package Synchonize and its attributes.
607
608 2015-01-07 Vincent Celier <celier@adacore.com>
609
610 * clean.adb: Minor error message change.
611
612 2015-01-07 Tristan Gingold <gingold@adacore.com>
613
614 PR ada/64349
615 * env.c (__gnat_environ): Adjust for darwin9/darwin10.
616
617 2015-01-07 Javier Miranda <miranda@adacore.com>
618
619 * sem_ch10.adb (Analyze_With_Clause): Compiling under -gnatq
620 protect the frontend against never ending recursion caused by
621 circularities in the sources.
622
623 2015-01-07 Robert Dewar <dewar@adacore.com>
624
625 * a-reatim.adb, make.adb, exp_pakd.adb, i-cpoint.adb, sem_ch8.adb,
626 exp_ch3.adb: Minor reformatting.
627
628 2015-01-07 Doug Rupp <rupp@adacore.com>
629
630 * s-linux.ads (clockid_t): New subtype.
631 * s-osinte-linux.ads (pragma Linker Options): Add -lrt.
632 (clockid_t): New subtype.
633 (clock_getres): Import system call.
634 * s-taprop-linux.adb (System.OS_Constants): With and rename.
635 (RT_Resolution): Remove
636 hardcoded value and call clock_getres.
637 * s-linux-sparc.ads, s-linux-mipsel.ads, s-linux-hppa.ads,
638 s-linux-alpha.ads, s-linux-x32.ads (clockid_t): Add new subtype.
639
640 2015-01-07 Robert Dewar <dewar@adacore.com>
641
642 * sem_warn.adb (Check_One_Unit): Guard against context item
643 with no Entity field.
644
645 2015-01-07 Vincent Celier <celier@adacore.com>
646
647 * clean.adb (Gnatclean): Warn that 'gnatclean -P' is obsolete.
648 * make.adb (Initialize): Warn that 'gnatmake -P' is obsolete.
649
650 2015-01-07 Vincent Celier <celier@adacore.com>
651
652 * prj-conf.adb (Parse_Project_And_Apply_Config): Always finalize
653 errors/warnings in the first parsing of the project files,
654 to display the warnings when there is no errors.
655
656 2015-01-07 Tristan Gingold <gingold@adacore.com>
657
658 * i-cpoint.adb (Copy_Terminated_Array): Nicely handle null target.
659
660 2015-01-07 Doug Rupp <rupp@adacore.com>
661
662 * s-taprop-vxworks.adb (Stop_All_Tasks): Pass return
663 value from Int_Lock as parameter to Int_Unlock.
664 * s-osinte-vxworks.ads (Int_Unlock): Add parameter.
665 * s-vxwext.ads (Int_Unlock): Likewise.
666 * s-vxwext-kernel.adb (intUnlock, Int_Unlock): Likewise.
667 * s-vxwext-kernel.ads (Int_Unlock): Likewise.
668 * s-vxwext-rtp.adb (Int_Unlock): Likewise.
669 * s-vxwext-rtp.ads (Int_Unlock): Likewise.
670
671 2015-01-07 Pierre-Marie de Rodat <derodat@adacore.com>
672
673 * exp_pakd.adb: Add a comment in exp_pakd.adb to explain why we
674 keep ___XP suffixes
675
676 2015-01-07 Tristan Gingold <gingold@adacore.com>
677
678 * i-cpoint.adb (Copy_Terminated_Array): Use Copy_Array to
679 handle overlap.
680
681 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
682
683 * sem_ch3.adb (Analyze_Full_Type_Declaration): Do not
684 automatically set No_Strict_Aliasing on access types.
685 * fe.h (No_Strict_Aliasing_CP): Declare.
686 * gcc-interface/trans.c (gigi): Force flag_strict_aliasing to 0 if
687 No_Strict_Aliasing_CP is set.
688
689 2015-01-07 Johannes Kanig <kanig@adacore.com>
690
691 * sem_ch8.adb (Analyze_Subprogram_Renaming) do
692 not build function wrapper in gnatprove mode when the package
693 is externally axiomatized.
694
695 2015-01-07 Jose Ruiz <ruiz@adacore.com>
696
697 * a-reatim.adb (Time_Of): Reduce the number of spurious overflows in
698 intermediate computations when the parameters have different signs.
699
700 2015-01-07 Javier Miranda <miranda@adacore.com>
701
702 * exp_ch3.adb (Build_Init_Procedure): For derived types,
703 improve the code which takes care of identifying and moving to
704 the beginning of the init-proc the call to the init-proc of the
705 parent type.
706
707 2015-01-07 Olivier Hainque <hainque@adacore.com>
708
709 * gcc-interface/trans.c (gnat_to_gnu, <N_Expression_With_Action>):
710 Elaborate the expression as part of the same stmt group as the actions.
711
712 2015-01-07 Robert Dewar <dewar@adacore.com>
713
714 * sem_ch3.adb: Minor error message change.
715
716 2015-01-07 Ed Schonberg <schonberg@adacore.com>
717
718 * sem_prag.adb (Analyze_Pragma, case Preelaborable_Initialization):
719 Following AI05-028, the pragam applies legally to any composite type.
720
721 2015-01-07 Arnaud Charlet <charlet@adacore.com>
722
723 * s-osinte-vxworks.adb, s-osinte-vxworks.ads
724 (sigwait, sigwaitinfo): Removed, not needed after all on any
725 VxWorks configurations.
726
727 2015-01-07 Robert Dewar <dewar@adacore.com>
728
729 * sem_ch3.adb, freeze.adb, exp_disp.adb: Minor reformatting.
730
731 2015-01-07 Javier Miranda <miranda@adacore.com>
732
733 * exp_disp.adb (Expand_Interface_Conversion): Adding missing
734 generation of accessibility check.
735
736 2015-01-07 Ed Schonberg <schonberg@adacore.com>
737
738 * sem_ch3.adb (Derived_Type_Declaration): In the case of an
739 illegal completion from a class- wide type, set etype of the
740 derived type properly to prevent cascaded errors.
741
742 2015-01-07 Robert Dewar <dewar@adacore.com>
743
744 * prj.ads, i-cpoint.adb, freeze.adb, ghost.adb, prj-err.adb: Minor
745 reformatting.
746
747 2015-01-07 Robert Dewar <dewar@adacore.com>
748
749 * restrict.adb (Check_Restriction_No_Use_Of_Attribute):
750 New procedure.
751 (OK_No_Use_Of_Entity_Name): New function.
752 (Set_Restriction_No_Use_Of_Entity): New procedure.
753 * restrict.ads (Check_Restriction_No_Use_Of_Attribute):
754 New procedure.
755 (OK_No_Use_Of_Entity_Name): New function.
756 (Set_Restriction_No_Use_Of_Entity): New procedure.
757 * sem_ch8.adb (Find_Direct_Name): Add check for violation of
758 No_Use_Of_Entity.
759 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
760 Add processing for new restriction No_Use_Of_Entity.
761
762 2015-01-07 Eric Botcazou <ebotcazou@adacore.com>
763
764 * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic
765 component type as to Has_Atomic_Components type. Remove useless
766 test on Is_Aliased component type.
767
768 2015-01-07 Hristian Kirtchev <kirtchev@adacore.com>
769
770 * alloc.ads Alphabetize several declarations. Add constants
771 Ignored_Ghost_Units_Initial and Ignored_Ghost_Units_Increment.
772 * atree.adb Add with and use clauses for Opt.
773 (Allocate_Initialize_Node): Mark a node as ignored Ghost
774 if it is created in an ignored Ghost region.
775 (Ekind_In): New variant.
776 (Is_Ignored_Ghost_Node): New routine.
777 (Set_Is_Ignored_Ghost_Node): New routine.
778 * atree.adb Aplhabetize several subprograms declarations. Flag
779 Spare0 is now known as Is_Ignored_Ghost_Node.
780 (Ekind_In): New variant.
781 (Is_Ignored_Ghost_Node): New routine.
782 (Set_Is_Ignored_Ghost_Node): New routine.
783 * einfo.adb: Flag 279 is now known as Contains_Ignored_Ghost_Code.
784 (Contains_Ignored_Ghost_Code): New routine.
785 (Set_Contains_Ignored_Ghost_Code): New routine.
786 (Set_Is_Checked_Ghost_Entity, Set_Is_Ignored_Ghost_Entity):
787 It is now possible to set this property on an unanalyzed entity.
788 (Write_Entity_Flags): Output the status of flag
789 Contains_Ignored_Ghost_Code.
790 * einfo.ads New attribute Contains_Ignored_Ghost_Code along with
791 usage in nodes.
792 (Contains_Ignored_Ghost_Code): New routine
793 along with pragma Inline.
794 (Set_Contains_Ignored_Ghost_Code): New routine along with pragma Inline.
795 * exp_ch3.adb Add with and use clauses for Ghost.
796 (Freeze_Type): Capture/restore the value of Ghost_Mode on entry/exit.
797 Set the Ghost_Mode in effect.
798 (Restore_Globals): New routine.
799 * exp_ch7.adb (Process_Declarations): Do not process a context
800 that invoves an ignored Ghost entity.
801 * exp_dbug.adb (Qualify_All_Entity_Names): Skip an ignored Ghost
802 construct that has been rewritten as a null statement.
803 * exp_disp.adb Add with and use clauses for Ghost.
804 (Make_DT): Capture/restore the value of Ghost_Mode on entry/exit. Set
805 the Ghost_Mode in effect.
806 (Restore_Globals): New routine.
807 * exp_util.adb (Requires_Cleanup_Actions): An ignored Ghost entity
808 does not require any clean up. Add two missing cases that deal
809 with block statements.
810 * freeze.adb Add with and use clauses for Ghost.
811 (Freeze_Entity): Capture/restore the value of Ghost_Mode on entry/exit.
812 Set the Ghost_Mode in effect.
813 (Restore_Globals): New routine.
814 * frontend.adb Add with and use clauses for Ghost. Remove any
815 ignored Ghost code from all units that qualify.
816 * ghost.adb New unit.
817 * ghost.ads New unit.
818 * gnat1drv.adb Add with clause for Ghost. Initialize and lock
819 the table in package Ghost.
820 * lib.ads: Alphabetize several subprogram declarations.
821 * lib-xref.adb (Output_References): Do not generate reference
822 information for ignored Ghost entities.
823 * opt.ads Add new type Ghost_Mode_Type and new global variable
824 Ghost_Mode.
825 * rtsfind.adb (Load_RTU): Provide a clean environment when
826 loading a runtime unit.
827 * sem.adb (Analyze): Capture/restore the value of Ghost_Mode on
828 entry/exit as the node may set a different mode.
829 (Do_Analyze):
830 Capture/restore the value of Ghost_Mode on entry/exit as the
831 unit may be withed from a unit with a different Ghost mode.
832 * sem_ch3.adb Add with and use clauses for Ghost.
833 (Analyze_Full_Type_Declaration, Analyze_Incomplete_Type_Decl,
834 Analyze_Number_Declaration, Analyze_Private_Extension_Declaration,
835 Analyze_Subtype_Declaration): Set the Ghost_Mode in effect. Mark
836 the entity as Ghost when there is a Ghost_Mode in effect.
837 (Array_Type_Declaration): The implicit base type inherits the
838 "ghostness" from the array type.
839 (Derive_Subprogram): The
840 alias inherits the "ghostness" from the parent subprogram.
841 (Make_Implicit_Base): The implicit base type inherits the
842 "ghostness" from the parent type.
843 * sem_ch5.adb Add with and use clauses for Ghost.
844 (Analyze_Assignment): Set the Ghost_Mode in effect.
845 * sem_ch6.adb Add with and use clauses for Ghost.
846 (Analyze_Abstract_Subprogram_Declaration, Analyze_Procedure_Call,
847 Analyze_Subprogram_Body_Helper, Analyze_Subprogram_Declaration):
848 Set the Ghost_Mode in effect. Mark the entity as Ghost when
849 there is a Ghost_Mode in effect.
850 * sem_ch7.adb Add with and use clauses for Ghost.
851 (Analyze_Package_Body_Helper, Analyze_Package_Declaration,
852 Analyze_Private_Type_Declaration): Set the Ghost_Mode in
853 effect. Mark the entity as Ghost when there is a Ghost_Mode
854 in effect.
855 * sem_ch8.adb Add with and use clauses for Ghost.
856 (Analyze_Exception_Renaming, Analyze_Generic_Renaming,
857 Analyze_Object_Renaming, Analyze_Package_Renaming,
858 Analyze_Subprogram_Renaming): Set the Ghost_Mode in effect. Mark
859 the entity as Ghost when there is a Ghost_Mode in effect.
860 (Find_Type): Check the Ghost context of a type.
861 * sem_ch11.adb Add with and use clauses for Ghost.
862 (Analyze_Exception_Declaration): Set the Ghost_Mode in
863 effect. Mark the entity as Ghost when there is a Ghost_Mode
864 in effect.
865 * sem_ch12.adb Add with and use clauses for Ghost.
866 (Analyze_Generic_Package_Declaration,
867 Analyze_Generic_Subprogram_Declaration): Set the Ghost_Mode in effect.
868 Mark the entity as Ghost when there is a Ghost_Mode in effect.
869 * sem_prag.adb Add with and use clauses for Ghost.
870 (Analyze_Pragma): Ghost-related checks are triggered when there
871 is a Ghost mode in effect.
872 (Create_Abstract_State): Mark the
873 entity as Ghost when there is a Ghost_Mode in effect.
874 * sem_res.adb Add with and use clauses for Ghost.
875 (Check_Ghost_Context): Removed.
876 * sem_util.adb (Check_Ghost_Completion): Removed.
877 (Check_Ghost_Derivation): Removed.
878 (Incomplete_Or_Partial_View):
879 Add a guard in case the entity has not been analyzed yet
880 and does carry a scope.
881 (Is_Declaration): New routine.
882 (Is_Ghost_Entity): Removed.
883 (Is_Ghost_Statement_Or_Pragma):
884 Removed.
885 (Is_Subject_To_Ghost): Removed.
886 (Set_Is_Ghost_Entity):
887 Removed.
888 (Within_Ghost_Scope): Removed.
889 * sem_util.adb (Check_Ghost_Completion): Removed.
890 (Check_Ghost_Derivation): Removed.
891 (Is_Declaration): New routine.
892 (Is_Ghost_Entity): Removed.
893 (Is_Ghost_Statement_Or_Pragma): Removed.
894 (Is_Subject_To_Ghost): Removed.
895 (Set_Is_Ghost_Entity): Removed.
896 (Within_Ghost_Scope): Removed.
897 * sinfo.ads Add a section on Ghost mode.
898 * treepr.adb (Print_Header_Flag): New routine.
899 (Print_Node_Header): Factor out code. Output flag
900 Is_Ignored_Ghost_Node.
901 * gcc-interface/Make-lang.in: Add dependency for unit Ghost.
902
903 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
904
905 * freeze.adb (Freeze_Array_Type) <Complain_CS>: Remove always
906 true test and unreachable 'else' arm.
907
908 2015-01-06 Vincent Celier <celier@adacore.com>
909
910 * prj-conf.adb (Check_Target): Improve error message when
911 there are mismatched targets between the on in the configuration
912 project file and the specified one, either in the main project
913 file or in the --target= switch.
914
915 2015-01-06 Pascal Obry <obry@adacore.com>
916
917 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Mode and
918 Install_Name attribute definitions.
919
920 2015-01-06 Ed Schonberg <schonberg@adacore.com>
921
922 * freeze.adb (Wrap_Imported_Subprogram): Indicate that the
923 generated Import pragma for the internal imported procedure does
924 not come from an aspect, so that Is_Imported can be properly
925 set for it.
926
927 2015-01-06 Gary Dismukes <dismukes@adacore.com>
928
929 * sem_ch12.adb (Might_Inline_Subp): Record whether
930 any subprograms in the generic package are marked with
931 pragma Inline_Always (setting flag Has_Inline_Always).
932 (Analyze_Package_Instantiation): Add test of Has_Inline_Always
933 alongside existing test of Front_End_Inlining as alternative
934 conditions for setting Inline_Now. Also add test of
935 Has_Inline_Always along with Front_End_Inlining test as an
936 alternative condition for setting Needs_Body to False.
937
938 2015-01-06 Tristan Gingold <gingold@adacore.com>
939
940 * i-cpoint.adb (Copy_Array): Handle overlap.
941
942 2015-01-06 Pascal Obry <obry@adacore.com>
943
944 * bindgen.adb: Minor style fix.
945
946 2015-01-06 Robert Dewar <dewar@adacore.com>
947
948 * sem_util.ads, sem_util.adb: Minor reformatting.
949
950 2015-01-06 Vincent Celier <celier@adacore.com>
951
952 * prj-conf.adb (Parse_Project_And_Apply_Config): Reset incomplete
953 with flags before parsing the projects.
954 * prj-err.adb (Error_Msg): Do nothing if there are incomplete withs.
955 * prj-part.adb (Post_Parse_Context_Clause): Set Incomplete_Withs
956 to True in the flags, when Ignore_Missing_With is True and an
957 imported project cannot be found.
958 * prj-proc.adb (Expression): When there are incomplete withs and
959 a variable or attribute is not found, set the variable/attribute
960 to unknown.
961 * prj.ads (Processing_Flags): New flag Incomplete_Withs,
962 defaulted to False.
963
964 2015-01-06 Vasiliy Fofanov <fofanov@adacore.com>
965
966 * prj-proc.adb, prj-part.adb, prj.adb, prj.ads, prj-conf.adb,
967 prj-err.adb: Add new switch --no-command-line.
968
969 2015-01-06 Ed Schonberg <schonberg@adacore.com>
970
971 * sem_ch12.adb: Sloc of wrapper is that of instantiation.
972
973 2015-01-06 Robert Dewar <dewar@adacore.com>
974
975 * sem_ch11.adb: Minor reformatting.
976
977 2015-01-06 Ed Schonberg <schonberg@adacore.com>
978
979 * exp_aggr.adb (Get_Assoc_Expr): New routine internal to
980 Build_Array_Aggr_Code, used to initialized components covered
981 by a box association. If the component type is scalar and has
982 a default aspect, use it to initialize such components.
983
984 2015-01-06 Pascal Obry <obry@adacore.com>
985
986 * rtinit.c (__gnat_runtime_initialize): Add a parameter to
987 control the setup of the exception handler.
988 * initialize.c: Remove unused declaration.
989 * bindgen.adb: Always call __gnat_runtime_initialize and pass
990 whether the exeception handler must be set or not.
991
992 2015-01-06 Thomas Quinot <quinot@adacore.com>
993
994 * freeze.adb (Set_SSO_From_Defaults): When setting scalar storage
995 order to native from default, make sure to also adjust bit order.
996 * exp_aggr.adb: Minor reformatting.
997
998 2015-01-06 Robert Dewar <dewar@adacore.com>
999
1000 * s-valllu.adb, s-valllu.ads, s-valuti.ads, s-valuns.adb, s-valuns.ads,
1001 s-valrea.adb, s-valrea.ads: Add some additional guards for
1002 Str'Last = Positive'Last.
1003
1004 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1005
1006 * sem_ch12.adb, sem_ch8.adb: Ongoing work for wrappers for actual
1007 subprograms.
1008
1009 2015-01-06 Javier Miranda <miranda@adacore.com>
1010
1011 * exp_disp.adb (Expand_Interface_Conversion): Reapply patch.
1012
1013 2015-01-06 Thomas Quinot <quinot@adacore.com>
1014
1015 * sem_util.ads: Minor reformatting.
1016 * sem_cat.adb (In_RCI_Visible_Declarations): Change back to...
1017 (In_RCI_Declaration) Return to old name, as proper checking of
1018 entity being in the visible part depends on entity kind and must
1019 be done by the caller.
1020
1021 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1022
1023 * sem_ch12.adb, sem_ch12.ads, sem_ch8.adb: Ongoing work for wrappers
1024 for operators in SPARK.
1025
1026 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1027
1028 * sem_aggr.adb (Get_Value): In ASIS mode, preanalyze the
1029 expression in an others association before making copies for
1030 separate resolution and accessibility checks. This ensures that
1031 the type of the expression is available to ASIS in all cases,
1032 in particular if the expression is itself an aggregate.
1033
1034 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
1035
1036 * einfo.ads (Has_Independent_Components): Document extended
1037 usage.
1038 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
1039 (Set_Has_Independent_Components): Adjust assertion.
1040 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
1041 for pragma Atomic_Components. Set Has_Independent_Components
1042 on the object instead of the type for an object declaration with
1043 pragma Independent_Components.
1044
1045 2015-01-06 Olivier Hainque <hainque@adacore.com>
1046
1047 * set_targ.adb (Read_Target_Dependent_Values): Set
1048 Long_Double_Index when "long double" is read.
1049 (elaboration code): Register_Back_End_Types only when not reading from
1050 config files. Doing otherwise is pointless and error prone.
1051
1052 2015-01-06 Robert Dewar <dewar@adacore.com>
1053
1054 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
1055
1056 2015-01-06 Robert Dewar <dewar@adacore.com>
1057
1058 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
1059 Str'Last = Positive'Last.
1060
1061 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1062
1063 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
1064 where the non-limited type is a generic actual and appears as
1065 a subtype of the non-limited view of the other.
1066 * freeze.adb (Build_Renamed_Body): If the return type of the
1067 declaration that is being completed is a limited view and the
1068 non-limited view is available, use it in the specification of
1069 the generated body.
1070
1071 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1072
1073 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
1074 incomplete view, the type of the classwide type common to both
1075 views is the type being declared.
1076
1077 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
1078
1079 * einfo.ads (Is_Independent): Further document extended usage.
1080
1081 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
1082
1083 * einfo.ads (Is_Independent): Document extended usage.
1084 * einfo.adb (Is_Independent): Remove obsolete assertion.
1085 (Set_Is_Independent): Likewise.
1086 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
1087 (Process_Atomic_Independent_Shared_Volatile): ...this.
1088 Deal with pragma Independent here.
1089 (Analyze_Pragma): Adjust
1090 to above renaming and also invoke it for pragma Independent.
1091 Adjust comment for Independent_Components.
1092
1093 2015-01-06 Robert Dewar <dewar@adacore.com>
1094
1095 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
1096 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
1097
1098 2015-01-06 Robert Dewar <dewar@adacore.com>
1099
1100 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
1101 = Positive'Last.
1102 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
1103 Str'Last = Positive'Last.
1104
1105 2015-01-06 Robert Dewar <dewar@adacore.com>
1106
1107 * sem_prag.adb (Process_Inline): Remove redundant construct
1108 warning (-gnatw.r) for an ineffective pragma Inline.
1109
1110 2015-01-06 Robert Dewar <dewar@adacore.com>
1111
1112 * s-valint.adb: Fix typo in last checkin.
1113 * s-valuns.adb (Value_Unsigned): More efficient fix for
1114 Positive'Last case.
1115 * sem_attr.adb (Analyze_Attribute): Minor reformatting
1116 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
1117
1118 2015-01-06 Robert Dewar <dewar@adacore.com>
1119
1120 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
1121 Str'Last = Positive'Last
1122
1123 2015-01-06 Thomas Quinot <quinot@adacore.com>
1124
1125 * xoscons.adb: Display exception information and return non-zero
1126 exit status in top level exception handler.
1127
1128 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1129
1130 * sem_ch8.adb: Code clean up.
1131
1132 2015-01-06 Tristan Gingold <gingold@adacore.com>
1133
1134 * targparm.ads: Remove obsolete comment.
1135
1136 2015-01-06 Olivier Hainque <hainque@adacore.com>
1137
1138 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
1139 constructing a ref to variable, update inner_const_flag from the
1140 variable TREE_READONLY attribute.
1141 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
1142 definition.
1143 (get_target_float_size): Remove.
1144 (get_target_double_size): Remove.
1145 (get_target_long_double_size): Remove.
1146
1147 2015-01-06 Pascal Obry <obry@adacore.com>
1148
1149 * adaint.c (ProcListEvt): Set to NULL.
1150 * rtinit.c: New file.
1151 (__gnat_rt_init_count): New reference counter set to 0.
1152 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
1153 this code is actually needed for the runtime initialization. This
1154 routine returns immediately if the initialization has already been done.
1155 * final.c: Revert previous change.
1156 * rtfinal.c: New file.
1157 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
1158 section and event. The default version of this routine is empty (except
1159 for the reference counting code). This routine returns immediately if
1160 some others libraries are referencing the runtime.
1161 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
1162 remove circuitry to initialize the signal handler as this is
1163 now done by the runtime initialization routine.
1164 (Gen_Adafinal): Generate call to Runtime_Finalize.
1165 * gnat_ugn.texi: Update documentation about concurrency and
1166 initialization/finalization of the run-time.
1167 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
1168 references to rtfinal.o and rtinit.o
1169
1170 2015-01-06 Robert Dewar <dewar@adacore.com>
1171
1172 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
1173 for Enum_Image.
1174 * sem_attr.adb: Implement Enum_Image attribute.
1175 * snames.ads-tmpl: Add entries for Enum_Image attribute.
1176
1177 2015-01-06 Robert Dewar <dewar@adacore.com>
1178
1179 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
1180 * restrict.ads (No_Use_Of_Entity): New table.
1181 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
1182 Ignore No_Use_Of_Entity (will be processed in parser).
1183 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
1184
1185 2015-01-06 Vincent Celier <celier@adacore.com>
1186
1187 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
1188 to check for an extended project, if a project does not have
1189 yet a project declaration.
1190
1191 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
1192
1193 * scos.ads: Update documentation about the SCO table build
1194 process and about table records format.
1195 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
1196 (SCO_Record_Filtered): New procedure.
1197 (Set_SCO_Logical_Operator): New procedure.
1198 (dsco): Update documentation.
1199 * par_sco.adb: Update library-level comments.
1200 (SCO_Generation_State_Type): New type.
1201 (SCO_Generation_State): New variable.
1202 (SCO_Raw_Table): New package instanciation.
1203 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
1204 ("<"): New.
1205 (Tristate): New type.
1206 (Is_Logical_Operator): Return Tristate and update documentation.
1207 (Has_Decision): Update call to Is_Logical_Operator and complete
1208 documentation.
1209 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
1210 comment, add an assertion for state checking and change
1211 references to SCO_Table into SCO_Raw_Table.
1212 (dsco): Refactor to dump the raw and the filtered tables.
1213 (Process_Decisions.Output_Decision_Operand): Handle putative
1214 short-circuit operators.
1215 (Process_Decisions.Output_Element): Update references
1216 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
1217 (Process_Decisions.Process_Decision_Operand): Update call
1218 to Is_Logical_Operator.
1219 (Process_Decisions.Process_Node): Handle putative short-circuit
1220 operators and change references to
1221 SCO_Table into SCO_Raw_Table.
1222 (SCO_Output): Add an assertion
1223 for state checking and remove code that used to stamp out SCO entries.
1224 (SCO_Pragma_Disabled): Change reference to SCO_Table
1225 into SCO_Raw_Table.
1226 (SCO_Record): Rename to SCO_Record_Raw,
1227 add an assertion for state checking and change references
1228 to SCO_Table into SCO_Raw_Table.
1229 (Set_SCO_Condition): Add an assertion for state checking, update
1230 references to Condition_Pragma_Hash_Table and change references to
1231 SCO_Table into SCO_Raw_Table.
1232 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
1233 change references to SCO_Table into SCO_Raw_Table.
1234 (Set_SCO_Logical_Operator): New procedure.
1235 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
1236 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
1237 (SCO_Record_Fildered): New procedure.
1238 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
1239 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
1240 output SCOs.
1241 * par-load.adb (Load): Update reference to SCO_Record.
1242 * par.adb (Par): Update reference to SCO_Record.
1243 * put_scos.adb (Put_SCOs): Add an assertion to check that no
1244 putative SCO condition reaches this end.
1245 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
1246 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
1247 when corresponding to an "and"/"or" operator affected by the
1248 Short_Circuit_And_Or pragma.
1249
1250 2015-01-06 Robert Dewar <dewar@adacore.com>
1251
1252 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
1253 msg for attempted USE of generic subprogram or subprogram.
1254
1255 2015-01-06 Robert Dewar <dewar@adacore.com>
1256
1257 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
1258 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
1259 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
1260
1261 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1262
1263 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
1264 that specify stream subprograms, if the prefix is a class-wide
1265 type then the generated attribute definition clause must apply
1266 to the same class-wide type.
1267 (Default_Iterator): An iterator defined by an aspect of some
1268 container type T must have a first parameter of type T, T'class,
1269 or an access to such (from code reading RM 5.5.1 (2/3)).
1270
1271 2015-01-06 Arnaud Charlet <charlet@adacore.com>
1272
1273 * gnat1drv.adb: Minor: complete previous change.
1274
1275 2015-01-06 Olivier Hainque <hainque@adacore.com>
1276
1277 * set_targ.ads (C_Type_For): New function. Return the name of
1278 a C type supported by the back-end and suitable as a basis to
1279 construct the standard Ada floating point type identified by
1280 the T parameter. This is used as a common ground to feed both
1281 ttypes values and the GNAT tree nodes for the standard floating
1282 point types.
1283 * set_targ.adb (Long_Double_Index): The index at which "long
1284 double" gets registered in the FPT_Mode_Table. This is useful to
1285 know whether we have a "long double" available at all and get at
1286 it's characteristics without having to search the FPT_Mode_Table
1287 when we need to decide which C type should be used as the
1288 basis for Long_Long_Float in Ada.
1289 (Register_Float_Type): Fill Long_Double_Index.
1290 (FPT_Mode_Index_For): New function. Return the index in
1291 FPT_Mode_Table that designates the entry corresponding to the
1292 provided C type name.
1293 (FPT_Mode_Index_For): New function. Return the index in
1294 FPT_Mode_Table that designates the entry for a back-end type
1295 suitable as a basis to construct the standard Ada floating point
1296 type identified by the input T parameter.
1297 (elaboration code): Register_Back_End_Types unconditionally,
1298 so C_Type_For can operate regardless of -gnateT. Do it
1299 early so we can query it for the floating point sizes, via
1300 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
1301 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
1302 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
1303 which C type should be used as the basis for the construction
1304 of the Standard Ada floating point types.
1305 * get_targ.ads (Get_Float_Size, Get_Double_Size,
1306 Get_Long_Double_Size): Remove.
1307 * get_targ.adb: Likewise.
1308
1309 2015-01-06 Thomas Quinot <quinot@adacore.com>
1310
1311 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
1312 parameter and rename to...
1313 (In_RCI_Visible_Declarations): Fix handling of private part of nested
1314 package.
1315 (Validate_RCI_Subprogram_Declaration): Reject illegal function
1316 returning anonymous access in RCI unit.
1317
1318 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1319
1320 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
1321 function wrapper may be a homonym of another local declaration.
1322 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
1323 build function and operator wrappers after the actual subprogram
1324 has been resolved, and replace the standard renaming declaration
1325 with the declaration of wrapper.
1326 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
1327 make public for use elsewhere.
1328 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
1329 rewrite, now that actual is fully resolved when wrapper is
1330 constructed.
1331
1332 2015-01-06 Javier Miranda <miranda@adacore.com>
1333
1334 * exp_disp.adb: Revert previous change.
1335
1336 2015-01-06 Robert Dewar <dewar@adacore.com>
1337
1338 * exp_util.adb: Change name Name_Table_Boolean to
1339 Name_Table_Boolean1.
1340 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
1341 Introduce Name_Table_Boolean2/3.
1342 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
1343 Introduce Name_Table_Boolean2/3.
1344 * par-ch13.adb: Change name Name_Table_Boolean to
1345 Name_Table_Boolean1.
1346
1347 2015-01-06 Bob Duff <duff@adacore.com>
1348
1349 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
1350
1351 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1352
1353 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
1354 others choice that covers multiple components, analyze each
1355 copy with the type of the component even in compile-only mode,
1356 to detect potential accessibility errors.
1357
1358 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1359
1360 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
1361 (Resolve_Actuals): An effectively volatile out
1362 parameter cannot act as an in or in out actual in a call.
1363 (Resolve_Entity_Name): An effectively volatile out parameter
1364 cannot be read.
1365
1366 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1367
1368 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
1369 the expansion of an expression function it may be pre-analyzed
1370 if a 'access attribute is applied to the function, in which case
1371 last_entity may have been assigned already.
1372
1373 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1374
1375 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
1376 type and actual has the corresponding full view, there is no
1377 error, but a case of use of incomplete type in a predicate or
1378 invariant expression.
1379
1380 2015-01-06 Vincent Celier <celier@adacore.com>
1381
1382 * makeutl.adb (Insert_No_Roots): Make sure that the same source
1383 in two different project tree is checked in both trees, if they
1384 are sources of two different projects, extended or not.
1385
1386 2015-01-06 Arnaud Charlet <charlet@adacore.com>
1387
1388 * gnat1drv.adb: Minor code clean up.
1389 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
1390
1391 2015-01-06 Bob Duff <duff@adacore.com>
1392
1393 * osint.adb (Read_Source_File): Don't print out
1394 file name unless T = Source.
1395
1396 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1397
1398 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
1399 recognize improper uses of constant_reference types as actuals
1400 for in-out parameters.
1401 (Check_Function_Call): Do not collect identifiers if function
1402 name is missing because of previous error.
1403
1404 2015-01-06 Robert Dewar <dewar@adacore.com>
1405
1406 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
1407 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
1408 Minor change of name Name_Table_Info => Name_Table_Int.
1409
1410 2015-01-06 Robert Dewar <dewar@adacore.com>
1411
1412 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
1413 in previous checkin.
1414 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
1415 of bounds.
1416 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
1417
1418 2015-01-06 Vincent Celier <celier@adacore.com>
1419
1420 * a-strsup.adb (Times (Natural;String;Positive)): Raise
1421 Length_Error, not Index_Error, when the result is too long.
1422
1423 2015-01-06 Thomas Quinot <quinot@adacore.com>
1424
1425 * a-direct.adb (Create_Path): Minor error handling and
1426 performance improvement.
1427
1428 2015-01-06 Robert Dewar <dewar@adacore.com>
1429
1430 * checks.ads, sem_ch12.adb: Minor reformatting.
1431 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
1432 zero check for fixed-point case if Backend_Divide_Checks_On_Target
1433 is False.
1434
1435 2015-01-06 Robert Dewar <dewar@adacore.com>
1436
1437 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
1438 Do not set restriction No_Elaboration_Code unless the pragma
1439 appears in the main unit).
1440
1441 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1442
1443 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
1444 that with clause has already been analyzed before checking kind
1445 of with_clause.
1446
1447 2015-01-06 Robert Dewar <dewar@adacore.com>
1448
1449 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
1450 (as required by RM).
1451
1452 2015-01-06 Arnaud Charlet <charlet@adacore.com>
1453
1454 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
1455
1456 2015-01-06 Robert Dewar <dewar@adacore.com>
1457
1458 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
1459 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
1460
1461 2015-01-06 Javier Miranda <miranda@adacore.com>
1462
1463 * exp_disp.adb (Expand_Interface_Conversion): No displacement
1464 of the pointer to the object needed when the type of the operand
1465 is not an interface type and the interface is one of its parent
1466 types (since they share the primary dispatch table).
1467
1468 2015-01-06 Vincent Celier <celier@adacore.com>
1469
1470 * prj-env.adb: Minor comment update.
1471
1472 2015-01-06 Javier Miranda <miranda@adacore.com>
1473
1474 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
1475 access types whose target type is an interface type to operands
1476 that are access types; required to report an error when the
1477 operand is not an access type.
1478
1479 2015-01-06 Bob Duff <duff@adacore.com>
1480
1481 * a-cfinve.adb (Copy): Set the discriminant to the Length when
1482 Capacity = 0.
1483 * a-cofove.ads (Capacity): Add a postcondition.
1484 * a-cfinve.ads (Capacity): Add a postcondition.
1485 (Reserve_Capacity): Correct the postcondition in the case where
1486 Capacity = 0; that means "Capacity => Length (Container)".
1487 * a-cofove.adb (Elems[c]): Add a comment
1488 explaining the dangers and how to avoid them.
1489
1490 2015-01-06 Ed Schonberg <schonberg@adacore.com>
1491
1492 * sem_ch12.adb: Code clean up.
1493
1494 2015-01-06 Arnaud Charlet <charlet@adacore.com>
1495
1496 * gnatvsn.ads: Bump copyright year.
1497
1498 2015-01-06 Robert Dewar <dewar@adacore.com>
1499
1500 * s-taskin.ads, s-traces.ads: Minor reformatting.
1501 * exp_util.adb: Minor typo fix.
1502
1503 2015-01-06 Vincent Celier <celier@adacore.com>
1504
1505 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
1506 with the runtime name.
1507 * prj-env.adb (Initialize_Default_Project_Path): When both
1508 Target_Name and Runtime_Name are not empty string, add to the
1509 project path the two directories .../lib/gnat and .../share/gpr
1510 related to the runtime.
1511 * prj-env.ads (Initialize_Default_Project_Path): New String
1512 parameter Runtime_Name, defaulted to the empty string.
1513
1514 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1515
1516 * frontend.adb: Guard against the case where a configuration
1517 pragma may be split into multiple pragmas and the original
1518 rewritten as a null statement.
1519 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
1520 pragma using Insert_Before rather than Insert_Action. This
1521 takes care of the configuration pragma case where Insert_Action
1522 would fail.
1523
1524 2015-01-06 Bob Duff <duff@adacore.com>
1525
1526 * a-coboho.ads (Element_Access): Add "pragma
1527 No_Strict_Aliasing (Element_Access);". This is needed because
1528 we are unchecked-converting from Address to Element_Access.
1529 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
1530 result to be 1.
1531
1532 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1533
1534 * sem_res.adb (Resolve_Actuals): Remove the
1535 restriction which prohibits volatile actual parameters with
1536 enabled external propery Async_Writers to act appear in procedure
1537 calls where the corresponding formal is of mode OUT.
1538
1539 2015-01-05 Jakub Jelinek <jakub@redhat.com>
1540
1541 * gnat_ugn.texi: Bump @copying's copyright year.
1542
1543 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
1544
1545 PR ada/64492
1546 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
1547
1548 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
1549
1550 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
1551 of unchecked asprintf.
1552
1553 \f
1554 Copyright (C) 2015 Free Software Foundation, Inc.
1555
1556 Copying and distribution of this file, with or without modification,
1557 are permitted in any medium without royalty provided the copyright
1558 notice and this notice are preserved.