[Ada] Minor reformatting
[gcc.git] / gcc / ada / ChangeLog
1 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
2
3 * binde.adb, par-ch6.adb, par-ch9.adb, sem_ch12.adb, sem_ch13.adb:
4 Minor reformatting.
5
6 2018-01-11 Justin Squirek <squirek@adacore.com>
7
8 * par-ch6.adb (Scan_Body_Or_Expression_Function): Add additional check
9 to make sure a given expression function is properly parenthesized.
10
11 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
12
13 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Check the
14 categorization of a subprogram body which does not complete a previous
15 declaration.
16
17 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
18
19 * sem_ch10.adb (Check_Private_Child_Unit): Ensure that the enclosing
20 scope of package Ada is Standard.
21
22 2018-01-11 Ed Schonberg <schonberg@adacore.com>
23
24 * sem_ch13.adb (Replace_Type_Ref): Handle properly reference to a
25 subcomponent of the current entity when building the body for a dynamic
26 predicate function for a record with composite subcomponents.
27
28 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
29
30 * exp_aggr.adb (Convert_Aggr_In_Object_Decl): Update the call to
31 Establish_Transient_Scope.
32 (Convert_To_Assignments): Update the call to Establish_Transient_Scope.
33 (Expand_Array_Aggregate): Update the call to Establish_Transient_Scope.
34 * exp_ch6.adb (Expand_Call_Helper): Update the call to
35 Establish_Transient_Scope.
36 (Make_Build_In_Place_Call_In_Object_Declaration): Update the call to
37 Establish_Transient_Scope.
38 * exp_ch7.adb (Establish_Transient_Scope): Restructured. Delegate the
39 management of the secondary stack to an enclosing scope if there is no
40 suitable construct to wrap, and the transient scope was intended to
41 manage the secondary stack.
42 (Find_Node_To_Be_Wrapped): Restructured. A case_statement_alternative
43 is a valid boundary for a transient expression which comes from the
44 statements of the alternative, otherwise alternatives cannot be
45 wrapped. Assignments of controlled objects which have controlled
46 actions suppressed now stop the traversal as there is no point in
47 looking for an enclosing construct. Add several N_xxx_Body choices to
48 the termination conditions for completeness.
49 * exp_ch7.ads (Establish_Transient_Scope): Update the parameter profile
50 and the associated comment on usage.
51 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Update the call to
52 Establish_Transient_Scope.
53 (Add_Write_After): Update the call to Establish_Transient_Scope.
54 * sem_res.adb (Check_Initialization_Call): Removed.
55 (Resolve_Actuals): Account for additional cases where finalization
56 actions are required by utilizing predicate Needs_Finalization rather
57 than Is_Controlled.
58 (Resolve_Call): Type initialization procedures can now utilize
59 transient scopes to manage the secondary stack, thus preventing leaks
60 during initialization. Remove the previous kludgy algorithm which
61 attempts to manage the secondary stack at the object creation site.
62
63 2018-01-11 Jerome Lambourg <lambourg@adacore.com>
64
65 * libgnat/g-soliop__qnx.ads: New.
66 * adaint.c, adaint.h, cstreams.c, s-oscons-tmplt.c, sysdep.c: Update
67 for QNX.
68
69 2018-01-11 Bob Duff <duff@adacore.com>
70
71 * par-ch9.adb (P_Protected_Operation_Declaration_Opt): Give an error if
72 a null procedure occurs in a protected definition.
73
74 2018-01-11 Bob Duff <duff@adacore.com>
75
76 * binderr.ads, namet.ads: Minor reformatting.
77
78 2018-01-11 Bob Duff <duff@adacore.com>
79
80 * doc/gnat_ugn/gnat_utility_programs.rst: Improve documentation of
81 xml2gnat.
82
83 2018-01-11 Bob Duff <duff@adacore.com>
84
85 * binde.adb (Force_Elab_Order): Give an error if there are duplicate
86 unit names.
87
88 2018-01-11 Ed Schonberg <schonberg@adacore.com>
89
90 * sem_ch6.adb (Freeze_Expr_Types): If an access value is the
91 controlling argument of a dispatching call. freeze the corresponding
92 designated type.
93
94 2018-01-11 Ben Brosgol <brosgol@adacore.com>
95
96 * doc/Makefile: Add Sphinx option -W to treat warnings as errors.
97
98 2018-01-11 Ben Brosgol <brosgol@adacore.com>
99
100 * doc/gnat_rm/implementation_defined_aspects.rst: Minor type/wording
101 corrections.
102 * gnat_rm.texi: Regenerate.
103
104 2018-01-11 Ed Schonberg <schonberg@adacore.com>
105
106 * sem_ch12.adb (Check_Fixed_Point_Type): Do not apply check if the
107 formsl type corresponding to the actual fixed point type is private,
108 because in this case there can be no suspicious arithmetic operations
109 in the generic unless they reference a formal subprogram. Clarify
110 warning.
111
112 2018-01-11 Javier Miranda <miranda@adacore.com>
113
114 * exp_util.adb (Remove_Side_Effects): No action done for functions
115 returning class-wide types since it requires generating code using
116 'reference and the CCG target has no secondary stack.
117 * gnat1drv.adb: Disable building static dispatch tables when generating
118 C code.
119
120 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
121
122 * libgnat/a-direio.ads, libgnat/a-sequio.ads, libgnat/a-ststio.ads,
123 libgnat/a-textio.ads, libgnat/a-witeio.ads, libgnat/a-ztexio.ads
124 (File_Type): Add Default_Initial_Condition aspect.
125
126 2018-01-11 Pascal Obry <obry@adacore.com>
127
128 * libgnat/s-os_lib.adb (Normalize_Pathname): New implementation.
129
130 2018-01-11 Bob Duff <duff@adacore.com>
131
132 * doc/gnat_ugn/gnat_utility_programs.rst: Rewrite gnatpp documentation
133 to match what the Libadalang-based version does.
134 * doc/gnat_ugn/about_this_guide.rst: Update reference.
135
136 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
137
138 * sem_res.adb (Uses_SS): A controlled type requires the secondary stack
139 if it contains at least one component declaration employing a function
140 call returning on the secondary stack.
141
142 2018-01-11 Yannick Moy <moy@adacore.com>
143
144 * doc/gnat_rm/standard_and_implementation_defined_restrictions.rst:
145 Update description of restriction SPARK_05 with SPARK 2014.
146 * gnat_rm.texi: Regenerate.
147
148 2018-01-11 Vasiliy Fofanov <fofanov@adacore.com>
149
150 * doc/gnat_ugn/gnat_utility_programs.rst: Fix layout.
151
152 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
153
154 * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
155 sem_res.adb, sem_util.adb: Minor reformatting.
156
157 2018-01-11 Ed Schonberg <schonberg@adacore.com>
158
159 * sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
160 has a delayed aspect which must be processed at the point the type is
161 frozen. This mimics what is done when the predicate is provided by a
162 source aspect.
163
164 2018-01-11 Doug Rupp <rupp@adacore.com>
165
166 * init.c (vxworks): Add macro checks for __aarch64__.
167
168 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
169
170 * exp_util.adb (Add_Failure_Expression): New routine.
171 (Make_Predicate_Check): Reimplement the handling of Predicate_Failure.
172 * sem_util.adb (Is_Current_Instance): Code cleanup.
173
174 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
175
176 * libgnat/s-parame*.adb, libgnat/s-parame*.ads: Remove unneeded
177 Default_Sec_Stack_Size.
178 * libgnat/s-secsta.adb (SS_Allocate): Handle the fixed secondary stack
179 limit check so that the integer index does not overflow. Check the
180 dynamic stack allocation does not cause the secondary stack pointer to
181 overflow.
182 (SS_Info): Align colons.
183 (SS_Init): Cover the case when bootstraping with an old compiler that
184 does not set Default_SS_Size.
185
186 2018-01-11 Ed Schonberg <schonberg@adacore.com>
187
188 * sem_ch3.adb (Add_Internal_Interface_Entities): When checking the
189 legality of an inherited operation that may require overriding, ignore
190 primitive_wrappers that correspond to explicit operations that override
191 an interface primitive.
192 * exp_util.adb (Build_Class_Wide_Expression, Replace_Entity): If the
193 operation to which the class-wide expression applies is a protected op.
194 with a primitive_wrapper, verify that the updated inherited expression
195 does not contain an internal call to a protected function. This
196 completes the implementation of AI12-0166.
197
198 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
199
200 * ali.adb: Document the remaining letters available for ALI lines.
201 (Scan_ALI): A with clause is internal when it is encoded on a 'Z' line.
202 * ali.ads: Update type With_Record. Field
203 Implicit_With_From_Instantiation is no longer in use. Add field
204 Implicit_With.
205 * csinfo.adb (CSinfo): Remove the setup for attribute
206 Implicit_With_From_Instantiation.
207 * lib-writ.adb (Collect_Withs): Correct the logic which marks a unit as
208 either implicitly or explicitly withed.
209 (Is_Implicit_With_Clause): New routine.
210 (Write_ALI): Rename array Implicit_With to Has_Implicit_With to avoid
211 confusion with the with clause attribute by the same name.
212 (Write_With_Lines): Update the emission of 'W', 'Y', and 'Z' headers.
213 * rtsfind.adb (Maybe_Add_With): Code cleanup.
214 * sem_ch8.adb (Present_System_Aux): Code cleanup.
215 * sem_ch10.adb (Expand_With_Clause): Mark the with clause as generated
216 for a parent unit.
217 (Implicit_With_On_Parent): Mark the with clause as generated for a
218 parent unit.
219 * sem_ch12.adb (Inherit_Context): With clauses inherited by an
220 instantiation are no longer marked as Implicit_With_From_Instantiation
221 because they are already marked as implicit.
222 * sem_elab.adb (Ensure_Prior_Elaboration_Static): Remove the kludge
223 which marks implicit with clauses as related to an instantiation.
224 * sinfo.adb (Implicit_With_From_Instantiation): Removed.
225 (Parent_With): New routine.
226 (Set_Implicit_With_From_Instantiation): Removed.
227 (Set_Parent_With): New routine.
228 * sinfo.ads: Update the documentation of attribute Implicit_With.
229 Remove attribute Implicit_With_From_Instantiation along with
230 occurrences in nodes. Add attribute Parent_With along with occurrences
231 in nodes.
232 (Implicit_With_From_Instantiation): Removed along with pragma Inline.
233 (Parent_With): New routine along with pragma Inline.
234 (Set_Implicit_With_From_Instantiation): Removed along with pragma Inline.
235 (Set_Parent_With): New routine along with pragma Inline.
236
237 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
238
239 * sem_util.adb (Find_Enclosing_Scope): Return the unique defining
240 entity when the enclosing construct is a body.
241
242 2018-01-11 Patrick Bernardi <bernardi@adacore.com>
243
244 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Simplified
245 Secondary_Stack_Size handling as a pragma is now generated for the
246 corresponding aspect instead of an attribute. Pragma expression is
247 relocated instead of evaluated. Discriminant of the corresponding
248 record type is referenced rather than the type discriminant.
249 (Create_Secondary_Stack_For_Task, Make_Task_Create_Call): Update
250 Secondary_Stack_Size rep item checks to only look for the pragma rep.
251 * sem_ch13.adb (Analyze_One_Aspect): Transform
252 Aspect_Secondary_Stack_Size into a pragma instead of an attribute
253 because the attribute does not have visibility on a task type's
254 discriminants when the type's definition is expanded.
255 (Analyze_Attribute_Definition_Clause): Remove handling of
256 Attribute_Secondary_Stack_Size.
257 * snames.adb-tmpl, snames.ads-tmpl: Remove
258 Attribute_Secondary_Stack_Size, no longer used.
259
260 2018-01-11 Justin Squirek <squirek@adacore.com>
261
262 * sem_ch8.adb: Minor comment fix.
263
264 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
265
266 * exp_ch4.adb (Process_Action): Do not abandon the inspection of an
267 individual action because the action may denote a complex expression,
268 such as a case statement, which in turn may contain additional
269 transient objects.
270
271 2018-01-11 Ed Schonberg <schonberg@adacore.com>
272
273 * sem_aggr.adb (Resolve_Iterated_Component_Association): Perform
274 analysis on a copy of the expression with a copy of the index variable,
275 because full expansion will rewrite construct into a loop with the
276 original loop variable.
277 * exp_aggr.adb (Gen_Assign): Defer analysis and resolution if the
278 expression is an iterated component association. Full analysis takes
279 place when construct is rewritten as a loop.
280 (In_Place_Assign_OK, Safe_Component): An iterated_component_association
281 is not safe for in-place assignment.
282 * sem_util.adb (Remove_Entity): Handle properly the case of an isolated
283 entity with no homonym and no other entity in the scope.
284
285 2018-01-11 Justin Squirek <squirek@adacore.com>
286
287 * sem_prag.adb (Analyze_Pragma:Pragma_Loop_Variant): Modify error
288 message to be printed on the pragma argument identifier.
289
290 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
291
292 * exp_util.adb (Build_Invariant_Procedure_Declaration): Set the last
293 entity of the generated invariant procedure in order to construct a
294 proper entity chain.
295
296 2018-01-11 Piotr Trojanek <trojanek@adacore.com>
297
298 * sem_ch13.adb (Build_Predicate_Functions): Fix minor issues in
299 comment.
300
301 2018-01-11 Arnaud Charlet <charlet@adacore.com>
302
303 * einfo.ads, einfo.adb (Activation_Record_Component,
304 Set_Activation_Record_Component, Set_Is_Uplevel_Referenced_Entity):
305 Allow E_Discriminant.
306
307 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
308
309 * gcc-interface/decl.c (gnat_to_gnu_component_type): Apply the check
310 for atomic access once the component size is taken into account and
311 also do it if the component type is Atomic or Volatile_Full_Access.
312
313 2018-01-04 Eric Botcazou <ebotcazou@adacore.com>
314
315 * gnatvsn.ads: Bump copyright year.
316
317 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
318 Alan Hayward <alan.hayward@arm.com>
319 David Sherwood <david.sherwood@arm.com>
320
321 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_BITSIZE
322 as polynomial.
323
324 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
325 Alan Hayward <alan.hayward@arm.com>
326 David Sherwood <david.sherwood@arm.com>
327
328 * gcc-interface/misc.c (enumerate_modes): Treat GET_MODE_PRECISION
329 as polynomial.
330
331 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
332 Alan Hayward <alan.hayward@arm.com>
333 David Sherwood <david.sherwood@arm.com>
334
335 * gcc-interface/utils.c (gnat_types_compatible_p): Handle
336 polynomial TYPE_VECTOR_SUBPARTS.
337
338 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
339 Alan Hayward <alan.hayward@arm.com>
340 David Sherwood <david.sherwood@arm.com>
341
342 * gcc-interface/misc.c (enumerate_modes): Handle polynomial
343 GET_MODE_NUNITS.
344
345 2018-01-03 Jakub Jelinek <jakub@redhat.com>
346
347 Update copyright years.
348
349 * gnat_ugn.texi: Bump @copying's copyright year.
350 * gnat_rm.texi: Likewise.
351 \f
352 Copyright (C) 2018 Free Software Foundation, Inc.
353
354 Copying and distribution of this file, with or without modification,
355 are permitted in any medium without royalty provided the copyright
356 notice and this notice are preserved.