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