Call to Insert_Actions with empty list does nothing, so there is no need to
guard against such calls. Code cleanup; behavior is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* freeze.adb (Freeze_Itype): Remove excessive guard.
* sem_ch5.adb (Analyze_Loop_
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch5.adb (Check_Subtype_Definition): Remove redundant call to
Present; style cleanup.diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/a
Cleanup handling of quantified expressions before using it as an inspiration
for fixing the handling of iterated component associations. Behavior is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch4.adb
(Is_Empty_Range): Move error reporting to the
For iterator specification appearing inside an iterated component
association, we just did ad-hoc, incomplete checks and delayed a proper
analysis until the iterated component association is expanded into loop (and
then reanalyzed).
However, when the iterated component association is not expanded,
This switch can be used to disable the effect of -F when using -n
explicitly or implicitly.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* bindgen.adb (Gen_Elab_Calls): Check for Check_Elaboration_Flags.
* bindusg.adb (Display): Add -k.
* opt.ads (Check_Elab
Iterated component associations are expanded into loops, which GNAT
should detect as violating restriction No_Implicit_Loops; same for
iterated element associations and delta array aggregates.
Part of cleanups for correct handling of iterated component associations
in SPARK.
Tested on x86_64-pc-l
There are heuristics for suppressing warnings about unused objects in
trivial cases. In particular, we try to suppress warnings here:
function F (A : Integer) return Some_Type;
X : Some_Type;
begin
raise Not_Yet_Implemented;
return X;
end F;
But it doesn't work if Some_
Enable mixing of declarative items and statements under
the -gnatX switch. The previous version used the -gnat2022
switch.
In addition, change the error message so that it advertises
the new feature when it is disabled. Instead of:
declarations must come before "begin"
we now say (without -gnatX
Tune names of local entities.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_aggr.adb (Resolve_Iterated_Component_Association): Change
generic name Ent to a more intuitive Scop; rename Remove_Ref to
Remove_Reference, so it can be instantiated as a traver
The comment for Warnings_Off says: "clients should generally not test
this flag directly, but instead use function Has_Warnings_Off".
Primarily a code cleanup, as this only affects minor a corner case.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Validate_U
Extend the previous changes related to Ada.Tags trigerring a
dependency on the secondary stack to various i-c* packages.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* ali.adb (Scan_ALI): Special case i-c*.ali when setting
Sec_Stack_Used.diff --git a/gcc/ada/ali.adb
This reorders the processing in Freeze_Entity_Checks so that building the
predicate functions, which first requires building discriminated checking
functions for record types with a variant part, is done after processing
and checking this variant part.
Tested on x86_64-pc-linux-gnu, committed on t
Code cleanup only; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_aggr.adb (Resolve_Array_Aggregate): Change an inconsistent
use of False into its local equivalent Failure.diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
--- a/gc
The iterated_component_association grammar construct appears in Ada RM
in two syntactic forms: with iterator_specification and with
defining_identifier. This is now properly reflected in the GNAT AST,
while previously we had two defining_identifiers regardless of the
syntactic form.
Cleanup relate
This is mostly stylistic but also adds a couple of missing comments.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-valuer.adb (Scan_Decimal_Digits): Consistently avoid
initializing local variables.
(Scan_Integral_Digits): Likewise.
(Scan_R
Internal type created for the null array aggregate of Ada 2022 was
created as a temporary entity and then flagged as internal, but it is
better to create this type directly as an itype.
In particular, when the null array aggregate appears in a spec
expression, its type declaration will not be atta
No Default_Initial_Condition check should be generated for an object
declaration that has an explicit initial value. Previously this was
implemented by testing the Has_Init_Expression flag, but this only works
if the object declaration was created by the parser (since only the
parser sets that attr
Code cleanup related to fixes for iterated component associations in
GNATprove ; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_aggr.adb
(Resolve_Container_Aggregate): Style cleanup.
(Resolve_Record_Aggregate): Remove redundant g
Despite recent changes to runtime checks for null array aggregates,
GNATprove still struggles with N_Raise_Constraint_Error nodes inserted
into AST by aggregate resolution. The ultimate fix is to move these
checks to expansion (which is disabled in GNATprove mode) and explicitly
emit a proof check
Code cleanup related to itypes for Ada 2022 null array aggregates.
Remove routine that was added in 2011 but is not referenced by
GNATprove since 2015.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.ads (Itype_Has_Declaration): Remove spec.
* sem_util.adb (
Ada.Containers.Vectors has two Append procedures that take an
Element value; one takes a Count parameter and one does not
(the count is implicitly one for the latter). For the former version,
there was code that took a faster path if certain conditions were met
and otherwise took a slower path; one
Code cleanup related to resctrition No_Local_Allocators.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_util.ads (Entry_Names_OK): Remove spec.
* exp_util.adb (Entry_Names_OK): Remove body.diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
--- a/gcc/ada/ex
A null array aggregate of Ada 2022 requires a conditional runtime check
that was inserted as an if-statement. While gigi can handle statements
inserted into a list of declarations, in GNATprove such a statement will
cause a crash. It is better to insert a conditional raise node, which is
properly h
To analyze Ada 2022 null array aggregates we introduced a dedicated
routine and bypassed the code for ordinary array aggregates. However,
the types for the array indexes created by this dedicated routine
differed from the types created for ordinary array aggregates, i.e.
itypes for null array aggre
Handling of aspect Iterable was lacking guards against illegal code, so
the compiler either crashed or emitted cryptic errors while expanding
loops that rely on this aspect.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/implementation_defined_aspects.rst
Spec units for verification of the GNAT standard library with GNATprove
must be listed as part of the libgnat package, as otherwise libadalang
will complain about missing dependencies.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* Makefile.rtl (GNATRTL_NONTASKING_OBJS): In
This provides correct rounding in the IEEE 754 sense for the Value attribute
of floating-point types in more cases, by bumping the number of significant
bits used in the initial integer mantissa obtained from parsing.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s
Error message about illegal aspect Relaxed_Initialization was lacking a
whitespace character.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Analyze_Aspect_Relaxed_Initialization): Fix error
template.diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13
For an object X of a composite type, the attribute X'Valid_Scalars should
return False if and only if there exists at least one invalid scalar
subcomponent of X. The validity test for a scalar part may include a
range test. In some cases involving a private type that is implemented as
a signed inte
The compiler would fail with an internal error in some cases involving
a discriminated record type that provides a discriminant-dependent index
constraint for the subtype of a component of an access-to-array type when a
dereference of that component of some object is mentioned in a pre- or
postcond
This provides correct rounding in the IEEE 754 sense for the Value attribute
of floating-point types in more cases, by switching from tables of powers of
10 to tables of powers of 5 for precomputed values, thus making it possible
to use a single divide for denormals and normalized numbers just abov
There are 2 main issues in the postcondition of the function Replace
of the formal ordered sets, in the sub package Generic_Keys. One is
related to the fact that when the element is changed, the key is
also changed. The second one is due to the fact that the arrival of
the new element might modify
INOX (which is enabled via -gnatX) supports composite case-statement selectors.
As a temporary measure, simplify the coverage-related compile-time checks
for such case statements via two changes: an others choice is always
required for such a case statement, and no legality checks relating to
overl
In some cases, the compiler builds a subtype entity Typ such that
Is_Scalar (Typ) is True and Is_Scalar (Base_Type (Typ)) is False.
This comes up in some cases involving a subtype of a private type,
where the full view of the private type is a scalar type. In such a
situation, it may also be the ca
INOX (which is enabled via -gnatX) supports composite case-statement selectors.
As a temporary measure, simplify the coverage-related compile-time checks
for such case statements via two changes: an others choice is always
required for such a case statement, and no legality checks relating to
overl
This patch fixes a bug where finalization code might refer to variables
outside their lifetime. The previous version moved declarations into the
Handled_Statement_Sequence (HSS), so that the "at end" handler of the
HSS could handle exceptions raised by those declarations. The
First_Real_Statement f
Fix glitch in a cross-reference in comment.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* inline.adb (Replace_Formal): Fix name of the referenced routine.diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb
--- a/gcc/ada/inline.adb
+++ b/gcc/ada/inline.adb
@@ -4699,8 +4699
In some cases involving null slices, the Slice subprograms (both the
function and the procedure) in each of the three Generic_Bounded_Length
generic packages (for String, Wide_String, and Wide_Wide_String)
could raise Constraint_Error in cases where this is incorrect.
Tested on x86_64-pc-lin
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Old]):
Remove unnecessary local constant that was shadowing another
constant with the same initial value.diff --git a/
This patch enforces matching of extra formals in overridden subprograms,
subprogram renamings, and subprograms to which attributes 'Access,
'Unchecked_Access, or 'Unrestricted_Access is applied (for these access
cases the subprogram is checked against its corresponding subprogram
type).
Tested on
The introduction of the Alignment parameter for the secondary stack
allocator in previous change was missing the corresponding change in the
Build_Allocate_Deallocate_Proc when creating the formal parameters list.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_util.adb
This patch modifies the marking of nested subprograms requiring static links,
so that the changes made to "At end" procedures get handled properly.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_unst.adb
(Visit_Node): Add N_Block_Statement to the enclosing const
Ada RM A.18.9 includes a specification of the Aggregate aspect for the type
Ada.Containers.Ordered_Sets. That aspect specification was deliberately
commented out in a-coorse.ads at one time, but that workaround is no longer
needed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
Do not select a lock free implementation if Targparm.Support_Atomic_Primitives
is False (which indicates that the target cannot support it).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch9.adb
(Allows_Lock_Free_Implementation): Return False if
Support
Correct incorrect text and clarify unclear text that has been identified
in the "Validity Checking" section of the GNAT UG.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_ugn/building_executable_programs_with_gnat.rst:
Improve -gnatVa, -gnatVc, -gnatVd, -gn
In the past, the Lock_Free aspect of a protected type (including an
anonymous type) defaulted to False. In the case where an explicit
"Lock_Free => True" aspect specification would be legal, the aspect now
defaults to True (which means that a lock-free implementation is used to
implement the type's
When instantiating a body to inline (either because frontend inlining is
enabled with switch -gnatN or because of inlining-for-proof in GNATprove
mode) we rewrite occurrences of formal parameters into the corresponding
actual parameters. Then we switch type views, so that if the formal had
a full v
Pointer types aren't named types in C so we need to take extra care in Ada
to make sure that the name of access types is preserved.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/utils.cc (gnat_pushdecl): Preserve named
TYPE_DECLs consistently for all
The End_Label is not defined for body nodes so a small tweak is needed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/trans.cc (At_End_Proc_to_gnu): Use the End_Label of
the child Handled_Statement_Sequence for body nodes.
(set_end_locus_from_
The first renaming uses the type of the full view of the constant but not
the second, which introduces problematic view conversions downstream.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/trans.cc (Full_View_Of_Private_Constant): New
function return
This reverts commit 51abc0cc8691daecd7cec8372e4988e9f3f1913c.
Tested on x86_64-pc-linux-gnu, committed on trunk
patch.diff.gz
Description: application/gzip
This patch makes various minor cleanup changes to the parser.
No change in behavior.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* par-tchk.adb, par-util.adb, prep.adb, prepcomp.adb, scng.adb:
Use "in" instead of chains of "=" connected with "or else".
Like
The current configuration of the x86-64 VxWorks runtimes does not support
atomic primitives. x86-64 VxWorks was missed from the previous patch.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/system-vxworks7-x86_64-kernel.ads: Set
Support_Atomic_Primitives to
Make sure warnings about wrong-length aggregates don't get
suppressed. Such a warning (in a with-ed unit) can be the only
explanation for an error about No_Elaboration_Code violations.
Avoid passing a bogus "#" to Error_Msg. We really should never
construct message templates by concatenating strin
The current configuration of the QNX and VxWorks runtimes does not support
atomic primitives.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/system-qnx-arm.ads: Set Support_Atomic_Primitives to
false.
* libgnat/system-vxworks7-aarch64.ads: Ditto.
The draft ACATS test (which we developed) for the Ada 2022 feature of
user-defined literals has compile-time problems that are fixed with this
set of changes. Two of these involve the resolution of named numbers
in the context where an implicit literal conversion can occur, and for
equality when a
Remove a comment about the former use of the -gnatd9 switch (that switch is
now unused).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* debug.adb: remove a comment.diff --git a/gcc/ada/debug.adb b/gcc/ada/debug.adb
--- a/gcc/ada/debug.adb
+++ b/gcc/ada/debug.adb
@@ -1089,9
This patch modifies the expansion of contracts such that the statements
and declarations of a subprogram with post-execution checks get moved to
a local internally generated subprogram which the original subprogram
calls directly followed by the required post-execution checks.
This differs from th
Allow the Lock_Free aspect of a protected type to be True (but only by
explicit specification) if Ceiling_Locking locking policy has been specified.
Clarify that the Lock_Free aspect takes precedence over the Ceiling_Locking
policy in that case.
Tested on x86_64-pc-linux-gnu, committed on trunk
g
Check for the case where a user writes "in" instead of "of" in an
aggregate like "[for E in Some_Array when Some_Filter (E) => E]".
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_aggr.adb
(Resolve_Array_Aggregate): Generate an appropriate error message
i
This occurs because protected subprograms are not translated directly into
object code but first rewritten as a pair of subprograms by the front-end.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch9.adb (Build_Protected_Spec): Tidy up and propagate the
Comes_F
Branch is determined as dead following a test always False by
CodePeer analysis, which is incorrect. Justify this false alarm
with an appropriate pragma Annotate.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-imagei.adb (Image_Integer): Add justification.diff --g
The -gnatX switch enables naming a prefixed view of a subprogram with an
untagged prefix. Compiling such a reference where the prefix is of a modular
type could result in an internal compiler error.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch4.adb
(Analyze
Prevent the compiler from failing with an internal error in some cases involving
an instance of a generic which takes as a formal parameter an instance of a
second generic, where the second generic has an Initial_Condition aspect
specification.
Tested on x86_64-pc-linux-gnu, committed on trunk
gc
SPARK does not allow code insertions. This applies also to
calls to Asm intrinsics defined in System.Machine_Code.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-maccod.ads: Mark package as SPARK_Mode Off.diff --git a/gcc/ada/libgnat/s-maccod.ads b/gcc/ada/libgnat
The list of junk entity names for which warnings are suppressed has been
recently modified, so update the documentation accordingly.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/implementation_defined_pragmas.rst
(Pragma Unreferenced): Sync description
The pass would traverse generic subprogram bodies, which are not expanded,
thus stumbling on unexpected nodes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_unst.adb (Unnest_Subprograms.Search_Subprograms): Skip the
subprogram bodies that are not to be unnested
This patch removes documentation on the SPARK containers,
now under the spark2014 repository.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/the_gnat_library.rst: Remove paragraphs about SPARK
containers.
* gnat_rm.texi, gnat_ugn.texi: Regenerate
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Get_SPARK_Mode_Type): Fix header box; replace
chained IF with a CASE statement.diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
--- a/gcc/ada/sem_prag.adb
+++
On the host-side, the binder now generates CUDA_Execute pragmas to
invoke initialization and finalization on the device-side. The
front end's expansion of these pragmas includes references to
entities declared in package CUDA.Internal. Generate a with-clause so
that unit will be available.
Tested
Prefix of attribute Old is captured either as an object renaming or as
an object declaration. This is now taken into account when applying
validity checks.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Old]):
Ad
In the case of a function, the new expansion of contracts makes use of an
extended return statement to store the result of the function in the return
object while the post-conditions are evaluated.
Unfortunately GNAT does not elide the copy of the return object for extended
return statements for t
Use switches (one already existing, one newly added here) to indicate to
the binder that CUDA support code is to be generated for either the
host side or for the device side. Add an invocation of Adainit on the
device side from Adainit on the host side; similarly for Adafinal.
Tested on x86_64-pc-
This patch corrects a problem in the compiler whereby the determination of
scope levels during the generation of accessibility checks for function calls
within range constraints leads to a compiler crash due to the type not being
fully analyzed at the point in which its scope depth must be obtained
The switch enables the front-end unnesting pass.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/decl.cc (gnat_to_gnu_entity): Relax assertion when
front-end unnesting is enabled.diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
Attribute Valid_Scalars applied to prefix with an unchecked union
component causes a legitimate crash in the backend. It was already
rejected in the frontend for prefixes of a public type; now it is
rejected in the frontend regardless of the type privacy.
Tested on x86_64-pc-linux-gnu, committed o
An explicit value of Auto is now accepted for a configuration pragma
SPARK_Mode, as a way to exempt a unit from complete adherence to
SPARK rules when using a global configuration pragma file where
SPARK_Mode=>On is specified.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
*
For error messages with inserted names that include acronyms like SPARK
or CPP, we want to preserve the casing. The list of special-cased named
is currently the same as in gnatpp.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* erroutc.adb (Set_Msg_Insertion_Name): Special-c
The Make-lang.in was missing the link serialization support.
PR rust/108113
gcc/rust
* Make-lang.in (rust.serial): New variable.
(rust1$(exeext)): Depend on $(rust.prev). Call LINK_PROGRESS.
Signed-off-by: Marc Poulhiès
---
Already reviewed and ACKed by Jakub: https://gi
From: Eric Botcazou
The support of the Default_Component_Value aspect on derived constrained
array types is broken because of a couple of issues: 1) the derived types
incorrectly inherit the initialization procedure of the ancestor types
and 2) the propagation of the aspect does not work for cons
From: Javier Miranda
gcc/ada/
* ghost.adb (Is_OK_Declaration): A reference to a Ghost entity may
appear within the class-wide precondition of a helper subprogram.
This context is treated as suitable because it was already
verified when we were analyzing the origin
From: Eric Botcazou
The current code has relied on Original_Node to detect rewritten function
calls in object declarations but that's not robust enough in the presence
of function calls written in object notation.
gcc/ada/
* exp_util.ads (Is_Captured_Function_Call): Declare.
* e
The frontend currently relies on gigi to use efficient assignment in
particular cases like:
Some_Var.all := (others => (others => 0));
gigi would use memset to clear memory pointed to by Some_Var.
In the case of an access with a Designated_Storage_Model aspect with a Copy_To
procedure, memset
From: Bob Duff
Make Small_Integer_Type_For call Integer_Type_For,
so they share most of the code.
Remove Standard_Long_Integer from consideration,
because that's different on different machines (32- or 64-bit).
Standard_Integer or Standard_Long_Long_Integer will be
chosen.
gcc/ada/
* e
From: Ronan Desplanques
Before this patch, GNAT.Formatted_String.Formatted_String failed to
handle format strings with two or more specifiers whose widths were
specified with the "*" syntax. This patch makes the parser
correctly reset its bits of state related to width and precision
parsing when
From: Eric Botcazou
The predicate implements the rules of the language so it needs to cope with
constructs rewritten by the expander, in particular explicit dereferences
that the expander uses liberally for various purposes.
This change makes the detection of rewritten calls more robust and adds
From: Eric Botcazou
Such functions use neither Ada 2005's build-in-place mechanism nor Ada 95's
return-by-reference mechanism, but instead the common calling convention of
functions returning a nonlimited by-reference type.
gcc/ada/
* exp_ch6.adb (Is_Build_In_Place_Function): Adjust com
From: Joel Brobecker
The wording of the introduction paragraph specified an incomplete
list of OSes. Rather than trying to update the list, this commit
changes the text to make it more general. For those parts of
this chapter which only apply to specific OSes, the documentation
is written in a wa
From: Ghjuvan Lacambre
This commit fixes a small bug where GNAT would emit unescaped quotes in
its -fdiagnostics-format=json output when using -gnatdJ and emitting
messages about operator functions (e.g. "=").
gcc/ada/
* errout.adb (Write_JSON_Span): Escape subprogram name.
Tested on x
From: Eric Botcazou
Various parts of the expander and the code generator must have a consistent
view on which temporaries generated for return statements must be finalized
because they are regular temporaries, and which ones must not be since they
are allocated on the return stack directly. The
From: Eric Botcazou
The predicate implements the rules of the language so it needs to cope with
constructs rewritten by the expander, in particular explicit dereferences
that the expander uses liberally for various purposes.
This change makes the detection of rewritten calls more robust, pluggin
From: Ronan Desplanques
Before this patch, passing a width and a precision through
arguments with the "*" syntax always failed for real values in
GNAT.Formatted_String's routines.
gcc/ada/
* libgnat/g-forstr.adb (P_Flt_Format): Add "*" syntax handling.
Tested on x86_64-pc-linux-gnu, co
From: Eric Botcazou
This goes back to the original implementation but keeps the special size
test with universal_integer to cope with its limited range.
gcc/ada/
* sem_res.adb (Resolve_Membership_Op): Adjust again latest change.
Tested on x86_64-pc-linux-gnu, committed on master.
---
From: Ronan Desplanques
Before this patch, format strings ending with "%%" (two consecutive
percent signs) caused GNAT.Formatted_String."-" to give the wrong
output, and cause the various GNAT.Formatted_String."&" to raise
exceptions with misleading error messages.
Also before this patch, a bug
From: Ghjuvan Lacambre
Before this commit, when GNAT needed to emit lines longer than
the buffer, it accidentally inserted a newline in its output when
attempting to flush its buffer.
We fix this by using Flush_Buffer instead of Write_Eol in Write_Char.
gcc/ada/
* output.adb (Write_Buf
From: Bob Duff
This patch fixes a bug in which a reference to a renaming of a
component of a packed array was not counted as a reference,
and thus caused incorrect warnings about unreferenced objects.
gcc/ada/
* sem_ch5.adb (Analyze_Assignment): Fix the bug by checking
Original_
From: Eric Botcazou
The first issue pertains to return objects of (class-wide) interface types,
which need to be adjusted if the type is not inherently limited. The second
issue is for return objects of non-class-wide types that are initialized by
a function call, which can use a direct renaming
From: Justin Squirek
This patch corrects an issue in the compiler whereby unprefixed discriminants
appearing in protected subprograms were unable to be properly resolved -
leading to spurious resolution errors.
gcc/ada/
* sem_ch8.adb (Set_Entity_Or_Discriminal): Verify we are actually
From: Ronan Desplanques
The way the "%g" specifier was handled by GNAT.Formatted_String
before this patch was very different from the behavior of C's printf.
This patch makes the handling of "%g" in GNAT.Formatted_String closer
to the behavior described in the specification of the C language.
gc
From: Bob Duff
The -gnatw_q switch turns on warnings for noncomposing "="
operators. This patch updates the doc to refer to relevant
RM paragraphs.
gcc/ada/
* doc/gnat_ugn/building_executable_programs_with_gnat.rst:
Add RM references.
* gnat_ugn.texi: Regenerate.
Tested
501 - 600 of 823 matches
Mail list logo