Debian Codegraph @

gcc/ada/ChangeLog

raw
1 2026-06-12 Release Manager
2
3 * GCC 15.3.0 released.
4
5 2026-06-10 Eric Botcazou <[email protected]>
6
7 PR ada/125695
8 * libgnat/s-genbig.adb ("**"): Do not drop the sign on the floor.
9 (Big_Exp): Take into account the parity of the exponent for -2.
10
11 2026-05-28 Eric Botcazou <[email protected]>
12
13 * doc/gnat_rm/gnat_language_extensions.rst
14 (Generalized Finalization): Document the new restriction.
15 * sem_ch13.adb (Resolve_Finalizable_Argument): Adjust wording of
16 error message.
17 (Resolve_Finalization_Procedure.Is_Finalizable_Primitive): Require
18 the procedure to be a primitive operation.
19 * gnat_rm.texi: Regenerate.
20
21 2026-05-10 Eric Botcazou <[email protected]>
22
23 PR ada/125240
24 * gen_il-gen-gen_entities.adb (Enumeration_Kind): Make
25 Lit_Indexes and Lit_Strings be defined for root types only.
26 * einfo.ads (Lit_Hash): Adjust description.
27 (Lit_Indexes): Likewise.
28 (Lit_Strings): Likewise.
29 (E_Enumeration_Type): Likewise.
30 * exp_imgv.adb (Expand_Image_Attribute): Do not fetch the root type
31 for enumeration types, except for character types, and adjust.
32
33 2026-04-30 Eric Botcazou <[email protected]>
34
35 PR ada/125044
36 * sem_disp.adb (Check_Controlling_Formals): Apply the same massaging
37 to the result subtype as to the parameter subtypes.
38
39 2026-04-29 Eric Botcazou <[email protected]>
40
41 PR ada/125044
42 * exp_ch6.ads (Needs_BIP_Task_Actuals): Adjust description.
43 * exp_ch6.adb (Expand_N_Extended_Return_Statement): Move activation
44 chain for every build-in-place function with task formal parameters
45 when the type of the return object might have tasks.
46
47 2026-04-12 Eric Botcazou <[email protected]>
48
49 PR ada/124836
50 * adaint.c [__MINGW32__]: Do not include mingw32.h twice, and also
51 include sys/param.h.
52
53 2026-04-05 Eric Botcazou <[email protected]>
54
55 * exp_ch6.adb (Expand_Simple_Function_Return): Use a constant return
56 object when the simple return is rewritten as an extended one.
57 * libgnat/s-secsta.adb (SS_Allocate): Raise Storage_Error if the
58 requested size is negative.
59 * libgnat/s-secsta__cheri.adb (SS_Allocate): Likewise.
60
61 2026-03-23 Eric Botcazou <[email protected]>
62
63 PR ada/124607
64 * sem_elab.adb (Has_Body.Find_Body): Fix thinko.
65
66 2026-03-23 Eric Botcazou <[email protected]>
67
68 PR ada/124606
69 * sem_ch12.adb (Find_Actual_Type): Rename formal parameter.
70 (Map_Formal_Package_Entities): Do not register base types.
71
72 2026-03-14 Matthias Klose <[email protected]>
73
74 PR ada/107475
75 * Makefile.rtl (s390% linux%): Define MISCLIB.
76 (arm% linux-gnueabi%): Likewise.
77 (%x32 linux%): Likewise.
78
79 2026-02-28 Eric Botcazou <[email protected]>
80
81 PR ada/124285
82 * gcc-interface/decl.cc (components_to_record): Force a packed
83 layout for the innermost variant of an unchecked union type with
84 fixed part and full representation clause.
85
86 2026-02-27 Eric Botcazou <[email protected]>
87
88 PR ada/123306
89 * freeze.adb (Freeze_Entity): For a class-wide equivalent type of
90 a non-interface root type, freeze the root type before it.
91 * sem_ch3.adb (Derived_Type_Declaration): Minor tweak.
92 * sem_ch12.adb (Analyze_One_Association): Revert latest change.
93 * sem_ch13.adb (Analyze_Attribute_Definition_Clause) <Size>: When
94 the prefix is a class-wide type, insert the declaration of the CW-
95 equivalent type immediately after that of the root type, and the
96 size check for the root type into its own freezing actions.
97
98 2026-02-25 Eric Botcazou <[email protected]>
99
100 PR ada/124226
101 * sem_res.adb (Resolve_Implicit_Dereference): Move declaration to...
102 * sem_res.ads (Resolve_Implicit_Dereference): ...here.
103 * sem_attr.adb (Resolve_Attribute) <Attribute_Access>: Also call
104 Resolve_Implicit_Dereference when resolving a protected operation.
105
106 2026-02-24 Eric Botcazou <[email protected]>
107 Liam Powell <[email protected]>
108
109 PR ada/124224
110 * sem_aggr.adb (Resolve_Container_Aggregate): Minor tweaks.
111 (Resolve_Iterated_Association): Compute Typ on all paths.
112
113 2026-02-20 Eric Botcazou <[email protected]>
114
115 * libgnat/s-stposu.adb (Finalize_Pool): Pass a local copy of the
116 handle in the call to Finalize_And_Deallocate.
117
118 2026-02-16 Eric Botcazou <[email protected]>
119
120 PR ada/124106
121 * exp_ch4.adb (Expand_N_Allocator): Minor fix in commentary.
122 (Expand_Allocator_Expression): Propagate the Subpool_Handle_Name
123 of the original allocator onto the newly built allocators.
124 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Likewise.
125 Use Preserve_Comes_From_Source to propagate Comes_From_Source.
126 (Make_CPP_Constructor_Call_In_Allocator): Likewise.
127
128 2026-02-11 Eric Botcazou <[email protected]>
129 Liam Powell <[email protected]>
130
131 PR ada/124054
132 * exp_util.adb (Build_Allocate_Deallocate_Proc): Tidy up and pass
133 Proc_Id as the new scope in the call to the New_Copy_Tree function.
134
135 2026-02-09 Eric Botcazou <[email protected]>
136 Liam Powell <[email protected]>
137
138 PR ada/124025
139 * exp_ch9.adb (Expand_Entry_Barrier.Is_Global_Entity): Use
140 Scope_Within_Or_Same to test whether the object is local.
141
142 2026-02-01 Eric Botcazou <[email protected]>
143 Liam Powell <[email protected]>
144
145 PR ada/123902
146 * sem_ch4.adb (Analyze_Selected_Component): Also test
147 Core_Extensions_Allowed for discriminated private types.
148 Rework and augment commentary throughout the procedure.
149
150 2026-02-01 Eric Botcazou <[email protected]>
151 Liam Powell <[email protected]>
152
153 PR ada/121316
154 * exp_ch5.adb (Expand_Iterator_Loop_Over_Array): Minor tweak.
155 (Expand_Iterator_Loop_Over_Container): Likewise.
156 (Expand_N_Loop_Statement): Use Statements (N) throughout.
157
158 2026-01-30 Eric Botcazou <[email protected]>
159
160 PR ada/123867
161 * sem_ch10.adb (Analyze_Compilation_Unit): Output info message
162 when -gnatdi is specified.
163 (Install_Parents): Likewise. Set the Is_Visible_Lib_Unit flag
164 on the unit.
165 (Install_Private_With_Clauses): Do not output info message here.
166 (Remove_Parents): Output info message when -gnatdi is specified
167 and clear the Is_Visible_Lib_Unit flag on the unit.
168
169 2026-01-29 Eric Botcazou <[email protected]>
170
171 PR ada/123861
172 * sem_type.adb (Covers): Fix couple of typos in comment.
173 (Specific_Type): Adjust to Covers' handling of types declared
174 with the Aggregate aspect in Ada 2022.
175
176 2026-01-28 Eric Botcazou <[email protected]>
177
178 PR ada/123857
179 * checks.adb (Apply_Parameter_Validity_Checks.Add_Validity_Check):
180 Set Is_Checked on the generated {Pre,Post}_Condition pragma and
181 bail out if the parameter is of an Unchecked_Union type.
182
183 2026-01-28 Eric Botcazou <[email protected]>
184
185 PR ada/123832
186 * exp_imgv.adb: Add with and use clauses for Exp_Ch7.
187 (Expand_Image_Attribute): Establish a transient scope before
188 rewriting the attribute as a call to Put_Image.
189 (Expand_Wide_Image_Attribute): Likewise.
190 (Expand_Wide_Wide_Image_Attribute): Likewise.
191 * exp_put_image.ads (Build_Image_Call): Add note about the
192 need for a transient scope when the function is invoked.
193 * exp_put_image.adb (Build_Image_Call): Call Insert_Actions
194 to immediately insert the actions instead of wrapping them
195 in an Expression_With_Actions node.
196
197 2026-01-21 Eric Botcazou <[email protected]>
198
199 PR ada/123580
200 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Replace call to
201 Scope_Within_Or_Same (Current_Scope, S) with In_Open_Scopes (S) to
202 test whether S is open in the current scope.
203 * sem_util.adb (From_Nested_Package): Likewise.
204
205 2026-01-17 Eric Botcazou <[email protected]>
206 Lisa Felidae <[email protected]>
207
208 PR ada/68179
209 PR ada/123589
210 * exp_ch3.adb (Expand_Freeze_Array_Type): Build an initialization
211 procedure for a bit-packed array type if Has_Default_Aspect is set
212 on the base type, but make sure not to build it twice. Also test
213 Has_Default_Aspect for a type derived from String.
214
215 2026-01-17 Eric Botcazou <[email protected]>
216
217 PR ada/68179
218 * exp_ch3.adb (Expand_Freeze_Array_Type): Build an initialization
219 procedure for a type derived from String declared with the aspect
220 Default_Aspect_Component_Value.
221
222 2026-01-03 Eric Botcazou <[email protected]>
223
224 PR ada/123371
225 * sem_aggr.adb (Resolve_Iterated_Association): Call Preanalyze
226 instead of Analyze consistently, as well as Copy_Separate_Tree
227 instead of New_Copy_Tree.
228
229 2025-12-27 Eric Botcazou <[email protected]>
230
231 PR ada/123306
232 * sem_ch12.adb (Analyze_One_Association): Immediately freeze the
233 root type of mutably tagged types used as actual type parameters.
234
235 2025-12-26 Eric Botcazou <[email protected]>
236
237 PR ada/123088
238 * sem_aggr.adb (Resolve_Record_Aggregate): Add more robust guard.
239
240 2025-12-26 Eric Botcazou <[email protected]>
241
242 PR ada/123302
243 * sem_ch12.adb (Save_Global_Reference.Save_References_In_Aggregate):
244 Recurse on the scope of the type to find one that is visible, in the
245 case of an actual in a subprogram call with a local type.
246
247 2025-12-26 Eric Botcazou <[email protected]>
248
249 PR ada/123289
250 * sem_ch13.adb (Resolve_Aspect_Aggregate.Resolve_Operation): Give
251 an error if the operation's name denotes more than one subprogram.
252
253 2025-12-25 Eric Botcazou <[email protected]>
254
255 PR ada/123185
256 * sem_ch4.adb (Analyze_Overloaded_Selected_Component): Go to the
257 root when the prefix has a class-wide type.
258 * sem_res.adb (Resolve_Selected_Component): Likewise.
259
260 2025-12-22 Eric Botcazou <[email protected]>
261
262 PR ada/123060
263 * gcc-interface/utils.cc (update_pointer_to): Streamline.
264
265 2025-12-22 Eric Botcazou <[email protected]>
266
267 PR ada/123060
268 * gcc-interface/utils.cc (update_pointer_to): Preserve the alias
269 sets present on the old pointer and old reference, if any.
270
271 2025-12-15 Eric Botcazou <[email protected]>
272
273 PR ada/123138
274 * exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_Reduce>:
275 Override a universal numeric type only if the prefix is not an
276 aggregate.
277
278 2025-12-15 Eric Botcazou <[email protected]>
279
280 PR ada/123060
281 * gcc-interface/utils.cc (update_pointer_to): Synthesize a new
282 TYPE_CANONICAL for the old pointer type in the case where there
283 is no new pointer type. Likewise for references.
284
285 2025-12-11 Eric Botcazou <[email protected]>
286
287 PR ada/123096
288 * exp_put_image.adb (Build_Record_Put_Image_Procedure): Call
289 Incomplete_Or_Partial_View with Partial_Only set to True.
290
291 2025-12-11 Eric Botcazou <[email protected]>
292
293 PR ada/123088
294 * sem_aggr.adb (Resolve_Record_Aggregate): Add missing guard.
295
296 2025-12-08 Eric Botcazou <[email protected]>
297
298 PR ada/123037
299 * rtinit.c [__MINGW32__]: Include <stdlib.h> and not <windows.h>.
300 * rtfinal.c [__MINGW32__]: Do not include <windows.h>.
301
302 2025-12-06 Iain Sandoe <[email protected]>
303
304 PR ada/115305
305 * Makefile.rtl: Use s-oslock__darwin instead of the Posix version.
306 * libgnat/s-oslock__darwin.ads: New file.
307
308 2025-11-21 Eric Botcazou <[email protected]>
309
310 * repinfo.adb (List_Location): Do not output the final comma.
311 (List_Common_Type_Info): Adjust to above change. Do not output
312 "??" for an unknown alignment.
313 (List_Entities): Do not output generic types.
314 (List_Object_Info): Adjust to above change.
315 (List_Subprogram_Info): Likewise.
316
317 2025-11-21 Eric Botcazou <[email protected]>
318
319 * sem_type.adb (Last_Overloaded): Fix typo.
320
321 2025-11-21 Eric Botcazou <[email protected]>
322
323 PR ada/111433
324 * sem_util.ads (Incomplete_Or_Partial_View): Add Partial_Only formal
325 parameter.
326 * sem_util.adb (Incomplete_Or_Partial_View): Likewise. Do not look
327 for an incomplete view if it is set to True.
328 * sem_ch6.adb (Check_Conformance.Null_Exclusions_Match): Pass True
329 for Partial_Only in the call to Incomplete_Or_Partial_View.
330
331 2025-11-12 Eric Botcazou <[email protected]>
332
333 PR ada/122640
334 * sem_ch3.adb (Analyze_Object_Declaration): Set Is_True_Constant
335 on entry for constants and Never_Set_In_Source in all cases.
336 If an initialization expression is present, set Has_Initial_Value
337 and Is_True_Constant on variables.
338
339 2025-11-12 Ronan Desplanques <[email protected]>
340
341 * sem_ch3.adb (Analyze_Object_Declaration): Call Mutate_Ekind earlier.
342
343 2025-11-04 Bob Duff <[email protected]>
344
345 PR ada/118208
346 * exp_ch5.adb
347 (Expand_Assign_With_Target_Names.Replace_Target):
348 Remove code setting Entity to Empty.
349 * sinfo.ads (Has_Target_Names):
350 Improve comment: add "@" to clarify what "target name"
351 means, and remove the content-free phrase "and must
352 be expanded accordingly."
353
354 2025-10-24 Eric Botcazou <[email protected]>
355
356 PR ada/118782
357 * styleg.adb (Is_Box_Comment): Also stop the loop at EOF.
358
359 2025-10-24 Nicolas Boulenguez <[email protected]>
360
361 PR ada/81087
362 * gnatlink.adb (Is_Prefix): Move around, streamline and return false
363 when the prefix is not strict.
364 (Gnatlink): Fix other instances of incorrect lower bound assumption.
365
366 2025-10-20 Eric Botcazou <[email protected]>
367
368 PR ada/107536
369 * exp_ch2.adb (Expand_Renaming): Mark the entity as referenced.
370
371 2025-10-05 Eric Botcazou <[email protected]>
372
373 PR ada/118343
374 * Makefile.rtl (LLVM_BUILD): Delete.
375
376 2025-09-30 Eric Botcazou <[email protected]>
377
378 PR ada/117517
379 * sem_attr.adb (Resolve_Attribute) <Attribute_Reduce>: Try to
380 resolve the reducer first. Fix casing of error message.
381
382 2025-09-22 Eric Botcazou <[email protected]>
383
384 PR ada/121968
385 * sem_ch12.adb (Associations.Find_Assoc): Add guard for clauses.
386 * sem_dim.adb (Analyze_Dimension_Array_Aggregate): Add test for
387 N_Iterated_Component_Association nodes.
388
389 2025-09-15 Eric Botcazou <[email protected]>
390
391 * gcc-interface/trans.cc (gnat_to_gnu)
392 <N_Object_Renaming_Declaration>: Deal with objects whose elaboration
393 is deferred.
394 (process_freeze_entity): Deal with renamed objects whose elaboration
395 is deferred.
396
397 2025-09-15 Eric Botcazou <[email protected]>
398
399 * checks.adb (Apply_Discriminant_Check): Remove undocumented test
400 on Is_Aliased_View applied to the left-hand side to skip the check
401 in the case where the subtypes are the same, and replace it with a
402 test that the subtypes are constrained.
403
404 2025-09-15 Eric Botcazou <[email protected]>
405
406 * exp_util.adb (Finalize_Address): In an untagged derivation, call
407 Root_Type on the full view of the base type if the partial view is
408 itself not a derived type.
409 (Is_Untagged_Derivation): Minor formatting tweak.
410
411 2025-09-11 Gary Dismukes <[email protected]>
412
413 * exp_aggr.adb (Build_Container_Aggr_Code.Build_Size_Expr): In the case
414 of an association with a single choice, only call Update_Choices when
415 the choice expression is nonstatic.
416
417 2025-09-11 Javier Miranda <[email protected]>
418
419 * sem_util.adb (Needs_One_Actual): Add support for untagged record
420 types when the sources are compiled with Core Extensions allowed.
421
422 2025-09-11 Viljar Indus <[email protected]>
423
424 * sem_ch13.adb (Analyze_Aspect_Definitions): Create a temporary
425 pragma for the non-task and access type cases.
426
427 2025-09-11 Marc Poulhiès <[email protected]>
428
429 * s-pack.adb.tmpl: Typo fix in comment.
430
431 2025-09-11 Piotr Trojanek <[email protected]>
432
433 * sem_prag.adb (Check_Interrupt_Or_Attach_Handler): Refine test for
434 protected procedures; fix typo in comment.
435
436 2025-09-11 Denis Mazzucato <[email protected]>
437
438 * exp_ch3.adb (Init_Formals): Remove the check on Global_No_Tasking.
439 * sem.adb: Fix typo.
440
441 2025-09-11 Gary Dismukes <[email protected]>
442
443 * exp_aggr.adb (Build_Container_Aggr_Code.To_Int): Replace existing
444 conditional expression with call to Expr_Value.
445
446 2025-09-11 Steve Baird <[email protected]>
447
448 * freeze.adb (Freeze_Profile): Do not emit a warning stating that
449 a formal parameter's size is 8 if the parameter's size is not 8.
450
451 2025-09-11 Marc Poulhiès <[email protected]>
452
453 * gcc-interface/trans.cc (gnat_to_gnu): Fix typo in comment.
454
455 2025-08-08 Release Manager
456
457 * GCC 15.2.0 released.
458
459 2025-07-31 Eric Botcazou <[email protected]>
460
461 PR ada/120440
462 * gcc-interface/Makefile.in (GNATLINK_OBJS): Add s-excmac.o.
463 (GNATMAKE_OBJS): Likewise.
464
465 2025-07-25 Bob Duff <[email protected]>
466
467 * sem_ch12.adb (Check_Formal_Package_Instance):
468 Do nothing in case of E_Subprogram_Body.
469
470 2025-07-25 Ronan Desplanques <[email protected]>
471
472 * sem_ch3.adb (Build_Derived_Record_Type): Set flag appropriately.
473
474 2025-07-22 Ronan Desplanques <[email protected]>
475
476 * gen_il-fields.ads (Is_Implicit_Full_View): New field.
477 * gen_il-gen-gen_entities.adb (Type_Kind): Use new field.
478 * einfo.ads (Is_Implicit_Full_View): Document new field.
479 * exp_ch7.adb (Make_Adjust_Call, Make_Init_Call, Make_Final_Call): Use
480 new field.
481 * exp_util.adb (Finalize_Address): Likewise.
482 * sem_ch3.adb (Copy_And_Build): Set new field.
483
484 2025-07-22 Eric Botcazou <[email protected]>
485
486 * exp_util.ads (May_Generate_Large_Temp): Delete.
487 * exp_util.adb (May_Generate_Large_Temp): Likewise.
488 (Safe_Unchecked_Type_Conversion): Do not take stack checking into
489 account to compute the result.
490
491 2025-07-22 Eric Botcazou <[email protected]>
492
493 * exp_util.adb (Safe_Unchecked_Type_Conversion): Always return True
494 if the expression is the prefix of an N_Selected_Component.
495
496 2025-07-22 Piotr Trojanek <[email protected]>
497
498 * sem_util.adb (Get_Actual_Subtype): Do the same for GCC and GNATprove
499 backends.
500
501 2025-07-22 Eric Botcazou <[email protected]>
502
503 * sem_util.adb (Get_Actual_Subtype): Only create a new subtype when
504 the expander is active. Remove a useless test of type inequality,
505 as well as a useless call to Set_Has_Delayed_Freeze on the subtype.
506
507 2025-07-22 Ghjuvan Lacambre <[email protected]>
508
509 * exp_util.adb (Finalize_Address): Prevent infinite loop
510
511 2025-07-21 Eric Botcazou <[email protected]>
512
513 PR ada/121184
514 * styleg.adb (Check_Comment): Use consistent warning message.
515
516 2025-07-14 Eric Botcazou <[email protected]>
517
518 PR ada/121056
519 * sem_ch4.adb (Try_Object_Operation.Try_Primitive_Operation): Add
520 test on Is_Record_Type before accessing Underlying_Record_View.
521
522 2025-07-04 Eric Botcazou <[email protected]>
523
524 * gcc-interface/utils.cc (make_packable_type): Clear the TYPE_PACKED
525 flag in the case where the alignment is bumped.
526
527 2025-07-04 Ronan Desplanques <[email protected]>
528
529 * exp_ch7.adb (Make_Final_Call): Tweak search of Finalize primitive.
530 * exp_util.adb (Finalize_Address): Likewise.
531
532 2025-07-04 Eric Botcazou <[email protected]>
533
534 * freeze.adb (Check_Compile_Time_Size): Try harder to see whether
535 the bounds of array types are known at compile time.
536
537 2025-07-04 Steve Baird <[email protected]>
538
539 * mutably_tagged.adb (Make_CW_Size_Compile_Check): Include the
540 value of the Size'Class limit in the message generated via a
541 Compile_Time_Error pragma.
542
543 2025-07-04 Ronan Desplanques <[email protected]>
544
545 * sem_ch13.adb (Analyze_Aspect_Specifications): Fix error emission.
546
547 2025-07-03 Eric Botcazou <[email protected]>
548
549 * gcc-interface/Makefile.in (gnatlib-sjlj): Delete.
550 (gnatlib-zcx): Do not modify Frontend_Exceptions constant.
551 * libgnat/system-linux-loongarch.ads (Frontend_Exceptions): Delete.
552
553 2025-07-03 Eric Botcazou <[email protected]>
554
555 * gcc-interface/trans.cc (addressable_p): Add COMPG third parameter.
556 <COMPONENT_REF>: Do not return true out of alignment considerations
557 for non-strict-alignment targets if COMPG is set.
558 (Call_to_gnu): Pass true as COMPG in the call to the addressable_p
559 predicate if the called subprogram is an initialization procedure.
560
561 2025-07-03 Eric Botcazou <[email protected]>
562
563 * gcc-interface/trans.cc (gnat_to_gnu) <N_Allocator>: Allocate the
564 bounds alongside the data if the Is_Constr_Array_Subt_With_Bounds
565 flag is set on the designated type.
566 <N_Free_Statement>: Take into account the allocated bounds if the
567 Is_Constr_Array_Subt_With_Bounds flag is set on the designated type.
568
569 2025-07-03 Eric Botcazou <[email protected]>
570
571 * gcc-interface/decl.cc (gnat_to_gnu_component_type): Validate the
572 Component_Size like the size of a type only if the component type
573 is actually packed.
574
575 2025-07-03 Ronan Desplanques <[email protected]>
576
577 * exp_util.adb (Insert_Actions): Fix check.
578
579 2025-07-03 Eric Botcazou <[email protected]>
580
581 * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not bail out for the
582 declarations of return objects.
583
584 2025-07-03 Ronan Desplanques <[email protected]>
585
586 * exp_ch7.adb (Make_Deep_Record_Body): Fix case of absent Initialize
587 primitive.
588
589 2025-07-03 Ronan Desplanques <[email protected]>
590
591 * exp_aggr.adb (Generate_Finalization_Actions): Stop assuming that
592 initialize primitive exists.
593
594 2025-07-03 Ronan Desplanques <[email protected]>
595
596 * exp_ch7.adb (Insert_Actions_In_Scope_Around): Fix condition.
597
598 2025-07-03 Eric Botcazou <[email protected]>
599
600 * exp_ch4.adb (Handle_Changed_Representation): Alphabetize local
601 variables. Set the No_Finalize_Actions flag on the assignment.
602
603 2025-07-01 Eric Botcazou <[email protected]>
604
605 PR ada/120705
606 * exp_ch6.adb (Needs_BIP_Collection): Always return False if the
607 type has relaxed finalization.
608
609 2025-07-01 Gary Dismukes <[email protected]>
610
611 * exp_ch3.adb (Build_Heap_Or_Pool_Allocator): Test not Has_Relaxed_Finalization
612 as a guard against retrieving BIP_Collection formal (and related code).
613
614 2025-07-01 Gary Dismukes <[email protected]>
615
616 * sem_ch3.adb (Constrain_Corresponding_Record): Inherit Class_Wide_Type on the
617 created constrained subtype.
618
619 2025-07-01 Eric Botcazou <[email protected]>
620
621 * exp_ch7.adb (Shift_Address_For_Descriptor): Add dummy variable
622 to make sure that System_Storage_Elements is loaded.
623
624 2025-07-01 Eric Botcazou <[email protected]>
625
626 * exp_ch7.adb (Shift_Address_For_Descriptor): New function.
627 (Make_Address_For_Finalize): Call above function.
628 (Make_Finalize_Address_Stmts): Likewise.
629 * exp_util.ads (Is_Constr_Array_Subt_Of_Unc_With_Controlled): New
630 predicate.
631 * exp_util.adb (Is_Constr_Array_Subt_Of_Unc_With_Controlled): Ditto.
632 (Remove_Side_Effects): Call above predicate.
633 * sem_ch3.adb (Analyze_Object_Declaration): Likewise.
634 * sem_ch4.adb (Analyze_Allocator): Allocate the bounds by setting
635 Is_Constr_Array_Subt_With_Bounds when appropriate.
636
637 2025-07-01 Javier Miranda <[email protected]>
638
639 * sem_ch4.adb (Try_Object_Operation): Handle mutably tagged
640 class-wide type prefix.
641
642 2025-07-01 Eric Botcazou <[email protected]>
643
644 * exp_util.adb (Finalize_Address): Do not go to the root type for
645 array types.
646
647 2025-07-01 Eric Botcazou <[email protected]>
648
649 * exp_util.ads (Is_Finalizable_Access): New predicate.
650 (Is_Non_BIP_Func_Call): Delete.
651 (Is_Secondary_Stack_BIP_Func_Call): Likewise.
652 * exp_util.adb (Is_Finalizable_Access): New predicate.
653 (Initialized_By_Aliased_BIP_Func_Call): Delete.
654 (Initialized_By_Reference): Likewise.
655 (Is_Aliased): Only consider the nontransient object serviced by
656 the transient scope.
657 (Is_Part_Of_BIP_Return_Statement): Minor tweak.
658 (Is_Finalizable_Transient): Remove calls to Initialized_By_Reference
659 and Initialized_By_Aliased_BIP_Func_Call.
660 Call Is_Finalizable_Access for access objects.
661 (Is_Non_BIP_Func_Call): Delete.
662 (Is_Secondary_Stack_BIP_Func_Call): Likewise.
663 (Requires_Cleanup_Actions): Call Is_Finalizable_Access for access
664 objects.
665 (Side_Effect_Free): Return True for N_Reference.
666 * exp_ch7.adb (Build_Finalizer.Process_Declarations): Call
667 Is_Finalizable_Access for access objects.
668
669 2025-07-01 Eric Botcazou <[email protected]>
670
671 * exp_util.adb (Is_Expression_Of_Func_Return): New predicate.
672 (Is_Related_To_Func_Return): Call Is_Expression_Of_Func_Return.
673 (Remove_Side_Effects): Generate a temporary for a function call
674 that returns a constrained array type with controlled component
675 and an unconstrained first subtype.
676
677 2025-06-30 Bob Duff <[email protected]>
678
679 * exp_attr.adb (Attribute_Max_Size_In_Storage_Elements):
680 Return Storage_Count'Last converted to universal_integer.
681
682 2025-06-30 Eric Botcazou <[email protected]>
683
684 * sem_prag.adb (Analyze_Pragma) <Pragma_No_Component_Reordering>:
685 Call Find_Type on the first argument of the pragma.
686
687 2025-06-30 Steve Baird <[email protected]>
688
689 * exp_put_image.adb (Build_Record_Put_Image_Procedure): If
690 Discriminant_Specifications takes us from the full view of a type
691 to an (intentionally) unanalyzed subtree, then instead find
692 discriminant entities by calling Discriminant_Specifications on
693 the partial view of the type.
694
695 2025-06-30 Ronan Desplanques <[email protected]>
696
697 * sem_ch6.adb (Check_Delayed_Subprogram, Possible_Freeze): Restrict
698 cases where freezing is delayed.
699 * sem_ch6.ads (Check_Delayed_Subprogram): Improve documentation
700 comment.
701 * sprint.adb (Write_Itype): Improve output.
702
703 2025-06-30 Eric Botcazou <[email protected]>
704
705 * exp_ch7.adb (Process_Transient_In_Scope): Bail out if the object
706 is an ignored ghost entity.
707
708 2025-06-30 Eric Botcazou <[email protected]>
709
710 * exp_util.adb (Insert_Actions): Extend special treatment applied
711 to freeze nodes to the case of blocks generated for aggregates.
712
713 2025-06-28 Eric Botcazou <[email protected]>
714
715 PR ada/120854
716 * sem_eval.adb (Get_String_Val): Be prepared for an integer literal
717 after a serious error is detected, and raise PE on other nodes.
718
719 2025-06-28 Eric Botcazou <[email protected]>
720
721 PR ada/120665
722 * sem_aggr.adb (Resolve_Container_Aggregate): Use robust guards.
723
724 2025-06-12 Eric Botcazou <[email protected]>
725
726 * doc/gnat_rm/gnat_language_extensions.rst
727 (Generalized Finalization): Document the actual implementation.
728 (No_Raise): Move to separate section.
729 * gnat_rm.texi: Regenerate.
730
731 2025-06-12 Ronan Desplanques <[email protected]>
732
733 * sem_ch3.adb (Build_Derived_Private_Type): Fix test.
734 (Build_Derived_Record_Type): Adjust error recovery paths.
735
736 2025-06-12 Ronan Desplanques <[email protected]>
737
738 * exp_util.adb (Insert_Actions): Refine test.
739
740 2025-06-12 Eric Botcazou <[email protected]>
741
742 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Compiler
743 switches) <-O>: Fix long line.
744 * gnat_ugn.texi: Regenerate.
745
746 2025-06-12 Eric Botcazou <[email protected]>
747
748 * usage.adb (Usage): Justify the documentation of common switches
749 like that of other switches. Rework that of the -O switch.
750 * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Compiler
751 switches) <-O>: Rework and document 'z' and 'g' operands.
752 * doc/gnat_ugn/gnat_and_program_execution.rst (Optimization Levels):
753 Rework and document -Oz and -Og switches.
754 * gnat_ugn.texi: Regenerate.
755
756 2025-06-10 Gary Dismukes <[email protected]>
757
758 * einfo.ads: Revise comment about Dynamic_Predicate flag to make it
759 more accurate.
760 * sem_case.adb (Check_Choices): Test "not Has_Static_Predicate_Aspect"
761 as additional guard for error about use of subtype with nonstatic
762 predicate as a case choice. Improve related error message.
763
764 2025-06-10 Eric Botcazou <[email protected]>
765
766 * freeze.adb (Freeze_Static_Object): Do not issue any error message
767 for compiler-generated entities.
768
769 2025-06-10 Eric Botcazou <[email protected]>
770
771 * exp_ch4.adb (Insert_Conditional_Object_Declaration): Deal with a
772 transient scope being created around the declaration.
773 * freeze.adb (Freeze_Entity): Do not call Freeze_Static_Object for
774 a renaming declaration.
775
776 2025-06-10 Gary Dismukes <[email protected]>
777
778 * exp_aggr.adb (Build_Container_Aggr_Code.To_Int): Apply Enumeration_Pos
779 to Entity (Expr) rather than Expr.
780
781 2025-06-10 Eric Botcazou <[email protected]>
782
783 * sem_ch12.adb (Copy_Generic_Node): Do not call Root_Type to find
784 the root type of an aggregate of a derived tagged type.
785
786 2025-06-10 Ronan Desplanques <[email protected]>
787
788 * libgnarl/s-stusta.adb (Compute_All_Tasks): Skip terminated tasks.
789
790 2025-06-09 Gary Dismukes <[email protected]>
791
792 * sem_ch3.adb (Constrain_Index): In the case of a fixed-lower-bound index,
793 set Etype of the newly created itype's Scalar_Range from the index's Etype.
794 * sem_ch12.adb (Validate_Array_Type_Instance): If the actual subtype is
795 a fixed-lower-bound type, then check again the Etype of its Scalar_Range.
796
797 2025-06-09 Piotr Trojanek <[email protected]>
798
799 * sem_prag.adb (Analyze_Pragma): Fix conditions for legality checks on
800 formal type declarations.
801
802 2025-06-09 Piotr Trojanek <[email protected]>
803
804 * sem_prag.adb (Analyze_Pragma): If pragmas apply to a formal array
805 type, then set the flags on the base type.
806
807 2025-06-09 Gary Dismukes <[email protected]>
808
809 * exp_aggr.adb (Expand_Container_Aggregate): Use the Base_Type of the
810 subtype provided by the context as the subtype of the temporary object
811 initialized by the aggregate.
812
813 2025-06-09 Piotr Trojanek <[email protected]>
814
815 * exp_attr.adb (Expand_N_Attribute_Reference): When expanding attribute
816 Valid, use signedness from the validated view, not from its base type.
817
818 2025-06-09 Gary Dismukes <[email protected]>
819
820 * contracts.adb (Inherit_Condition): Remove Assoc_List and its uses
821 along with function Check_Condition, since mapping of formals will
822 effectively be done in Build_Class_Wide_Expression (by Replace_Entity).
823 * exp_util.adb (Replace_Entity): Only rewrite entity references in
824 function calls that qualify according to the result of calling the
825 new function Call_To_Parent_Dispatching_Op_Must_Be_Mapped.
826 (Call_To_Parent_Dispatching_Op_Must_Be_Mapped): New function that
827 determines whether a function call to a primitive of Par_Subp
828 associated tagged type needs to be mapped (according to whether
829 it has any actuals that reference controlling formals of the
830 primitive).
831
832 2025-06-09 Eric Botcazou <[email protected]>
833
834 * exp_ch4.adb (Insert_Conditional_Object_Declaration): Remove Decl
835 formal parameter, add Typ and Const formal parameters.
836 (Expand_N_Case_Expression): Fix pasto in comment. Adjust call to
837 Insert_Conditional_Object_Declaration and tidy up surrounding code.
838 (Expand_N_If_Expression): Adjust couple of calls to
839 Insert_Conditional_Object_Declaration.
840
841 2025-06-06 Javier Miranda <[email protected]>
842
843 * sem_ch4.adb (Constant_Indexing_OK): Add missing support for
844 RM 4.1.6(13/3), and improve performance to avoid climbing more
845 than needed. Add documentation.
846 (Try_Indexing_Function): New subprogram.
847 (Expr_Matches_In_Formal): Added new formals.
848 (Handle_Selected_Component): New subprogram.
849 (Has_IN_Mode): New subprogram.
850 (Try_Container_Indexing): Add documentation, code reorganization
851 and extend its functionality to improve its support for prefixed
852 notation calls.
853
854 2025-06-06 Eric Botcazou <[email protected]>
855
856 * sem_ch10.adb (Install_Siblings.In_Context): Add missing guard.
857
858 2025-06-06 Eric Botcazou <[email protected]>
859
860 * exp_ch4.adb (Insert_Conditional_Object_Declaration): Make sure the
861 object is allocated properly by the code generator at library level.
862
863 2025-06-06 Steve Baird <[email protected]>
864
865 * sem_ch4.adb
866 (Find_Unary_Types): Because we reanalyze names in an instance,
867 we sometimes have to take steps to filter out extraneous name
868 resolution candidates that happen to be visible at the point of the
869 instance declaration. Remove some code that appears to have been
870 written with this in mind. This is done for two reasons. First, the
871 code sometimes doesn't work (possibly because the In_Instance test
872 is not specific enough - it probably should be testing to see whether
873 we are in an instance of the particular generic in which the result
874 of calling Corresponding_Generic_Type was declared) and causes correct
875 code to be rejected. Second, the code seems to no longer be necessary
876 (possibly because of subsequent fixes in this area which are not
877 specific to unary operators).
878
879 2025-06-06 Eric Botcazou <[email protected]>
880
881 * exp_aggr.adb (Expand_Record_Aggregate): Use the named form for the
882 second actual parameter in the call to Duplicate_Subexpr.
883 * exp_attr.adb (Expand_Size_Attribute): Likewise.
884 * exp_ch5.adb (Expand_Assign_Array): Likewise.
885 (Expand_Assign_Array_Bitfield): Likewise.
886 (Expand_Assign_Array_Bitfield_Fast): Likewise.
887 * exp_util.ads (Duplicate_Subexpr): Add New_Scope formal parameter.
888 (Duplicate_Subexpr_No_Checks): Likewise.
889 (Duplicate_Subexpr_Move_Checks): Likewise.
890 * exp_util.adb (Build_Allocate_Deallocate_Proc): Pass Proc_Id as the
891 actual for New_Scope in the calls to Duplicate_Subexpr_No_Checks.
892 (Duplicate_Subexpr): Add New_Scope formal parameter and forward it
893 in the call to New_Copy_Tree.
894 (Duplicate_Subexpr_No_Checks): Likewise.
895 (Duplicate_Subexpr_Move_Checks): Likewise.
896
897 2025-06-06 Piotr Trojanek <[email protected]>
898
899 * checks.adb (Insert_Valid_Check): Set flag Assignment_OK in the object
900 declaration inserted for the validity checks.
901
902 2025-06-05 Javier Miranda <[email protected]>
903
904 * exp_ch7.adb (Process_Object_Declaration): Avoid generating
905 duplicate names for master nodes.
906
907 2025-06-05 Steve Baird <[email protected]>
908
909 * sem_util.adb
910 (Side_Effect_Free_Statements): Return False if the statement list
911 includes an explicit (i.e. Comes_From_Source) raise statement.
912
913 2025-06-05 Ronan Desplanques <[email protected]>
914
915 * exp_ch4.adb (Tagged_Membership): Fix for protected types.
916
917 2025-06-05 Ronan Desplanques <[email protected]>
918
919 * exp_attr.adb (Interunit_Ref_OK): Tweak categorization of compilation
920 units.
921
922 2025-06-05 Eric Botcazou <[email protected]>
923
924 * exp_aggr.adb (Build_Two_Pass_Aggr_Code): New function containing
925 most of the code initially present in Two_Pass_Aggregate_Expansion.
926 (Two_Pass_Aggregate_Expansion): Remove redundant N parameter.
927 Implement built-in-place expansion for (static) object declarations
928 and allocators, using Build_Two_Pass_Aggr_Code for the main work.
929 (Expand_Array_Aggregate): Adjust Two_Pass_Aggregate_Expansion call.
930 Replace Etype (N) by Typ in a couple of places.
931 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove special case for
932 two-pass array aggregates.
933 (Expand_N_Object_Declaration): Do not adjust the object when it is
934 initialized by a two-pass array aggregate.
935 * exp_ch4.adb (Expand_Allocator_Expression): Apply the processing
936 used for container aggregates to two-pass array aggregates.
937 * exp_ch6.adb (Validate_Subprogram_Calls): Skip calls present in
938 initialization expressions of N_Object_Declaration nodes that have
939 No_Initialization set.
940 * sem_ch3.adb (Analyze_Object_Declaration): Detect the cases of an
941 array originally initialized by an aggregate consistently.
942
943 2025-06-05 Viljar Indus <[email protected]>
944
945 * doc/gnat_rm/implementation_defined_attributes.rst: Update the
946 documentation for Valid_Value.
947 * sem_attr.adb (Analyze_Attribute): Reject types where
948 the root type originates from Standard.
949 * gnat_rm.texi: Regenerate.
950
951 2025-06-05 Gary Dismukes <[email protected]>
952
953 * exp_aggr.adb (Two_Pass_Aggregate_Expansion): Change call to Make_Assignment
954 for the indexed aggregate object to call Change_Make_OK_Assignment instead.
955
956 2025-06-05 Eric Botcazou <[email protected]>
957
958 * exp_ch6.adb (Expand_Actuals): Remove obsolete comment.
959 (Make_Build_In_Place_Call_In_Anonymous_Context): Always use a proper
960 object declaration initialized with the function call in the cases
961 where a temporary is needed, with Assignment_OK set on it.
962 * sem_util.adb (Entity_Of): Deal with rewritten function call first.
963
964 2025-06-05 Steve Baird <[email protected]>
965
966 * exp_attr.adb (Expand_N_Attribute_Reference): When accessing the
967 maps declared in package Cached_Attribute_Ops, the key value
968 passed to Get or to Set should never be the entity node for a
969 subtype. Use the entity of the corresponding type declaration
970 instead.
971
972 2025-06-05 Steve Baird <[email protected]>
973
974 * sem_res.adb
975 (Set_Mixed_Mode_Operand): If we are about to call Resolve
976 passing in Any_Fixed as the expected type, then instead pass in
977 the fixed point type of the other operand (i.e., B_Typ).
978
979 2025-06-05 Gary Dismukes <[email protected]>
980
981 * sem_util.adb (Check_Function_Writable_Actuals): Add handling for
982 N_Iterated_Component_Association and N_Iterated_Element_Association.
983 Fix a typo in an RM reference (6.4.1(20/3) => 6.4.1(6.20/3)).
984 (Collect_Expression_Ids): New procedure factoring code for collecting
985 identifiers from expressions of aggregate associations.
986 (Handle_Association_Choices): New procedure factoring code for handling
987 id collection for expressions of aggregate associations with multiple
988 choices. Removed redundant test of Box_Present from original code.
989
990 2025-05-05 Eric Botcazou <[email protected]>
991
992 PR ada/120104
993 * exp_ch3.adb (Expand_Freeze_Record_Type): For a controlled tagged
994 type, freeze only the controlled primitives that are present.
995
996 2025-04-30 Eric Botcazou <[email protected]>
997
998 PR ada/112958
999 * Makefile.rtl (LIBGNAT_TARGET_PAIRS) [x86 FreeBSD]: Add specific
1000 version of s-dorepr.adb.
1001 * libgnat/s-dorepr__freebsd.adb: New file.
1002
1003 2025-04-30 Eric Botcazou <[email protected]>
1004
1005 PR ada/112958
1006 * init.c (__gnat_error_handler) [__FreeBSD__]: Fix typo.
1007
1008 2025-04-25 Release Manager
1009
1010 * GCC 15.1.0 released.
1011
1012 2025-04-12 Eric Botcazou <[email protected]>
1013
1014 PR ada/119643
1015 * sem_ch8.adb (Inherit_Renamed_Profile): Add guard against the
1016 peculiarities of Natural and Positive.
1017
1018 2025-04-07 Eric Botcazou <[email protected]>
1019
1020 * gcc-interface/utils.cc (convert) <POINTER_TYPE>: Use fold_convert
1021 to convert between thin pointers. If the source is a thin pointer
1022 with zero offset from the base and the target is a pointer to its
1023 array, displace the pointer after converting it.
1024 * gcc-interface/utils2.cc (build_unary_op) <ATTR_ADDR_EXPR>: Use
1025 fold_convert to convert the address before displacing it.
1026
1027 2025-04-04 Eric Botcazou <[email protected]>
1028
1029 * libgnat/a-ngcoar.adb (Eigensystem): Adjust notation and fix the
1030 layout of the real symmetric matrix in the main comment. Adjust
1031 the layout of the associated code accordingly and correctly turn
1032 the 2Nx1 real vectors into Nx1 complex ones.
1033 (Eigenvalues): Minor similar tweaks.
1034 * libgnat/a-ngrear.adb (Jacobi): Minor tweaks in the main comment.
1035 Adjust notation and corresponding parameter names of functions.
1036 Fix call to Unit_Matrix routine. Adjust the comment describing
1037 the various kinds of iterations to match the implementation.
1038
1039 2025-03-27 Eric Botcazou <[email protected]>
1040
1041 * libgnarl/s-tasini.adb (Tasking_Runtime_Initialize): Add pragma
1042 Linker_Constructor for the procedure.
1043
1044 2025-03-25 Eric Botcazou <[email protected]>
1045
1046 PR ada/119440
1047 * gcc-interface/Make-lang.in (GCC_LINK): Filter out -pie in stage 1
1048 (GCC_LLINK): Likewise.
1049 * gcc-interface/Makefile.in (COMPILER): Delete and replace by CC.
1050 (COMPILER_FLAGS): Delete.
1051 (ALL_COMPILERFLAGS): Delete and replace by ALL_CFLAGS.
1052 (ALL_ADAFLAGS): Move around.
1053 (enable_host_pie): New substituted variable.
1054 (LD_PICFLAG): Likewise. Do not add it to TOOLS_LIBS.
1055 (LIBIBERTY): Test enable_host_pie.
1056 (LIBGNAT): Likewise and use libgnat_pic.a if yes.
1057 (TOOLS_FLAGS_TO_PASS): Pass $(PICFLAG) under CFLAGS & $(LD_PICFLAG)
1058 under LDFLAGS. Also pass through ADA_CFLAGS.
1059 (common-tools): Add $(ALL_CFLAGS) $(ADA_CFLAGS) to the --GCC string
1060 of $(GNATLINK) commands.
1061 (../../gnatdll$(exeext)): Likewise.
1062 (gnatmake-re): Likewise.
1063 (gnatlink-re): Likewise.
1064 (gnatlib-shared-dual): Remove all the object files at the end.
1065
1066 2025-03-19 Eric Botcazou <[email protected]>
1067
1068 * gnatvsn.adb (Gnat_Free_Software): Fix message formatting.
1069
1070 2025-03-19 Eric Botcazou <[email protected]>
1071
1072 * gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Record_Subtype>: Set
1073 the may_alias attribute if a specific GCC type is built.
1074
1075 2025-03-19 Eric Botcazou <[email protected]>
1076
1077 * gen_il-gen-gen_nodes.adb (N_Formal_Package_Declaration): Use
1078 N_Declaration instead of Node_Kind as ancestor.
1079 * sem_ch12.adb (Get_Formal_Entity): Remove obsolete alternative.
1080 (Instantiate_Formal_Package): Take into account the abbreviated
1081 instances in the main loop running over the actuals of the local
1082 package created for the formal package.
1083
1084 2025-02-04 Eric Botcazou <[email protected]>
1085
1086 PR ada/118731
1087 * sem_aggr.adb (Resolve_Iterated_Association): Add missing guard.
1088
1089 2025-02-01 Eric Botcazou <[email protected]>
1090
1091 PR ada/118712
1092 * sem_warn.adb (Check_References): Deal with small adjustments of
1093 references.
1094
1095 2025-01-31 Eric Botcazou <[email protected]>
1096
1097 * gcc-interface/utils.cc (gnat_pushdecl): Clear TREE_PUBLIC on
1098 functions really nested in another function.
1099
1100 2025-01-22 Arsen Arsenović <[email protected]>
1101
1102 * gcc-interface/lang-specs.h: Replace %{nostdinc*} %{nostdlib*}
1103 with %{nostdinc} %{nostdlib}.
1104
1105 2025-01-14 Eric Botcazou <[email protected]>
1106
1107 PR ada/118459
1108 * libgnat/s-objrea.ads (Object_Arch): Add S390 and RISCV.
1109 * libgnat/s-objrea.adb (EM_S390): New named number.
1110 (EM_RISCV): Likewise.
1111 (ELF_Ops.Initialize): Deal with EM_S390 and EM_RISCV.
1112 (Read_Address): Deal with S390 and RISCV.
1113
1114 2025-01-13 Pascal Obry <[email protected]>
1115
1116 * doc/gnat_ugn/platform_specific_information.rst: Update.
1117 * gnat_ugn.texi: Regenerate.
1118
1119 2025-01-13 Javier Miranda <[email protected]>
1120
1121 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Restore calls
1122 to Preanalyze_Spec_Expression that were replaced by calls to
1123 Preanalyze_And_Resolve. Add documentation.
1124 (Check_Aspect_At_Freeze_Point): Ditto.
1125
1126 2025-01-13 Pascal Obry <[email protected]>
1127
1128 * mdll.adb: For the created DLL to be relocatable we do not want to use
1129 the base file name when calling gnatdll.
1130 * gnatdll.adb: Removes option -d which is not working anymore. And
1131 when using a truly relocatable DLL the base-address has no real
1132 meaning. Also reword the usage string for -d as we do not want to
1133 specify relocatable as gnatdll can be used to create both
1134 relocatable and non relocatable DLL.
1135
1136 2025-01-13 Piotr Trojanek <[email protected]>
1137
1138 * libgnat/a-strunb.ads: Remove redundant parentheses inside NOT
1139 operators.
1140
1141 2025-01-13 Javier Miranda <[email protected]>
1142
1143 * sem_util.adb (Build_Actual_Subtype_Of_Component): No action
1144 under preanalysis.
1145 * sem_ch5.adb (Set_Assignment_Type): If the right-hand side contains
1146 target names, expansion has been disabled to prevent expansion that
1147 might move target names out of the context of the assignment statement.
1148 Restore temporarily the current compilation mode so that the actual
1149 subtype can be built.
1150
1151 2025-01-13 Piotr Trojanek <[email protected]>
1152
1153 * par-ch4.adb (P_Factor): Warn when the operand of a unary operator
1154 doesn't require parentheses.
1155
1156 2025-01-13 Piotr Trojanek <[email protected]>
1157
1158 * libgnat/s-genbig.adb: Remove redundant parentheses in comments.
1159
1160 2025-01-13 Piotr Trojanek <[email protected]>
1161
1162 * checks.adb, exp_dist.adb, exp_imgv.adb, exp_util.adb,
1163 libgnarl/a-reatim.adb, libgnat/a-coinve.adb, libgnat/a-nbnbre.adb,
1164 libgnat/a-ngcoty.adb, libgnat/a-ngelfu.adb, libgnat/a-ngrear.adb,
1165 libgnat/a-strbou.ads, libgnat/a-strfix.ads, libgnat/a-strsea.adb,
1166 libgnat/a-strsea.ads, libgnat/a-strsup.ads,
1167 libgnat/a-strunb__shared.ads, libgnat/g-alleve.adb,
1168 libgnat/g-spitbo.adb, libgnat/s-aridou.adb, libgnat/s-arit32.adb,
1169 libgnat/s-dourea.ads, libgnat/s-genbig.adb, libgnat/s-imager.adb,
1170 libgnat/s-statxd.adb, libgnat/s-widthi.adb, sem_attr.adb, sem_ch10.adb,
1171 sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_prag.adb,
1172 sem_res.adb, uintp.adb: Remove redundant parentheses inside NOT and ABS
1173 operators.
1174
1175 2025-01-13 Piotr Trojanek <[email protected]>
1176
1177 * par-ch3.adb (P_Discrete_Range): Detect redundant parentheses in the
1178 lower bound like in the upper bound.
1179
1180 2025-01-13 Gary Dismukes <[email protected]>
1181
1182 * sem_aggr.adb (Resolve_Aggregate): Add another condition to prevent rewriting
1183 an aggregate whose type is an array of characters, testing for the presence of
1184 predicates on the component type.
1185
1186 2025-01-13 Piotr Trojanek <[email protected]>
1187
1188 * exp_ch4.adb: (Expand_N_Not_In): Preserve Alternatives in expanded
1189 membership operator just like preserving Right_Opnd (though only
1190 one of these fields is present at a time).
1191 * par-ch4.adb (P_Membership_Test): Remove redundant setting of fields
1192 to their default values.
1193
1194 2025-01-13 Piotr Trojanek <[email protected]>
1195
1196 * par-ch3.adb (P_Discrete_Range): Replace N_Subexpr, which was catching
1197 all subexpressions, with kinds that catch nodes that require
1198 parentheses to become "simple expressions".
1199
1200 2025-01-13 Eric Botcazou <[email protected]>
1201
1202 * libgnat/s-valrea.adb (Large_Powfive) [2 parameters]: Add a couple
1203 of additional comments.
1204
1205 2025-01-13 Piotr Trojanek <[email protected]>
1206
1207 * par-ch4.adb (P_Relation): Prevent Expr_Form to be overwritten when
1208 parsing the raise expression itself.
1209 (P_Simple_Expression): Fix manipulation of Expr_Form.
1210
1211 2025-01-10 squirek <[email protected]>
1212
1213 * accessibility.adb:
1214 (Innermost_master_Scope_Depth): Add special case for expressions
1215 within library level subprograms.
1216
1217 2025-01-10 Marc Poulhiès <[email protected]>
1218
1219 * env.h: Remove last empty line.
1220
1221 2025-01-10 Piotr Trojanek <[email protected]>
1222
1223 * contracts.adb (Build_Call_Helper_Decl): Tune whitespace.
1224 * exp_attr.adb (Analyze_Attribute): Set Of_Present while
1225 creating the node; reorder setting Subtype_Indication to match the
1226 syntax order.
1227 * exp_ch3.adb (Build_Equivalent_Aggregate): Likewise for Box_Present
1228 and Expression properties.
1229 * sem_ch12.adb (Analyze_Formal_Derived_Type): Set type properties
1230 when creating the nodes.
1231 * sem_ch3.adb (Check_Anonymous_Access_Component): Likewise.
1232
1233 2025-01-10 Piotr Trojanek <[email protected]>
1234
1235 * gen_il-gen-gen_nodes.adb (Gen_Nodes): Change Is_Effective_Use_Clause
1236 from syntactic to semantic property.
1237
1238 2025-01-10 Piotr Trojanek <[email protected]>
1239
1240 * exp_ch3.adb (Predef_Spec_Or_Body): Add explicit parameter
1241 associations, because now the Empty_List actual parameter would be
1242 confused as being for the Aspect_Specifications formal parameter.
1243 * gen_il-gen-gen_nodes.adb (Gen_Nodes): Reorder syntactic fields.
1244 * sem_util.adb (Declare_Indirect_Temp): Add explicit parameter
1245 association, because now the parameter will be interpreted as a
1246 subpool handle name.
1247
1248 2025-01-09 Eric Botcazou <[email protected]>
1249
1250 PR ada/18765
1251 * debug.adb (d_q): Document new usage.
1252 * sem_ch6.adb (New_Overloaded_Entity): Apply the special processing
1253 to all equality operators whose base result type is Boolean, but do
1254 not enforce the new Ada 2012 freezing rule if the result type is a
1255 proper subtype of it and the -gnatd_q switch is specified.
1256
1257 2025-01-09 Eric Botcazou <[email protected]>
1258
1259 PR ada/118274
1260 * sem_ch4.adb (Check_Arithmetic_Pair.Has_Fixed_Op): Use the original
1261 node of the operator to identify the case of an expanded name whose
1262 prefix is the package Standard.
1263
1264 2025-01-09 squirek <[email protected]>
1265
1266 * libgnat/a-comutr.adb, libgnat/a-comutr.ads:
1267 Move the declarations of iterator types into the specification and
1268 add additional comments.
1269
1270 2025-01-09 Javier Miranda <[email protected]>
1271
1272 * freeze.adb (Freeze_Expr_Types): Reverse patch; that is, restore
1273 calls to Preanalyze_Spec_Expression instead of Preanalyze_And_Resolve
1274 for the sake of consistency with Analyze_Expression_Function. Patch
1275 suggested by Eric Botcazou.
1276 * exp_put_image.adb (Image_Should_Call_Put_Image): Ensure that
1277 function Defining_Identifier is called with a proper node to
1278 avoid internal assertion failure.
1279
1280 2025-01-07 Marc Poulhiès <[email protected]>
1281
1282 * libgnat/a-calcon.ads: Adjust.
1283 * libgnat/a-calend.ads: Adjust.
1284
1285 2025-01-07 Alexandre Oliva <[email protected]>
1286
1287 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS):
1288 Drop g-cpp, g-cppexc and g-cppstd.
1289
1290 2025-01-07 Eric Botcazou <[email protected]>
1291
1292 * gcc-interface/trans.cc (Call_to_gnu): Always use the return slot
1293 optimization if the parent node is an initialization statement.
1294 (gnat_to_gnu) <N_Assignment_Statement>: Build an INIT_EXPR instead
1295 of a MODIFY_EXPR if this is an initialization statement.
1296
1297 2025-01-07 Piotr Trojanek <[email protected]>
1298
1299 * gen_il-fields.ads (Opt_Field_Enum): Remove flag.
1300 * gen_il-gen-gen_nodes.adb (N_Attribute_Definition_Clause): Remove
1301 field.
1302 * sem_ch13.adb (Validate_Address_Clauses): Remove read of the flag.
1303 * sinfo.ads (Address_Warning_Posted): Remove flag description.
1304
1305 2025-01-07 Eric Botcazou <[email protected]>
1306
1307 * exp_aggr.adb (Packed_Array_Aggregate_Handled): Remove declaration
1308 and handler for Not_Handled local exception. Check the return value
1309 of Get_Component_Val instead.
1310 (Get_Component_Val): Return No_Uint instead of raising Not_Handled.
1311
1312 2025-01-07 Javier Miranda <[email protected]>
1313
1314 * exp_util.adb (Insert_Actions): Document behavior under strict
1315 preanalysis.
1316 * sem.ads (In_Strict_Preanalysis): New subprogram.
1317 (Preanalysis_Active): Replace 'and' operator by 'and then'.
1318 * sem.adb (In_Strict_Preanalysis): Ditto.
1319 * sem_attr.adb (Check_Dereference): Replace In_Spec_Expression
1320 occurrence by call to Preanalysis_Active, and document it.
1321 (Resolve_Attribute [Atribute_Access]): Ditto.
1322 (Eval_Attribute): No evaluation under strict preanalysis.
1323 (Validate_Static_Object_Name): No action under strict preanalysis.
1324 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Replace
1325 calls to Preanalyze_Spec_Expression by calls to Preanalyze_And_Resolve.
1326 (Check_Aspect_At_Freeze_Point): Ditto.
1327 (Resolve_Aspect_Expressions [Dynamic/Static/Predicate aspects]): Code
1328 cleanup adjusting the code to emulate Preanalyze_And_Resolve, instead
1329 of Preanalyze_Spec_Expression.
1330 (Resolve_Aspect_Expressions [CPU/Interrupt_Priority/Priority/
1331 Storage_Size aspects]): Replace calls to Preanalyze_Spec_Expression
1332 by call to Preanalyze_And _Resolve.
1333 * sem_ch3.adb (Analyze_Object_Declaration): Replace In_Spec_Expression
1334 occurrence by call to Preanalysis_Active.
1335 (Find_Type_Of_Object): Add documentation.
1336 * sem_ch4.adb (Analyze_Case_Expression): Replace In_Spec_Expression
1337 occurrence by call to Preanalysis_Active.
1338 * sem_ch6.adb (Analyze_Expression_Function): Minor code reorganization
1339 moving the code preanalyzing the expression after the new body has
1340 been inserted in the tree to ensure that its Parent attribute is
1341 available for preanalysis.
1342 * sem_cat.adb (Validate_Static_Object_Name): No action under strict
1343 preanalysis.
1344 * sem_elab.adb (Check_For_Eliminated_Subprogram): Replace In_Spec_Expression
1345 occurrence by call to Preanalysis_Active.
1346 * sem_eval.adb (Eval_Intrinsic_Call [Name_Enclosing_Entity]): Ditto.
1347 * sem_elim.adb (Check_For_Eliminated_Subprogram): Ditto.
1348 * sem_res.adb (Resolve_Entity_Name): Ditto.
1349
1350 2025-01-07 Piotr Trojanek <[email protected]>
1351
1352 * repinfo-input.adb (Decode_Name, Read_Name_With_Prefix): Use constant
1353 overlay with pragma Import.
1354
1355 2025-01-07 Piotr Trojanek <[email protected]>
1356
1357 * exp_disp.adb (Write_DT): Add guards that prevent crashes on illegal
1358 node numbers.
1359
1360 2025-01-07 Piotr Trojanek <[email protected]>
1361
1362 * diagnostics-pretty_emitter.adb (Get_Last_Line_Char): Fix whitespace.
1363 * sem_aggr.adb (Resolve_Array_Aggregate): Fix style.
1364
1365 2025-01-07 Piotr Trojanek <[email protected]>
1366
1367 * sem_util.adb (Is_Null_Record_Definition): Remove check for
1368 Component_List being present after using it; replace check for
1369 component item being a component declaration with an assertion;
1370 fix style in comment.
1371
1372 2025-01-07 Ronan Desplanques <[email protected]>
1373
1374 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Fix abort
1375 deferral.
1376
1377 2025-01-07 Steve Baird <[email protected]>
1378
1379 * gen_il-fields.ads: add new Renames_Limited_View field.
1380 * gen_il-gen-gen_entities.adb: add Renames_Limited_View flag for
1381 packages.
1382 * einfo.ads: add comment documenting Renames_Limited_View flag.
1383 * sem_ch8.adb (Analyze_Package_Renaming): Set new Renames_Limited_View
1384 flag. Test new Renames_Limited_View flag instead of calling
1385 Has_Limited_With. If Has_Limited_With is True, that just means
1386 that somebody, sometime during this compilation needed to
1387 reference the limited view of the package; so that function
1388 returns True too often to be used here.
1389 (Find_Expanded_Name): Test new Renames_Limited_View flag instead of
1390 calling Has_Limited_With.
1391
1392 2025-01-07 Piotr Trojanek <[email protected]>
1393
1394 * contracts.adb (Inherit_Pragma): Don't set flag Is_Inherited_Pragma.
1395 * gen_il-fields.ads (Opt_Field_Enum): Remove field identifier.
1396 * gen_il-gen-gen_nodes.adb (N_Pragma): Remove field from node.
1397 * sinfo.ads (Is_Inherited_Pragma): Remove field description.
1398 (N_Pragma): Remove field reference.
1399
1400 2025-01-07 Piotr Trojanek <[email protected]>
1401
1402 * sem_prag.adb (Analyze_Attribute): Replace runtime conversion
1403 with existing constant.
1404
1405 2025-01-07 Piotr Trojanek <[email protected]>
1406
1407 * sem_attr.adb (Analyze_Attribute): Simplify logic.
1408
1409 2025-01-07 Piotr Trojanek <[email protected]>
1410
1411 * exp_attr.adb (Expand_N_Attribute_Reference): Remove explicit
1412 handling of attributes related to Ada 2012 iterators.
1413 * sem_attr.adb (Analyze_Attribute, Eval_Attribute): Likewise;
1414 move attribute Reduce according to alphabetic order.
1415 * snames.adb-tmpl (Get_Attribute_Id): Add support for new internal
1416 attributes.
1417 * snames.ads-tmpl: Recognize names of new internal attributes.
1418 (Attribute_Id): Recognize new internal attributes.
1419 (Internal_Attribute_Id): Likewise.
1420 (Is_Internal_Attribute_Name): Avoid duplication in comment.
1421
1422 2025-01-07 Piotr Trojanek <[email protected]>
1423
1424 * accessibility.adb (First_Selector): Remove redundant and locally
1425 inconsistent parenthesis.
1426 (Check_Return_Construct_Accessibility): Remove qualifier from list
1427 operation.
1428 * sem_util.adb (Is_Prim_Of_Abst_Type_With_Nonstatic_CW_Pre_Post):
1429 Likewise.
1430
1431 2025-01-07 Eric Botcazou <[email protected]>
1432
1433 * exp_ch7.ads (Store_After_Actions_In_Scope_Without_Analysis): New
1434 procedure declaration.
1435 * exp_ch7.adb (Store_New_Actions_In_Scope): New procedure.
1436 (Store_Actions_In_Scope): Call Store_New_Actions_In_Scope when the
1437 target list is empty.
1438 (Store_After_Actions_In_Scope_Without_Analysis): New procedure body.
1439 * exp_aggr.adb (Expand_Container_Aggregate): For a declaration that
1440 is wrapped in a transient scope, also defer the analysis of the new
1441 code until after the declaration is analyzed.
1442
1443 2025-01-07 Eric Botcazou <[email protected]>
1444
1445 * libgnat/s-powflt.ads (Maxpow_Exact): Minor comment fix.
1446 * libgnat/s-powlfl.ads (Maxpow_Exact): Likewise.
1447 * libgnat/s-powllf.ads (Maxpow_Exact): Likewise.
1448 * libgnat/s-valrea.adb (Large_Powfive) [1 parameter]: Exit the loop
1449 as soon as the result saturates to +Inf.
1450 (Large_Powfive) [2 parameters]: Likewise.
1451
1452 2025-01-07 Alexandre Oliva <[email protected]>
1453
1454 * libgnat/system-vxworks-ppc-rtp-smp.ads: Drop
1455 --specs=vxworks-ppc-link.spec from Linker_Options.
1456 * vxworks-smp-ppc-link.spec: Delete.
1457
1458 2025-01-07 Ronan Desplanques <[email protected]>
1459
1460 * atree.adb (Parent_Or_List_Containing): New function.
1461 * atree.ads (Parent_Or_List_Containing): Likewise.
1462 * gen_il-fields.ads: Add new field.
1463 * gen_il-gen-gen_nodes.adb (Gen_Nodes): Extend handled sequence of
1464 statements node.
1465 * par-ch11.adb (P_Handled_Sequence_Of_Statements, P_Exception_Handler):
1466 Add new syntactic construct.
1467 * par-ch5.adb (P_Sequence_Of_Statements): Likewise.
1468 * par.adb: Likewise.
1469 * par-util.adb (Check_Future_Keyword): Warn that "finally" becomes a
1470 reserved word with extensions.
1471 * scans.adb (Initialize_Ada_Keywords): Add new reserved word.
1472 * snames.adb-tmpl: Likewise.
1473 * snames.ads-tmpl: Likewise.
1474 * scans.ads: Likewise.
1475 * sem_ch11.adb (Analyze_Handled_Statements): Adapt to new node field.
1476 * sem_ch5.adb (Analyze_Exit_Statement): Add legality check.
1477 (Analyze_Goto_Statement): Likewise.
1478 * sem_ch6.adb (Analyze_Return_Statement): Likewise.
1479 * sinfo-utils.adb (Lowest_Common_Ancestor, Destroy_Element): New
1480 subprograms.
1481 * sinfo-utils.ads (Lowest_Common_Ancestor): New function.
1482 * sinfo.ads: Add documentation for new field.
1483 * xsnamest.adb: Fix typo in comment.
1484 * doc/gnat_rm/gnat_language_extensions.rst: Document new extension.
1485 * warnsw.adb: Add new option.
1486 * warnsw.ads: Likewise.
1487 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Add abort
1488 deferral to finally part.
1489 * gnat_rm.texi: Regenerate.
1490 * gnat_ugn.texi: Regenerate.
1491 * gcc-interface/trans.cc (Handled_Sequence_Of_Statements_to_gnu):
1492 Handle finally statements.
1493
1494 2025-01-07 Eric Botcazou <[email protected]>
1495
1496 * exp_aggr.adb (Expand_Array_Aggregate): Do not exclude aggregates
1497 of bit-packed array types in assignments from in-place expansion.
1498
1499 2025-01-07 Piotr Trojanek <[email protected]>
1500
1501 * sem_prag.adb (Analyze_Exceptional_Cases_In_Decl_Part): Reject
1502 references to attribute Result.
1503
1504 2025-01-07 Piotr Trojanek <[email protected]>
1505
1506 * sem_prag.adb (Analyze_Exceptional_Cases_In_Decl_Part): Move check
1507 from GNATprove backend to GNAT frontend.
1508
1509 2025-01-07 Piotr Trojanek <[email protected]>
1510
1511 * sem_prag.adb (Analyze_Exceptional_Contract, Analyze_Variant): Fix
1512 comments.
1513
1514 2025-01-07 Steve Baird <[email protected]>
1515
1516 * exp_put_image.adb (Image_Should_Call_Put_Image): Cope with the case
1517 where the attribute prefix for an Image attribute reference
1518 denotes an Itype constructed for a fixed point type. Calling
1519 Has_Aspect with such an Itype misses applicable aspect
1520 specifications; we need to look on the right list. This comes up
1521 if the prefix of the attribute reference is
1522 Some_Fixed_Point_Type'Base.
1523
1524 2025-01-07 Gary Dismukes <[email protected]>
1525
1526 * sem_ch12.adb (Analyze_One_Association): In the case of a formal type
1527 that has a Default_Subtype_Mark that does not have its Entity field set,
1528 this means the default refers to another formal type of the same generic
1529 formal part, so locate the matching subtype in the Result_Renamings and
1530 set Match's Entity to that subtype prior to the call to Instantiate_Type.
1531 (Validate_Formal_TypeDefault.Reference_Formal): Add test of Entity being
1532 Present, to prevent blowups on End_Label ids (which don't have Entity set).
1533 (Validate_Formal_Type_Default.Validate_Derived_Type_Default): Apply
1534 Base_Type to Formal.
1535 (Validate_Formal_Type_Default): Guard interface-related semantic checks
1536 with a test of Is_Tagged_Type.
1537
1538 2025-01-07 Eric Botcazou <[email protected]>
1539
1540 * repinfo.adb (List_GCC_Expression.Print_Expr) <Cond_Expr>: Do not
1541 output the final "end".
1542
1543 2025-01-07 Johannes Kanig <[email protected]>
1544
1545 * gnat1drv.adb: (SPARK_Library_Warning): preserve Warning_Doc_Switch
1546
1547 2025-01-07 Eric Botcazou <[email protected]>
1548
1549 * exp_ch4.adb (Expand_Allocator_Expression): Do not build a cleanup
1550 if restriction No_Exception_Propagation is active.
1551 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Likewise.
1552
1553 2025-01-06 Eric Botcazou <[email protected]>
1554
1555 PR ada/118247
1556 * gcc-interface/Make-lang.in (GNATTOOLS_CROSS_MV): Copy gnatbind
1557 instead of moving it.
1558
1559 2025-01-06 Eric Botcazou <[email protected]>
1560
1561 * exp_aggr.adb (Two_Pass_Aggregate_Expansion): Use the base type of
1562 the index type to find the type used to compute the length.
1563
1564 2025-01-06 Eric Botcazou <[email protected]>
1565
1566 * libgnat/s-finpri.ads: Remove clause for Ada.Finalization.
1567 (Finalization_Collection): Change to limited private type with the
1568 Finalizable aspect.
1569 (Initialize): Remove "overriding" keyword.
1570 (Finalize): Likewise.
1571 * libgnat/s-finpri.adb (Initialize): Likewise.
1572 (Finalize): Likewise.
1573
1574 2025-01-06 Eric Botcazou <[email protected]>
1575
1576 PR ada/117569
1577 * sem_ch4.adb (Analyze_Indexed_Component_Form): Do not rewrite the
1578 node as a type conversion if it is the current instance of a type
1579 in a generic unit.
1580 * sem_ch8.adb (Find_Selected_Component): Restrict the special case
1581 of the current instance of a type to a generic unit.
1582
1583 2025-01-06 Bob Duff <[email protected]>
1584
1585 * libgnat/s-imagef.adb (Set_Image_Integer):
1586 Change "RM A.3.10" to be "RM A.10.9".
1587
1588 2025-01-06 Alexandre Oliva <[email protected]>
1589
1590 * libgnat/g-cppexc.adb (Convert_Caught_Object): Move...
1591 * libgnat/g-cstyin.adb (Convert_Caught_Object): ... here.
1592 Use object call notation.
1593 (strcmp): New.
1594 (Char_Arr, CharPtr, Char_Pointer, To_chars_ptr): Drop. Do not
1595 import Interfaces.C.Pointers.
1596 (To_Pointer): Convert from System.Address.
1597 (Name_Starts_With_Asterisk): Rename local variable.
1598 (Name_Past_Asterisk): Rewrite with System.Address and strcmp.
1599 Import System.Storage_Elements.
1600 (Equals): Use strcmp.
1601 (Before): Fix logic error. Use strcmp.
1602 (Name): Move conversion to String...
1603 * libgnat/g-cppstd.adb (Name): ... here. Import
1604 Interfaces.C.Strings.
1605 * libgnat/g-cppstd.ads (Type_Info_Ptr): Disable heap
1606 finalization.
1607 * libgnat/g-cstyin.ads (Name): Change return type.
1608
1609 2025-01-06 Claire Dross <[email protected]>
1610
1611 * aspects.ads: Add aspect Aspect_Exit_Cases.
1612 * contracts.adb (Analyze_Entry_Or_Subprogram_Contract): Handle Exit_Cases.
1613 (Expand_Subprogram_Contract): Idem.
1614 * einfo-utils.adb (Get_Pragma): Allow Pragma_Exit_Cases.
1615 * einfo-utils.ads (Get_Pragma): Idem.
1616 * exp_prag.adb (Expand_Pragma_Exit_Cases): Ignore the pragma, currently we don't expand it.
1617 * exp_prag.ads (Expand_Pragma_Exit_Cases): Idem.
1618 * inline.adb (Remove_Aspects_And_Pragmas): Add Exit_Cases to the list.
1619 (Remove_Items): Idem.
1620 * par-prag.adb (Last_Arg_Is_Reason): Idem.
1621 * sem_ch12.adb: Idem.
1622 * sem_ch13.adb: Idem.
1623 * sem_util.adb: Idem.
1624 * sem_util.ads: Idem.
1625 * sinfo.ads: Idem.
1626 * snames.ads-tmpl: Add names Name_Exit_Cases, Name_Exception_Raised, and Name_Normal_Return
1627 as well as pragma Pragma_Exit_Cases.
1628 * sem_prag.adb (Analyze_Exit_Cases_In_Decl_Part): Make sure that a
1629 pragma or aspect Exit_Cases is well formed.
1630 (Analyze_Pragma): Make sure that a pragma or aspect Exit_Cases is at the right place.
1631 * sem_prag.ads (Analyze_Exit_Cases_In_Decl_Part): Declaration.
1632 * doc/gnat_rm/implementation_defined_pragmas.rst: Document the Exit_Cases pragma.
1633 * doc/gnat_rm/implementation_defined_aspects.rst: Document the Exit_Cases aspect.
1634 * gnat_rm.texi: Regenerate.
1635
1636 2025-01-06 Bob Duff <[email protected]>
1637
1638 * sem_util.adb (Copy_Subprogram_Spec): When copying
1639 an N_Defining_Operator_Symbol, create an
1640 N_Defining_Operator_Symbol rather than an N_Defining_Identifier.
1641 This will cause Lib.Xref to "skip the initial quote for
1642 navigation purposes" (as per comments in Lib.Xref body).
1643
1644 2025-01-06 Eric Botcazou <[email protected]>
1645
1646 * exp_aggr.adb (Case_Table_Type): Fix reference in comment.
1647 (In_Place_Assign_OK): Move declaration around.
1648 (Is_Build_In_Place_Aggregate_Return): Likewise and adjust.
1649 (Expand_Array_Aggregate): Streamline for the sake of consistency.
1650 (Aggr_Assignment_OK_For_Backend): Remove reference to Gigi/gcc.
1651 (Backend_Processing_Possible): Likewise.
1652 (Expand_Array_Aggregate): Add comment.
1653
1654 2025-01-06 Bob Duff <[email protected]>
1655
1656 * sinfo.ads (Shift_Count_OK): Update comments.
1657 (Is_Power_Of_2_For_Shift): Likewise.
1658
1659 2025-01-06 Eric Botcazou <[email protected]>
1660
1661 * debug.adb (dQ): Document usage.
1662 * exp_ch4.ads (Build_Cleanup_For_Allocator): New declaration.
1663 * exp_ch4.adb (Build_Cleanup_For_Allocator): New procedure.
1664 (Expand_Allocator_Expression): Build a cleanup to deallocate the
1665 memory when the evaluation of the expression raises an exception.
1666 * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Likewise.
1667 * exp_util.adb (Build_Allocate_Deallocate_Proc): Do not generate the
1668 detachment if the deallocation is for the cleanup of an allocator.
1669 * gen_il-fields.ads (Opt_Field_Enum): Add For_Allocator.
1670 * gen_il-gen-gen_nodes.adb (N_Free_Statement): Likewise.
1671 * sinfo.ads (For_Allocator): Document usage on N_Free_Statement.
1672
1673 2025-01-06 Eric Botcazou <[email protected]>
1674
1675 PR ada/117956
1676 * sem_util.adb (Is_Known_On_Entry): Be prepared for constants coming
1677 from a renaming declaration.
1678
1679 2025-01-06 Tonu Naks <[email protected]>
1680
1681 * adaint.c (__gnat_locate_exec_on_path): modify function signature
1682
1683 2025-01-06 Piotr Trojanek <[email protected]>
1684
1685 * sem_prag.adb (Resolve_State): Continue ordinary processing.
1686
1687 2025-01-06 Javier Miranda <[email protected]>
1688
1689 * sem_ch4.adb (Try_Object_Operation): if no candidate interpretation
1690 matches the context, redo the same analysis with Report_Error True
1691 to report the error.
1692
1693 2025-01-06 Eric Botcazou <[email protected]>
1694
1695 * exp_ch5.adb (Expand_Assign_Array): Bail out for controlled
1696 components if the RHS is a function call and the assignment has
1697 the No_Ctrl_Actions flag set.
1698
1699 2025-01-06 Viljar Indus <[email protected]>
1700
1701 * diagnostics-json_utils.adb: Add new method
1702 Write_Boolean_Attribute.
1703 * diagnostics-json_utils.ads: Likewise.
1704 * diagnostics-sarif_emitter.adb (Print_Invocations): print
1705 the executionSuccesful property value without extra quotes.
1706
1707 2025-01-06 Viljar Indus <[email protected]>
1708
1709 * diagnostics-sarif_emitter.adb (Print_Rule): Remove printing
1710 of the level attribute since it does not match the SARIF schema.
1711
1712 2025-01-06 Piotr Trojanek <[email protected]>
1713
1714 * gen_il-gen.adb (Put_Tables): Add "not null" to the generated code.
1715 * rtsfind.adb (Cstring_Ptr): Same for table with predefined RE_Id
1716 error messages.
1717 * impunit.adb (Aunit_Record): Same for array of alternative unit names.
1718
1719 2025-01-06 Piotr Trojanek <[email protected]>
1720
1721 * opt.ads (Ada_Version_Runtime): Now a constant, since it cannot
1722 and should never be modified.
1723
1724 2025-01-06 Bob Duff <[email protected]>
1725
1726 * par-ch10.adb (P_Compilation_Unit): Give an error for "is null".
1727 * sem_ch10.adb (Analyze_Subunit): Remove check for "is null"
1728 as a subunit.
1729 * sem_ch6.adb (Analyze_Subprogram_Declaration):
1730 Remove check for "is null" as a library unit.
1731
1732 2025-01-06 Javier Miranda <[email protected]>
1733
1734 * sem_ch6.adb (Analyze_Expression_Function): Set the parent of
1735 the new node to be the parent of the original to get the proper
1736 context, which is needed for complete error reporting and for
1737 semantic analysis. Patch suggested by Eric Botcazou.
1738
1739 2025-01-06 Alexandre Oliva <[email protected]>
1740 Olivier Hainque <[email protected]>
1741
1742 * Makefile.rtl (LLVM_BUILD): Define based on LLVM_CONFIG.
1743 (GNATRTL_NONTASKING_OBJS): Make g-cpp, g-cppstd, and g-cstyin
1744 conditional on -gcc or -arm EH, and on no LLVM_BUILD.
1745 * raise-gcc.c (GXX_EH_INTEROP): Define as 0 on gnat-llvm or
1746 CERT, and 1 otherwise.
1747 (__gnat_get_cxx_dependent_exception) Omit on !GXX_EH_INTEROP.
1748 (__gnat_maybe_get_cxx_dependent_exception): Likewise.
1749 (__gnat_get_cxx_exception_type_info): Likewise.
1750 (__gnat_obtain_caught_object): Likewise.
1751 (is_handled_by): Omit eid parameter and G++ interop on
1752 !GXX_EH_INTEROP. Adjust callers.
1753
1754 2025-01-06 Eric Botcazou <[email protected]>
1755
1756 * einfo.ads (Returns_By_Ref): Fix description.
1757 * exp_ch3.adb (Build_Record_Init_Proc.Build_Assignment): Do not
1758 adjust the component manually (if need be), set No_Finalize_Actions
1759 instead of No_Ctrl_Actions for this purpose. Do not adjust when
1760 the expression is a naked function call.
1761 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Document the quirks of
1762 the function. Assert that the LHS of the assignment does not have
1763 side effects and replace calls to Duplicate_Subexpr_No_Checks with
1764 calls to New_Copy_Tree. Rename local variable Asn to New_N.
1765 (Expand_N_Assignment_Statement): In the tagged or controlled record
1766 case, do remove side effects from both operands on entry. Remove
1767 them in the controlled record case, except if the RHS is a function
1768 call and the assignment has the No_Ctrl_Actions flag set.
1769 * exp_ch6.adb (Expand_Ctrl_Function_Call): Bail out when the parent
1770 node is an assignment statement with the No_Ctrl_Actions flag set.
1771 * sem_util.adb (Statically_Different): Return True for a function
1772 call that does not return its result by reference.
1773 * sinfo.ads (No_Ctrl_Actions): Adjust description and add a note for
1774 the code generator.
1775 (No_Finalize_Actions): Likewise.
1776
1777 2025-01-06 Bob Duff <[email protected]>
1778
1779 * gen_il-gen.adb: Fix too-long line.
1780
1781 2025-01-06 Tonu Naks <[email protected]>
1782
1783 * adaint.c: void parameter on non-windows platforms
1784
1785 2025-01-06 Bob Duff <[email protected]>
1786
1787 * gen_il-internals.ads: Split Fields field into two fields
1788 Imm_Fields and Fields.
1789 * gen_il-gen.adb: Modify the field-inheritance
1790 algorithm to inherit at each level of the type hierarchy,
1791 rather than just inheriting into concrete types.
1792 For example, if C is a concrete type derived from B,
1793 which is in turn derived from A, we now set the Fields
1794 of B to include those of A. (We had always set the Fields
1795 of C to include those of A and B, and we still do that.)
1796 (Compute_Fields_For_One_Type): Detect cases where a given
1797 field is declared for all descendants of a given abstract
1798 type, in which case we should consider declaring it in
1799 the abstract type, and inheriting it in those descendants.
1800 (Exception_To_Inheritance_Rule): These are the cases where
1801 we could inherit, but we don't want to.
1802 * gen_il-gen-gen_nodes.adb: Move fields up the type hierarchy,
1803 so they are inherited instead of being defined separately.
1804 * gen_il-gen-gen_entities.adb: Likewise.
1805
1806 2025-01-06 Viljar Indus <[email protected]>
1807
1808 * sem_ch6.adb (Analyze_Subprogram_Body_Helper):
1809 Exchange_Limited_Views also in Ada 2005.
1810
1811 2025-01-06 Eric Botcazou <[email protected]>
1812
1813 * exp_ch6.adb (Expand_Call_Helper): Call Ultimate_Alias for the
1814 detection of calls to subprograms specified for Constant_Indexing.
1815 * exp_util.adb (Is_Indexed_Container): Likewise.
1816 (Is_Iterated_Container): Likewise for Default_Iterator.
1817
1818 2025-01-06 Ronan Desplanques <[email protected]>
1819
1820 * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix markup.
1821 * gnat_ugn.texi: Regenerate.
1822
1823 2025-01-06 Piotr Trojanek <[email protected]>
1824
1825 * sem_ch13.adb (Validate_Unchecked_Conversions): Remove detection of
1826 null arrays; remove tests for sizes being present, which are redundant
1827 after calling Known_Static_RM_Size.
1828
1829 2025-01-06 Eric Botcazou <[email protected]>
1830
1831 PR ada/117936
1832 * doc/gnat_rm/implementation_defined_pragmas.rst
1833 (Unimplemented_Unit): Adjust the description of the error message.
1834 * gnat_rm.texi: Regenerate.
1835
1836 2025-01-05 Estevan Castilho (Tevo) <[email protected]>
1837
1838 * libgnarl/s-taprop__dummy.adb: Remove use clause for
1839 System.Parameters.
1840 (Unlock): Remove Global_Lock formal parameter.
1841 (Write_Lock): Likewise.
1842
1843 2025-01-03 Piotr Trojanek <[email protected]>
1844
1845 * exp_ch3.adb, exp_ch4.adb, exp_disp.adb, inline.adb: Remove explicit
1846 actual parameter Null_Exclusion_Present equal False.
1847
1848 2025-01-03 Piotr Trojanek <[email protected]>
1849
1850 * exp_ch3.adb, exp_disp.adb: Remove explicit actual parameter
1851 Constant_Present equal False; tune comments.
1852
1853 2025-01-03 Piotr Trojanek <[email protected]>
1854
1855 * exp_ch3.adb, exp_ch9.adb, exp_dist.adb, exp_imgv.adb, exp_util.adb,
1856 sem_dist.adb: Remove explicit actual parameter Aliased_Present equal
1857 False; tune comments and whitespace.
1858
1859 2025-01-03 Piotr Trojanek <[email protected]>
1860
1861 * sem_ch5.adb (Check_Call): Reuse Get_Called_Entity.
1862
1863 2025-01-03 Piotr Trojanek <[email protected]>
1864
1865 * sem_attr.adb (Check_Array_Type): Remove extra call.
1866 * sem_util.adb (Static_Boolean): Likewise.
1867
1868 2025-01-03 Piotr Trojanek <[email protected]>
1869
1870 * exp_aggr.adb (Others_Check): Reuse List_Length; tune whitespace.
1871 * exp_ch3.adb (Constrain_Array): Remove counting of constraints.
1872 * exp_disp.adb (Make_DT): Use Elist utility routines; tune whitespace.
1873 * sem_ch12.adb (Formal_Dimensions): Reuse List_Length.
1874 (Valid_Default_Attribute): Reuse Number_Formals.
1875 * sem_prag.adb (Process_Convention): Likewise.
1876 * sem_util.adb (Normalize_Actuals): Likewise.
1877 (Check_Function_Writable_Actuals): Reuse List_Length.
1878
1879 2025-01-03 Piotr Trojanek <[email protected]>
1880
1881 * contracts.adb (Create_Generic_Contract): Remove calls to Present.
1882 * sem_util.adb (Normalize_Actuals): Likewise.
1883
1884 2025-01-03 Bob Duff <[email protected]>
1885
1886 * sem_util.adb (Append_Entity_Name): Do not skip the
1887 simple name for a compilation unit (which includes
1888 the case of specless subprogram bodies).
1889
1890 2025-01-03 Tucker Taft <[email protected]>
1891
1892 * pprint.adb (Expression_Image): Adjust and improve comments
1893 to match style recommendations, and change name of subtype
1894 from Not_Associative to Non_Associative, in response to
1895 code review.
1896
1897 2025-01-03 Tucker Taft <[email protected]>
1898
1899 * pprint.adb (Expression_Image): In local function Expr_Name
1900 add a No_Parens flag and define a subtype Not_Associative
1901 to represent the short-circuit operations and And/Or/Xor.
1902 Insert parentheses to separate the subexpressions when
1903 different "Not_Associative" operations occur in a
1904 sequence.
1905
1906 2025-01-03 Eric Botcazou <[email protected]>
1907
1908 * einfo.ads (BIP_Initialization_Call): Adjust description.
1909 * exp_ch4.adb (Expand_N_Case_Expression): Adjust commentary.
1910 (Expand_N_If_Expression): Likewise.
1911 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1912 Set BIP_Initialization_Call unconditionally in the definite case.
1913
1914 2025-01-03 Piotr Trojanek <[email protected]>
1915
1916 * uintp.adb (N_Digits): Refine return subtype, since this routine
1917 always returns a positive number of digits.
1918
1919 2025-01-03 Piotr Trojanek <[email protected]>
1920
1921 * checks.adb (Generate_Index_Checks): Reuse existing utility routine.
1922 * sem_ch4.adb (Analyze_Indexed_Component_Form): Likewise.
1923 * sem_prag.adb (Analyze_Pragma): Likewise.
1924
1925 2025-01-03 Piotr Trojanek <[email protected]>
1926
1927 * exp_dist.adb (Assign_Subprogram_Identifier,
1928 Reserve_NamingContext_Methods): Simplify.
1929 * osint.adb (Append_Suffix_To_File_Name, Find_File, Get_Directory,
1930 Object_File_Name, Strip_Directory): Likewise.
1931
1932 2025-01-03 Piotr Trojanek <[email protected]>
1933
1934 * sem_res.adb (Resolve_Alocator): Move unrelated code out of a declare
1935 block.
1936
1937 2025-01-03 Piotr Trojanek <[email protected]>
1938
1939 * exp_ch3.adb (Search_Access_Discriminant, Search_Current_Instance,
1940 Search_Internal_Call): Use traversal function instead of traversal
1941 procedure and remove associated global variables.
1942 * exp_util.adb (Search_Calls): Likewise.
1943 * sem_prag.adb (Contains_Loop_Entry): Likewise.
1944 * sem_util.adb (Mentions_Post_State): Likewise.
1945
1946 2025-01-03 Piotr Trojanek <[email protected]>
1947
1948 * sem_attr.adb (Eval_Attribute): Fix comment for attribute Image.
1949 * tbuild.adb (Make_SC): Remove extra whitespace.
1950
1951 2025-01-03 Alexandre Oliva <[email protected]>
1952
1953 * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-cpp, g-cppstd,
1954 and g-cstyin.
1955 * doc/gnat_rm/interfacing_to_other_languages.rst (Interfacing to C++):
1956 Document class-wide matching and new interfaces.
1957 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Add class-wide
1958 exception matching support with 'B' as language identifier.
1959 * libgnat/a-exexpr.adb (Setup_Current_Excep): Add Id formal.
1960 (Set_Foreign_Occurrence): Likewise.
1961 (Propagate_GCC_Exception): Adjust.
1962 (Set_Exception_Parameter): Likewise.
1963 (Unhandled_Except_Handler): Likewise.
1964 * libgnat/g-cpp.ads: New.
1965 * libgnat/g-cppexc.adb (Raise_Cpp_Exception): Match 'B' lang id.
1966 (Get_Object_Address): New.
1967 (Get_Object): Rewrite.
1968 (Get_Access_To_Object): New.
1969 (Get_Access_To_Tagged_Object): New.
1970 (Get_Type_Info): New.
1971 (Convert_Caught_Object): New.
1972 * libgnat/g-cppexc.ads (Get_Object_Address): New.
1973 (Get_Object): Note the Cpp Convention requirement.
1974 (Get_Access_To_Object): New.
1975 (Get_Access_To_Tagged_Object): New.
1976 (Get_Type_Info): New.
1977 * libgnat/g-cppstd.adb: New.
1978 * libgnat/g-cppstd.ads: New.
1979 * libgnat/g-csclex.ads: New, unused.
1980 * libgnat/g-cstyin.adb: New.
1981 * libgnat/g-cstyin.ads: New.
1982 * libgnat/g-excact.adb (Exception_Language): New.
1983 (Is_Foreign_Exception): Rewrite.
1984 * libgnat/g-excact.ads (Exception_Languages): New.
1985 (Exception_Language): New.
1986 * libgnat/s-stalib.ads (Lang): Document 'B'.
1987 * raise-gcc.c (__gnat_setup_current_excep): Add Exception_Id formal.
1988 (CXX_DEPENDENT_EXCEPTION_CLASS): New.
1989 (cxx_type_info): New.
1990 (__cxa_exception): Rename exceptionType to encompass PrimaryException.
1991 (_GNAT_Exception): Drop wrapper.
1992 (EID_For): Adjust.
1993 (exception_class_eq): Likewise.
1994 (__gnat_exception_language_is_cplusplus): New.
1995 (__gnat_exception_language_is_ada): New.
1996 (__gnat_convert_caught_object): Declare.
1997 (__gnat_get_cxx_dependent_exception): New.
1998 (__gnat_maybe_get_cxx_dependent_exception): New.
1999 (__gnat_get_cxx_exception_type_info): New.
2000 (__gnat_obtain_caught_object): New.
2001 (is_handled_by): Adjust. [!CERT] Add eid formal, handle dependent
2002 exceptions and base-type matches.
2003 (get_action_description_for) [!CERT]: Add eid formal. Adjust.
2004 (personality_body): Adjust.
2005 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS) [!STAGE1]:
2006 Add new g-cpp, g-cppstd, g-cstyin + preexisting g-cppexc
2007 and i-cstrin.
2008 * gnat-style.texi: Regenerate.
2009 * gnat_rm.texi: Regenerate.
2010
2011 2025-01-03 Gary Dismukes <[email protected]>
2012
2013 * diagnostics-constructors.adb (Make_Default_Iterator_Not_Primitive_Error):
2014 Revise message to match message change made in sem_ch13.adb.
2015 * freeze.adb (Freeze_Record_Type): Output appropriate aspect name in
2016 error message, using Get_Name_String.
2017 (Freeze_Entity): For derived types, call Analyze_Aspects_At_Freeze_Point
2018 on the parent type, and call Inherit_Nonoverridable_Aspects on the type
2019 (for both parent type and any progenitor types). Add with_clause for
2020 System.Case_Util.
2021 * gen_il-fields.ads: Add Aspect_Subprograms to type Opt_Field_Enum.
2022 * gen_il-gen-gen_nodes.adb: Add field Aspect_Subprograms to
2023 N_Aspect_Specification nodes.
2024 * sem_ch4.adb (Try_Container_Indexing): Remove Find_Indexing_Operations
2025 and the code calling it. Add new function Indexing_Interpretations for
2026 retrieving the eligible indexing functions from the appropriate aspect's
2027 Aspect_Subprograms list and call that instead of Find_Value_Of_Aspect.
2028 * sem_ch7.adb (Analyze_Package_Specification): In loop over entities,
2029 call Analyze_Aspects_At_Freeze_Point for types that have delayed
2030 aspects.
2031 * sem_ch13.ads (Analyze_Aspects_At_Freeze_Point): Add Nonoverridable_Only
2032 formal to restrict processing to nonoverridable aspects.
2033 (Check_Function_For_Indexing_Aspect): New exported procedure renamed
2034 from Check_One_Function and moved to library level.
2035 * sem_ch13.adb (Analyze_Aspects_At_Freeze_Point): Test new formal
2036 Nonoverridable_Only formal to skip processing of aspects that are not
2037 nonoverridable when the formal is True. Skip the processing for
2038 Aspect_Full_Access_Only when Nonoverridable_Only is True. Call
2039 Check_Indexing_Functions in the case of indexing aspects (procedure
2040 moved from Analyze_Attribute_Definition_Clause to top level).
2041 (Analyze_Aspect_Specifications): Locate closest ancestor type with an
2042 explicit matching aspect to determine the aspect spec to reference in
2043 the error about a nonoverridable aspect not confirming an inherited
2044 aspect (skipping intermediate derived parents). Ensures that we retain
2045 existing errors flagged on explicit ancestor aspects rather than
2046 implicit inherited ones. Change names of variables Parent_Type and
2047 Inherited_Aspect to Ancestor_Type and Ancestor_Aspect respectively
2048 for clarity.
2049 (Analyze_Attribute_Definition_Clause): Move nested subprograms
2050 Check_Iterator_Functions and Check_Primitive_Function to top level
2051 of package. Move Check_Indexing_Functions (and its nested subprograms)
2052 from here to within Analyze_Aspects_At_Freeze_Point (adding some
2053 formal parameters and adjusting the code appropriately, and no longer
2054 call it from this procedure).
2055 (Is_CW_Or_Access_To_CW): Add test for the parent type having the
2056 indexing aspect for proper setting of Aspect_Specification_Is_Inherited.
2057 Delete "???" comment.
2058 (Look_Through_Anon_Access): Remove unneeded tests of Is_Access_Constant
2059 and Name_Constant_Indexing, which lead to wrong messages in some cases.
2060 (Check_Function_For_Indexing_Aspect): Procedure renamed from
2061 Check_One_Function and moved to library level (was nested within
2062 Check_Indexing_Functions), plus added formals (including Valid, to
2063 check result). Move scope test to beginning, to immediately exclude
2064 subprograms not declared immediately within the same scope as the type.
2065 Improve several error messages. Add error checking for Constant_Indexing
2066 functions. Append the function entity to the Aspect_Subprograms list of
2067 the aspect specification. Move code for checking for nonconfirming
2068 index aspects and for checking for illegal indexing aspects on full
2069 views to Check_Indexing_Functions.
2070 (Check_Indexing_Functions): Move procedure Illegal_Indexing from
2071 here to within Check_Function_For_Indexing_Aspect. Add a comment
2072 to the loop over interpretations about the checking being done as
2073 legality rules rather than resolution rules, plus a note referencing
2074 AI22-0084. Check for nonconfirming indexing aspects and illegal
2075 indexing aspects on full views here rather than in Check_One_Function
2076 (now named Check_Function_For_Indexing_Aspect). Remove function
2077 Check_One_Function (moved to library level and renamed), and call
2078 Check_Function_For_Indexing_Aspect instead.
2079 (Check_Inherited_Indexing): Improve spec comment. Remove nested function
2080 Same_Chars, and replace call Same_Chars with call to Sem_Util.Same_Name.
2081 Replace call to Illegal_Indexing with call to Error_Msg_NE.
2082 (Check_One_Function): Unnested from Check_Indexing_Functions, rename
2083 to Check_Function_For_Indexing_Aspect, move body to library level,
2084 and move declaration to Sem_Ch13 spec.
2085 (Analyze_Attribute_Definition_Clause, case Attribute_Default_Iterator):
2086 Improve error message related to tagged-type requirement. Suppress call
2087 to Check_Iterator_Functions for attribute definition clauses associated
2088 with inherited aspects. Remove error checking that is redundant with
2089 checking done in Check_Iterator_Functions.
2090 (Check_Aspect_At_Freeze_Point, case Attribute_Default_Iterator): Call
2091 Check_Iterator_Functions (only if the aspect is not Comes_From_Source).
2092 (Check_Iterator_Functions): Procedure unnested from
2093 Analyze_Attribute_Definition_Clause. Add formals Typ and Expr.
2094 Error messages corrected to say "aspect Default_Iterator" instead of
2095 "aspect Iterator".
2096 (Valid_Default_Iterator): Improve error message to say "must be
2097 a local primitive or class-wide function" instead of "must be
2098 a primitive function".
2099 (Check_Primitive_Function): Unnested from Analyze_Attribute_Definition_Clause.
2100 Add formal Ent.
2101 (Rep_Item_Too_Late): Return False when an attribute_definition_clause
2102 is not Comes_From_Source, since it was generated by the compiler (such
2103 as for an inherited aspect).
2104 (Resolve_Aspect_Aggregate): Capture implementation base type.
2105 (Valid_Empty): Use implementation base types for result type comparison.
2106 (Valid_Add_Named): Use impl base types for comparison of formal's type.
2107 (Valid_Add_Unnamed): Use impl base types for comparison of formal's type.
2108 (Valid_New_Indexed): Use impl base types for result type comparison.
2109 (Validate_Literal_Aspect): Return immediately when aspect does not have
2110 Comes_From_Source True (no point in validating inherited aspects).
2111 * sem_res.adb (Has_Applicable_User_Defined_Literal): Remove Base_Type
2112 comparison and always call Corresponding_Op_Of_Derived_Type for derived
2113 types. Add "???" comment about issue with wrapper functions (and
2114 indicate that it would be nice to eliminate the call to
2115 Corresponding_Primitive_Op).
2116 * sem_util.ads (Inherit_Nonoverridable_Aspects): New procedure.
2117 (Corresponding_Op_Of_Derived_Type): Update spec comment to indicate
2118 return of Ancestor_Op and name changed from Corresponding_Primitive_Op.
2119 * sem_util.adb (Check_Inherited_Nonoverridable_Aspects): Fix name in
2120 header comment.
2121 (Corresponding_Op_Of_Derived_Type): Move declaration of Typ down with
2122 other local variables. Remove Assert that doesn't apply in some cases.
2123 Simply return Ancestor_Op when it isn't a primitive (it can be a
2124 class-wide op). Function name changed from Corresponding_Primitive_Op.
2125 (Find_Untagged_Type_Of): Add test of Is_Type (E) as a guard for checking
2126 Direct_Primitive_Operations. Remove Assert (False), and return Empty
2127 when the primitive is not found.
2128 (Profile_Matches_Ancestor): Change comparisons to use implementation
2129 base types of the operations' formal and result types. Add tests for
2130 interface ancestors. Revise "???" comment.
2131 (Is_Confirming): Simplify name-matching test to use the names associated
2132 with the aspects rather than going to the N_Attribute_Definition_Clause
2133 nodes (may facilitate elimination of those clauses at some point).
2134 (Inherit_Nonoverridable_Aspects): New procedure to traverse the
2135 aspects of a derived type's parent type and create inherited versions
2136 of the parent type's nonoverridable aspects, identifying the appropriate
2137 subprograms for each such inherited aspect.
2138 (Inherit_Nonoverridable_Aspect): New procedure nested in
2139 Inherit_Nonoverridable_Aspects to inherit individual nonoverridable
2140 aspects. Identifies the corresponding subprogram(s) associated with
2141 an inherited nonoverridable aspect. In the case of indexing aspects,
2142 new eligible indexing functions of the type are also identified here,
2143 and the entities of all of the identified subprograms are appended to
2144 the aspect's Aspect_Subprograms Elist. Add a "???" comment about this.
2145 * sinfo.ads: Add documentation for the new Aspect_Subprograms field.
2146
2147 2025-01-03 Eric Botcazou <[email protected]>
2148
2149 * exp_ch4.adb (Insert_Conditional_Object_Declaration): Create the
2150 Master_Node even if the declaration is turned into a renaming.
2151
2152 2025-01-03 Piotr Trojanek <[email protected]>
2153
2154 * sem_ch3.adb (Array_Type_Declaration): Don't copy parent for an itype
2155 created by an array component declaration.
2156
2157 2025-01-03 Douglas B Rupp <[email protected]>
2158
2159 * socket.c [__vxworks]: Change vxw_h_addr type to long from
2160 int, and cast the conversion of char* to vxw_h_addr to avoid
2161 warning/error.
2162
2163 2025-01-03 Tonu Naks <[email protected]>
2164
2165 * adaint.c: change default behaviour of __gnat_locate_exec_on_path
2166 * adaint.h: change prototype of __gnat_locate_exec_on_path
2167 * libgnat/s-os_lib.adb: pass optional argument in Locate_Exec_On_Path
2168 * libgnat/s-os_lib.ads: change spec of Locate_Exec_On_Path
2169 * libgnat/s-trasym__dwarf.adb: update import of __gnat_locate_exec_on_path
2170
2171 2025-01-03 Eric Botcazou <[email protected]>
2172
2173 * exp_ch4.adb (Expand_Allocator_Expression): Put back the call to
2174 Remove_Side_Effects in the case of a function call, a class-wide
2175 designated type and a regular storage pool.
2176
2177 2025-01-03 Bob Duff <[email protected]>
2178
2179 * sem_ch6.adb (Analyze_Expression_Function): Mark the implicit
2180 spec for an expression function as Comes_From_Source.
2181 (Analyze_Null_Procedure): Minor cleanup.
2182 * sem_warn.adb (Source_E1): New function to compute whether
2183 to give warnings. In particular, return True for [in] out
2184 parameters of expression functions.
2185
2186 2025-01-03 Steve Baird <[email protected]>
2187
2188 * exp_aggr.adb (Check_Bounds): Remove calls that were setting the
2189 Analyzed flag to False for two aggregate bound expressions.
2190
2191 2025-01-03 Eric Botcazou <[email protected]>
2192
2193 * einfo.ads (Is_Independent): Document usage on Master_Node objects.
2194 * exp_aggr.adb (In_Place_Assign_OK): Remove Parent_Kind variable.
2195 (Convert_To_Assignments): Call Unconditional_Parent and remove the
2196 restriction on the known size for the in-place expansion of the
2197 aggregate in the context of an object declaration.
2198 (Expand_Array_Aggregate): Remove Parent_Kind variable and call
2199 Unconditional_Parent and Delay_Conditional_Expressions_Between
2200 * exp_ch3.adb: Remove clauses for Exp_Dbug.
2201 (Expand_N_Object_Declaration): Factor out the code rewriting the
2202 declaration as a renaming in Rewrite_Object_Declaration_As_Renaming
2203 and call the procedure.
2204 * exp_ch4.adb (Insert_Conditional_Object_Declaration): Declare.
2205 (Expand_N_Case_Expression): Delay expanding the expression if it is
2206 in the context of an optimizable object declaration. If the parent
2207 node is this object declaration, then replace it with a renaming of
2208 the dereference of an access value designating an object initialized
2209 with the dependent expression chosen by the condition.
2210 (Expand_N_If_Expression): Likewise.
2211 (Insert_Conditional_Object_Declaration): New procedure.
2212 * exp_ch6.adb (Expand_Ctrl_Function_Call): Test the unconditional
2213 parent in the case of an object declaration too.
2214 * exp_ch7.adb (Build_Finalizer.Process_Declarations): Pass Strict to
2215 Processing_Actions from the Is_Independent flag on a Master_Node.
2216 * exp_util.ads (Rewrite_Object_Declaration_As_Renaming): Declare.
2217 * exp_util.adb: Add clauses for Exp_Dbug.
2218 (Rewrite_Object_Declaration_As_Renaming): New procedure extracted
2219 from Expand_N_Object_Declaration.
2220 * sem_ch3.adb (Analyze_Object_Declaration): Also leave the analysis
2221 if the declaration has been replaced with a renaming in the case of
2222 an initialization expression that is a conditional expression.
2223
2224 2025-01-03 Eric Botcazou <[email protected]>
2225
2226 * checks.adb (Apply_Predicate_Check): Preserve Comes_From_Source.
2227 * exp_ch4.adb (Expand_Allocator_Expression): Factor out common code
2228 for the various cases. Also delay applying the 2nd predicate check.
2229 In the default case, defer to Make_Build_In_Place_Call_In_Allocator
2230 entirely in the build-in-place case.
2231 * sem_ch4.adb (Analyze_Allocator): Do not give the warning or error
2232 for a default-initialized allocator with No_Initialization.
2233
2234 2025-01-03 Ronan Desplanques <[email protected]>
2235
2236 * lib-writ.adb (Write_ALI): Remove useless space.
2237
2238 2025-01-03 Ronan Desplanques <[email protected]>
2239
2240 * lib-writ.adb (Write_ALI): Remove condition for writing P line
2241 parameters.
2242 * lib-writ.ads: Fix typos. Clarify comment.
2243
2244 2025-01-02 Jakub Jelinek <[email protected]>
2245
2246 * gnat_ugn.texi: Bump @copying's copyright year.
2247 * gnat_rm.texi: Likewise.
2248
2249
2250 Copyright (C) 2025 Free Software Foundation, Inc.
2251
2252 Copying and distribution of this file, with or without modification,
2253 are permitted in any medium without royalty provided the copyright
2254 notice and this notice are preserved.