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