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