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