1 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
3 * einfo.ads (Has_Independent_Components): Document extended
5 * einfo.adb (Has_Independent_Components): Remove obsolete assertion.
6 (Set_Has_Independent_Components): Adjust assertion.
7 * sem_prag.adb (Analyze_Pragma): Also set Has_Independent_Components
8 for pragma Atomic_Components. Set Has_Independent_Components
9 on the object instead of the type for an object declaration with
10 pragma Independent_Components.
12 2015-01-06 Olivier Hainque <hainque@adacore.com>
14 * set_targ.adb (Read_Target_Dependent_Values): Set
15 Long_Double_Index when "long double" is read.
16 (elaboration code): Register_Back_End_Types only when not reading from
17 config files. Doing otherwise is pointless and error prone.
19 2015-01-06 Robert Dewar <dewar@adacore.com>
21 * s-valrea.adb (Value_Real): Check for Str'Last = Positive'Last
23 2015-01-06 Robert Dewar <dewar@adacore.com>
25 * a-wtgeau.adb, a-ztgeau.adb, a-tigeau.adb (String_Skip): Raise PE if
26 Str'Last = Positive'Last.
28 2015-01-06 Ed Schonberg <schonberg@adacore.com>
30 * sem_ch6.adb (Matches_Limited_View): Handle properly the case
31 where the non-limited type is a generic actual and appears as
32 a subtype of the non-limited view of the other.
33 * freeze.adb (Build_Renamed_Body): If the return type of the
34 declaration that is being completed is a limited view and the
35 non-limited view is available, use it in the specification of
38 2015-01-06 Javier Miranda <miranda@adacore.com>
40 * exp_disp.adb: Reapplying reversed patch.
42 2015-01-06 Ed Schonberg <schonberg@adacore.com>
44 * sem_ch3.adb (Find_Type_Name): If there is a previous tagged
45 incomplete view, the type of the classwide type common to both
46 views is the type being declared.
48 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
50 * einfo.ads (Is_Independent): Further document extended usage.
52 2015-01-06 Eric Botcazou <ebotcazou@adacore.com>
54 * einfo.ads (Is_Independent): Document extended usage.
55 * einfo.adb (Is_Independent): Remove obsolete assertion.
56 (Set_Is_Independent): Likewise.
57 * sem_prag.adb (Process_Atomic_Shared_Volatile): Rename into...
58 (Process_Atomic_Independent_Shared_Volatile): ...this.
59 Deal with pragma Independent here.
60 (Analyze_Pragma): Adjust
61 to above renaming and also invoke it for pragma Independent.
62 Adjust comment for Independent_Components.
64 2015-01-06 Robert Dewar <dewar@adacore.com>
66 * snames.ads-tmpl: Remove entries for attribute Enum_Image.
67 * exp_attr.adb: Remove reference to Attribute_Enum_Image.
69 2015-01-06 Robert Dewar <dewar@adacore.com>
71 * s-vallli.adb (Value_Long_Long_Integer): Handle case of Str'Last
73 * s-valllu.adb (Value_Long_Long_Unsigned): Handle case of
74 Str'Last = Positive'Last.
76 2015-01-06 Robert Dewar <dewar@adacore.com>
78 * sem_prag.adb (Process_Inline): Remove redundant construct
79 warning (-gnatw.r) for an ineffective pragma Inline.
81 2015-01-06 Robert Dewar <dewar@adacore.com>
83 * s-valint.adb: Fix typo in last checkin.
84 * s-valuns.adb (Value_Unsigned): More efficient fix for
86 * sem_attr.adb (Analyze_Attribute): Minor reformatting
87 (Eval_Attribute): Static ervaluation of 'Img for enumeration types.
89 2015-01-06 Robert Dewar <dewar@adacore.com>
91 * s-valint.adb, s-valuns.adb (Value_Integer): Deal with case where
92 Str'Last = Positive'Last
94 2015-01-06 Thomas Quinot <quinot@adacore.com>
96 * xoscons.adb: Display exception information and return non-zero
97 exit status in top level exception handler.
99 2015-01-06 Ed Schonberg <schonberg@adacore.com>
101 * sem_ch8.adb: Code clean up.
103 2015-01-06 Tristan Gingold <gingold@adacore.com>
105 * targparm.ads: Remove obsolete comment.
107 2015-01-06 Olivier Hainque <hainque@adacore.com>
109 * gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable): When
110 constructing a ref to variable, update inner_const_flag from the
111 variable TREE_READONLY attribute.
112 * gcc-interface/targtyps.c (WIDEST_HARDWARE_FP_SIZE): Remove default
114 (get_target_float_size): Remove.
115 (get_target_double_size): Remove.
116 (get_target_long_double_size): Remove.
118 2015-01-06 Pascal Obry <obry@adacore.com>
120 * adaint.c (ProcListEvt): Set to NULL.
121 * rtinit.c: New file.
122 (__gnat_rt_init_count): New reference counter set to 0.
123 (__gnat_runtime_initialize): Move code here from __gnat_initialize when
124 this code is actually needed for the runtime initialization. This
125 routine returns immediately if the initialization has already been done.
126 * final.c: Revert previous change.
127 * rtfinal.c: New file.
128 (__gnat_runtime_finalize)[Win32]: Add finalization of the critical
129 section and event. The default version of this routine is empty (except
130 for the reference counting code). This routine returns immediately if
131 some others libraries are referencing the runtime.
132 * bindgen.adb (Gen_Adainit): Generate call to Runtime_Initialize
133 remove circuitry to initialize the signal handler as this is
134 now done by the runtime initialization routine.
135 (Gen_Adafinal): Generate call to Runtime_Finalize.
136 * gnat_ugn.texi: Update documentation about concurrency and
137 initialization/finalization of the run-time.
138 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Add
139 references to rtfinal.o and rtinit.o
141 2015-01-06 Robert Dewar <dewar@adacore.com>
143 * exp_attr.adb (Expand_N_Attribute_Reference): Add dummy entry
145 * sem_attr.adb: Implement Enum_Image attribute.
146 * snames.ads-tmpl: Add entries for Enum_Image attribute.
148 2015-01-06 Robert Dewar <dewar@adacore.com>
150 * namet.ads: Document use of Boolean2 for No_Use_Of_Entity.
151 * restrict.ads (No_Use_Of_Entity): New table.
152 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
153 Ignore No_Use_Of_Entity (will be processed in parser).
154 * snames.ads-tmpl: Add entry for Name_No_Use_Of_Entity.
156 2015-01-06 Vincent Celier <celier@adacore.com>
158 * prj-tree.adb (Imported_Or_Extended_Project_Of): Do not try
159 to check for an extended project, if a project does not have
160 yet a project declaration.
162 2015-01-06 Pierre-Marie Derodat <derodat@adacore.com>
164 * scos.ads: Update documentation about the SCO table build
165 process and about table records format.
166 * par_sco.ads (SCO_Record): Rename to SCO_Record_Raw.
167 (SCO_Record_Filtered): New procedure.
168 (Set_SCO_Logical_Operator): New procedure.
169 (dsco): Update documentation.
170 * par_sco.adb: Update library-level comments.
171 (SCO_Generation_State_Type): New type.
172 (SCO_Generation_State): New variable.
173 (SCO_Raw_Table): New package instanciation.
174 (Condition_Pragma_Hash_Table): Rename to SCO_Raw_Hash_Table.
176 (Tristate): New type.
177 (Is_Logical_Operator): Return Tristate and update documentation.
178 (Has_Decision): Update call to Is_Logical_Operator and complete
180 (Set_Table_Entry): Rename to Set_Raw_Table_Entry, update
181 comment, add an assertion for state checking and change
182 references to SCO_Table into SCO_Raw_Table.
183 (dsco): Refactor to dump the raw and the filtered tables.
184 (Process_Decisions.Output_Decision_Operand): Handle putative
185 short-circuit operators.
186 (Process_Decisions.Output_Element): Update references
187 to Set_Table_Entry and to Condition_Pragma_Hash_Table.
188 (Process_Decisions.Process_Decision_Operand): Update call
189 to Is_Logical_Operator.
190 (Process_Decisions.Process_Node): Handle putative short-circuit
191 operators and change references to
192 SCO_Table into SCO_Raw_Table.
193 (SCO_Output): Add an assertion
194 for state checking and remove code that used to stamp out SCO entries.
195 (SCO_Pragma_Disabled): Change reference to SCO_Table
197 (SCO_Record): Rename to SCO_Record_Raw,
198 add an assertion for state checking and change references
199 to SCO_Table into SCO_Raw_Table.
200 (Set_SCO_Condition): Add an assertion for state checking, update
201 references to Condition_Pragma_Hash_Table and change references to
202 SCO_Table into SCO_Raw_Table.
203 (Set_SCO_Pragma_Enabled): Add an assertion for state checking and
204 change references to SCO_Table into SCO_Raw_Table.
205 (Set_SCO_Logical_Operator): New procedure.
206 (Traverse_Declarations_Or_Statements.Set_Statement_Entry): Update
207 references to Set_Table_Entry and to Condition_Pragma_Hash_Table.
208 (SCO_Record_Fildered): New procedure.
209 * gnat1drv.adb (Gnat1drv): Invoke the SCO filtering pass.
210 * lib-writ.adb (Write_ALI): Invoke the SCO filtering pass and
212 * par-load.adb (Load): Update reference to SCO_Record.
213 * par.adb (Par): Update reference to SCO_Record.
214 * put_scos.adb (Put_SCOs): Add an assertion to check that no
215 putative SCO condition reaches this end.
216 * sem_ch10.adb (Analyze_Proper_Body): Update reference to SCO_Record.
217 * sem_res.adb (Resolve_Logical_Op): Validate putative SCOs
218 when corresponding to an "and"/"or" operator affected by the
219 Short_Circuit_And_Or pragma.
221 2015-01-06 Robert Dewar <dewar@adacore.com>
223 * sem_ch8.adb (Analyze_Use_Package): Give more specific error
224 msg for attempted USE of generic subprogram or subprogram.
226 2015-01-06 Robert Dewar <dewar@adacore.com>
228 * s-valllu.adb, a-tiinau.adb, a-timoau.adb, a-ztinau.adb, a-ztmoau.adb,
229 s-valuns.adb, s-valrea.adb, a-wtflau.adb, a-tiflau.adb, a-ztflau.adb,
230 a-wtinau.adb, a-wtmoau.adb: Document recognition of : in place of #.
232 2015-01-06 Ed Schonberg <schonberg@adacore.com>
234 * sem_ch13.adb (Analyze_Aspect_Specifications): For aspects
235 that specify stream subprograms, if the prefix is a class-wide
236 type then the generated attribute definition clause must apply
237 to the same class-wide type.
238 (Default_Iterator): An iterator defined by an aspect of some
239 container type T must have a first parameter of type T, T'class,
240 or an access to such (from code reading RM 5.5.1 (2/3)).
242 2015-01-06 Arnaud Charlet <charlet@adacore.com>
244 * gnat1drv.adb: Minor: complete previous change.
246 2015-01-06 Olivier Hainque <hainque@adacore.com>
248 * set_targ.ads (C_Type_For): New function. Return the name of
249 a C type supported by the back-end and suitable as a basis to
250 construct the standard Ada floating point type identified by
251 the T parameter. This is used as a common ground to feed both
252 ttypes values and the GNAT tree nodes for the standard floating
254 * set_targ.adb (Long_Double_Index): The index at which "long
255 double" gets registered in the FPT_Mode_Table. This is useful to
256 know whether we have a "long double" available at all and get at
257 it's characteristics without having to search the FPT_Mode_Table
258 when we need to decide which C type should be used as the
259 basis for Long_Long_Float in Ada.
260 (Register_Float_Type): Fill Long_Double_Index.
261 (FPT_Mode_Index_For): New function. Return the index in
262 FPT_Mode_Table that designates the entry corresponding to the
263 provided C type name.
264 (FPT_Mode_Index_For): New function. Return the index in
265 FPT_Mode_Table that designates the entry for a back-end type
266 suitable as a basis to construct the standard Ada floating point
267 type identified by the input T parameter.
268 (elaboration code): Register_Back_End_Types unconditionally,
269 so C_Type_For can operate regardless of -gnateT. Do it
270 early so we can query it for the floating point sizes, via
271 FPT_Mode_Index_For. Initialize Float_Size, Double_Size and
272 Long_Double_Size from the FPT_Mode_Table, as cstand will do.
273 * cstand.adb (Create_Float_Types): Use C_Type_For to determine
274 which C type should be used as the basis for the construction
275 of the Standard Ada floating point types.
276 * get_targ.ads (Get_Float_Size, Get_Double_Size,
277 Get_Long_Double_Size): Remove.
278 * get_targ.adb: Likewise.
280 2015-01-06 Thomas Quinot <quinot@adacore.com>
282 * sem_cat.adb (In_RCI_Declaration): Remove unnecessary
283 parameter and rename to...
284 (In_RCI_Visible_Declarations): Fix handling of private part of nested
286 (Validate_RCI_Subprogram_Declaration): Reject illegal function
287 returning anonymous access in RCI unit.
289 2015-01-06 Ed Schonberg <schonberg@adacore.com>
291 * sem_ch6.adb (New_Overloaded_Entity): In GNATprove mode, a
292 function wrapper may be a homonym of another local declaration.
293 * sem_ch8.adb (Analyze_Subprogram_Renaming): In GNATprove mode,
294 build function and operator wrappers after the actual subprogram
295 has been resolved, and replace the standard renaming declaration
296 with the declaration of wrapper.
297 * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wraooer):
298 make public for use elsewhere.
299 * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wraooer):
300 rewrite, now that actual is fully resolved when wrapper is
303 2015-01-06 Javier Miranda <miranda@adacore.com>
305 * exp_disp.adb: Revert previous change.
307 2015-01-06 Robert Dewar <dewar@adacore.com>
309 * exp_util.adb: Change name Name_Table_Boolean to
311 * namet.adb: Change name Name_Table_Boolean to Name_Table_Boolean1
312 Introduce Name_Table_Boolean2/3.
313 * namet.ads: Change name Name_Table_Boolean to Name_Table_Boolean1
314 Introduce Name_Table_Boolean2/3.
315 * par-ch13.adb: Change name Name_Table_Boolean to
318 2015-01-06 Bob Duff <duff@adacore.com>
320 * gnat_rm.texi: Improve documentation regarding No_Task_Termination.
322 2015-01-06 Ed Schonberg <schonberg@adacore.com>
324 * sem_aggr.adb (Resolve_Record_Aggregte, Get_Value): For an
325 others choice that covers multiple components, analyze each
326 copy with the type of the component even in compile-only mode,
327 to detect potential accessibility errors.
329 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
331 * sem_res.adb (Is_Assignment_Or_Object_Expression): New routine.
332 (Resolve_Actuals): An effectively volatile out
333 parameter cannot act as an in or in out actual in a call.
334 (Resolve_Entity_Name): An effectively volatile out parameter
337 2015-01-06 Ed Schonberg <schonberg@adacore.com>
339 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): If the body is
340 the expansion of an expression function it may be pre-analyzed
341 if a 'access attribute is applied to the function, in which case
342 last_entity may have been assigned already.
344 2015-01-06 Ed Schonberg <schonberg@adacore.com>
346 * sem_ch4.adb (Analyze_One_Call): If formal has an incomplete
347 type and actual has the corresponding full view, there is no
348 error, but a case of use of incomplete type in a predicate or
349 invariant expression.
351 2015-01-06 Vincent Celier <celier@adacore.com>
353 * makeutl.adb (Insert_No_Roots): Make sure that the same source
354 in two different project tree is checked in both trees, if they
355 are sources of two different projects, extended or not.
357 2015-01-06 Arnaud Charlet <charlet@adacore.com>
359 * gnat1drv.adb: Minor code clean up.
360 (Adjust_Global_Switches): Ignore gnatprove_mode in codepeer_mode.
362 2015-01-06 Bob Duff <duff@adacore.com>
364 * osint.adb (Read_Source_File): Don't print out
365 file name unless T = Source.
367 2015-01-06 Ed Schonberg <schonberg@adacore.com>
369 * sem_util.adb (Is_Variable, Is_OK_Variable_For_Out_Formal):
370 recognize improper uses of constant_reference types as actuals
371 for in-out parameters.
372 (Check_Function_Call): Do not collect identifiers if function
373 name is missing because of previous error.
375 2015-01-06 Robert Dewar <dewar@adacore.com>
377 * ali-util.adb, sem_prag.adb, rtsfind.adb, sem_util.adb, sem_res.adb,
378 ali.adb, binde.adb, namet.adb, namet.ads, gnatls.adb, bcheck.adb:
379 Minor change of name Name_Table_Info => Name_Table_Int.
381 2015-01-06 Robert Dewar <dewar@adacore.com>
383 * exp_strm.adb (Build_Elementary_Input_Call): Clarify comments
385 * freeze.adb (Freeze_Fixed_Point_Type): Add warning for shaving
387 * sem_prag.adb, sem_ch10.adb, sem_ch6.adb: Minor reformatting.
389 2015-01-06 Vincent Celier <celier@adacore.com>
391 * a-strsup.adb (Times (Natural;String;Positive)): Raise
392 Length_Error, not Index_Error, when the result is too long.
394 2015-01-06 Thomas Quinot <quinot@adacore.com>
396 * a-direct.adb (Create_Path): Minor error handling and
397 performance improvement.
399 2015-01-06 Robert Dewar <dewar@adacore.com>
401 * checks.ads, sem_ch12.adb: Minor reformatting.
402 * exp_ch4.adb (Expand_N_Op_Divide): Generate explicit divide by
403 zero check for fixed-point case if Backend_Divide_Checks_On_Target
406 2015-01-06 Robert Dewar <dewar@adacore.com>
408 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
409 Do not set restriction No_Elaboration_Code unless the pragma
410 appears in the main unit).
412 2015-01-06 Ed Schonberg <schonberg@adacore.com>
414 * sem_ch10.adb (Is_Regular_With_Clause): Add guard to verify
415 that with clause has already been analyzed before checking kind
418 2015-01-06 Robert Dewar <dewar@adacore.com>
420 * exp_strm.adb (Build_Elementary_Input_Call): Return base type
423 2015-01-06 Arnaud Charlet <charlet@adacore.com>
425 * a-reatim.adb ("/"): Add explicit pragma Unsuppress (Division_Check).
427 2015-01-06 Robert Dewar <dewar@adacore.com>
429 * sem_prag.adb (Process_Suppress_Unsuppress): Add extra warning
430 for ignoring pragma Suppress (Elaboration_Check) in SPARK mode.
432 2015-01-06 Javier Miranda <miranda@adacore.com>
434 * exp_disp.adb (Expand_Interface_Conversion): No displacement
435 of the pointer to the object needed when the type of the operand
436 is not an interface type and the interface is one of its parent
437 types (since they share the primary dispatch table).
439 2015-01-06 Vincent Celier <celier@adacore.com>
441 * prj-env.adb: Minor comment update.
443 2015-01-06 Javier Miranda <miranda@adacore.com>
445 * sem_res.adb (Valid_Conversion): Restrict the checks on anonymous
446 access types whose target type is an interface type to operands
447 that are access types; required to report an error when the
448 operand is not an access type.
450 2015-01-06 Bob Duff <duff@adacore.com>
452 * a-cfinve.adb (Copy): Set the discriminant to the Length when
454 * a-cofove.ads (Capacity): Add a postcondition.
455 * a-cfinve.ads (Capacity): Add a postcondition.
456 (Reserve_Capacity): Correct the postcondition in the case where
457 Capacity = 0; that means "Capacity => Length (Container)".
458 * a-cofove.adb (Elems[c]): Add a comment
459 explaining the dangers and how to avoid them.
461 2015-01-06 Ed Schonberg <schonberg@adacore.com>
463 * sem_ch12.adb: Code clean up.
465 2015-01-06 Arnaud Charlet <charlet@adacore.com>
467 * gnatvsn.ads: Bump copyright year.
469 2015-01-06 Robert Dewar <dewar@adacore.com>
471 * s-taskin.ads, s-traces.ads: Minor reformatting.
472 * exp_util.adb: Minor typo fix.
474 2015-01-06 Vincent Celier <celier@adacore.com>
476 * gnatls.adb (Search_RTS): Invoke Initialize_Default_Project_Path
477 with the runtime name.
478 * prj-env.adb (Initialize_Default_Project_Path): When both
479 Target_Name and Runtime_Name are not empty string, add to the
480 project path the two directories .../lib/gnat and .../share/gpr
481 related to the runtime.
482 * prj-env.ads (Initialize_Default_Project_Path): New String
483 parameter Runtime_Name, defaulted to the empty string.
485 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
487 * frontend.adb: Guard against the case where a configuration
488 pragma may be split into multiple pragmas and the original
489 rewritten as a null statement.
490 * sem_prag.adb (Analyze_Pragma): Insert a brand new Check_Policy
491 pragma using Insert_Before rather than Insert_Action. This
492 takes care of the configuration pragma case where Insert_Action
495 2015-01-06 Bob Duff <duff@adacore.com>
497 * a-coboho.ads (Element_Access): Add "pragma
498 No_Strict_Aliasing (Element_Access);". This is needed because
499 we are unchecked-converting from Address to Element_Access.
500 * a-cofove.ads, a-cofove.adb (Elems,Elemsc): Fix bounds of the
503 2015-01-06 Hristian Kirtchev <kirtchev@adacore.com>
505 * sem_res.adb (Resolve_Actuals): Remove the
506 restriction which prohibits volatile actual parameters with
507 enabled external propery Async_Writers to act appear in procedure
508 calls where the corresponding formal is of mode OUT.
510 2015-01-05 Jakub Jelinek <jakub@redhat.com>
512 * gnat_ugn.texi: Bump @copying's copyright year.
514 2015-01-05 Eric Botcazou <ebotcazou@adacore.com>
517 * gcc-interface/Makefile.in (../stamp-tools): Reinstate dropped code.
519 2015-01-04 Uros Bizjak <ubizjak@gmail.com>
521 * gcc-interface/misc.c (internal_error_function): Use xasprintf instead
522 of unchecked asprintf.
525 Copyright (C) 2015 Free Software Foundation, Inc.
527 Copying and distribution of this file, with or without modification,
528 are permitted in any medium without royalty provided the copyright
529 notice and this notice are preserved.