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