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