Avoid improperly suppressing checks for the wrapper subprogram that is
built when a null type extension inherits (and does not override) a
function with a controlling result. This is a follow-up to other changes
already made on this ticket.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ad
Some features haven't got customer feedback or made upstream yet.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_rm/security_hardening_features.rst: Note that hardening
features are experimental.
* gnat_rm.texi: Regenerate.diff --git a/gcc/ada/doc/g
The initial work didn't change anything for limited types because they use
a specific return mechanism for functions called build-in-place where there
is no anonymous return object, so the secondary stack was used only for the
sake of consistency with the nonlimited case.
This change aligns the li
When analyzing an array or record type declaration whose component has a
constrained access type, e.g.:
type Buffer_Acc is not null access all String;
type Buffer_Rec is record
Data : Buffer_Acc (1 .. 10);
end record;
type Buffer_Arr is array (Boolean) of Buffer_Acc (1 .. 10);
The combination of pragma/aspect Inline_Always and -gnateV -gnata runs
afoul of the handling of inlining across units by gigi, which does not
inline a subprogram that calls nested subprograms if these subprograms
are not themselves inlined.
This condition does not apply to internally generated sub
This commit makes GNAT use absolute paths in -fdiagnostics-format=json's
output when -gnatef is present on the command line. This makes life
easier for tools that ingest GNAT's output.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* doc/gnat_ugn/building_executable_programs_
Bump the pc +3 total for Thumb mode, the same calculation that as is
done for arm-linux.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* init.c (__gnat_adjust_context_for_raise) [QNX][__thumb2__]: Bump
the pc an extra byte.diff --git a/gcc/ada/init.c b/gcc/ada/init.c
When subtype predicate checks are added for object declarations, it
could lead to a compiler crash or to an incorrect check.
When the subtype for the object being declared is built later by
Analyze_Object_Declaration, the predicate check can't be applied on the
object instead of a copy as the call
Correction of a typo regarding indexes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-cfdlli.adb ("="): Make the function properly loop
over the right list.diff --git a/gcc/ada/libgnat/a-cfdlli.adb b/gcc/ada/libgnat/a-cfdlli.adb
--- a/gcc/ada/libgnat/a-cf
This fixes a small oddity whereby a subprogram body declared without a spec
would be frozen before its entity is fully processed as an overloaded name.
Now the latter step computes useful information, for example whether the
body is a (late) primitive of a tagged type, which can be required during
This pragma was wrongly not recognized as an assertion pragma. Now
fixed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.ads (Assertion_Expression_Pragmas): Fix value for
pragma Subprogram_Variant.diff --git a/gcc/ada/sem_prag.ads b/gcc/ada/sem_prag.ads
--
The Returns_On_Secondary_Stack predicate is a misnomer because it must be
invoked on a type and types do not return; as a matter of fact, the other
Returns_XXX predicates apply to functions.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb (Caller_Known_Size): Inv
On illegal code like:
type T is new Positive in range 1..5;
the compiler was emitting message:
error: extra "in"ignored
^^
which lacked a space character.
A tiny diagnostic improvement; spotted while mistakenly typing an
illegal test.
Tested on x86_64-pc-linux-gnu, comm
Systemitize Word_Size and Memory_Size declarations rather than hard code
with numerical values or OS specific Long_Integer size.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/system-qnx-arm.ads (Memory_Size): Compute based on
Word_Size.diff --git a/gcc/ada/
Systemitize Word_Size and Memory_Size declarations rather than hard code
with numerical values or OS specific Long_Integer size.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/system-vxworks7-aarch64.ads (Word_Size): Compute
based on Standard'Word_Size. (Mem
Volatile variables marked with the No_Caching aspect can now have
confirming aspects for other volatile properties, with a value of
False.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* contracts.adb (Check_Type_Or_Object_External_Properties): Check
the validity of
This patch adds Global contracts and preconditions to subprograms of
Interfaces.C.Strings. Effects on allocated memory are modelled
through an abstract state, C_Memory. The preconditions protect against
Dereference_Error, but not Storage_Error (which is not handled by
SPARK). This patch also disabl
This patch adds SPARK annotations to subprograms from
System.Address_To_Access_Conversions. To_Pointer is considered to have
no global items, if the returned value has no aliases. To_Address is
forbidden in SPARK because addresses are not handled.
Tested on x86_64-pc-linux-gnu, committed on trunk
We need to use Extended_Index for the Position parameter of the Element
function in formal vectors so it is compatible with other primitives of
the Iterable aspect.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-cfinve.ads (Element): Change the type of the
This patch corrects an error in the compiler whereby gnatbind may crash
during calculation of file checksums in certain corner cases due to
uninitialized lookup tables.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gnatbind.adb (Gnatbind): Add initialize call for Uintp
Systemitize Word_Size and Memory_Size declarations rather than hard code
with numerical values or OS specific Long_Integer size.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/system-vxworks7-aarch64-rtp-smp.ads (Word_Size):
Compute based on Standard'Word_Si
Systemitize Word_Size and Memory_Size declarations rather than hard code
with numerical values or OS specific Long_Integer size.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/system-linux-arm.ads (Memory_Size): Compute based on
Word_Size.diff --git a/gcc/ad
The two flags apply to base types only like Has_Own_Invariants.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Propagate_DIC_Attributes): Add ??? comment.
(Propagate_Invariant_Attributes): Likewise. Propagate the
Has_Inheritable_Invariants and
This patch adds preconditions to Update procedures, to protect from
Update_Error propagations.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/i-cstrin.ads (Update): Add precondition.diff --git a/gcc/ada/libgnat/i-cstrin.ads b/gcc/ada/libgnat/i-cstrin.ads
--- a/gcc/a
References to ghost entities should only occur in ghost context. This
was not checked systematically on all references.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch2.adb (Analyze_Identifier): Add checking for ghost
context.
* sem_ch5.adb (Analyze_I
Preconditions of Update procedures were always true when Offset was 0.
The changes enable to protect from Update_Error when Offset is 0.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/i-cstrin.ads (Update): Update precondition.diff --git a/gcc/ada/libgnat/i-cstrin.a
Testing Is_Frozen is not robust enough, so instead test that the full view
has been seen and that the Has_Completion flag is set on it.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* freeze.adb (Check_Expression_Function.Find_Constant): Make test
for deferred consta
Document that dynamic tables are defined aliased for backward
compatibility.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/g-dyntab.ads (Table_Type): Update documentation.diff --git a/gcc/ada/libgnat/g-dyntab.ads b/gcc/ada/libgnat/g-dyntab.ads
--- a/gcc/ada/libgnat
This feature is an architecture feature, not an OS feature, so enable
on vx7r2 for arm and aarch64 to coincide with what is done on similarly
capable targets.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/system-vxworks7-arm.ads (Support_Atomic_Primitives):
The static dispatch tables of library-level tagged types are either built
on the first object declaration or at the end of the declarative part of
the package spec or body. There is no real need for the former case, and
the tables are not built for other constructs that freeze (tagged) types.
Ther
This avoids making Expand_Interface_Thunk visible from the outside.
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb (Freeze_Subprogram.Register_Predefined_DT_Entry): Move
procedure to...
* exp_disp.ads (Expand_Interface_Thu
After the recent fix for detecting illegal use of ghost entities in
code, spurious errors could be raised on generic code with ghost, due to
wrong setting of the ghost flags on copied entities from the generic to
the instantiation.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
Inline_Always procedures should be kept public for proper inter unit
inlining.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch7.adb (Set_Referencer_Of_Non_Subprograms): New local
procedure, used for code refactoring. Also take into account
Inline_Alway
This commit adds information allowing identification of the subprogram
surrounding the message emitted by gnat when using -gnatdJ along with
-fdiagnostics-format=json.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* errout.adb (Write_JSON_Span): Add subprogram name to emitte
Function pointers must always be built with '[Unrestricted_]Access.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Init_Secondary_Tags.Initialize_Tag): Initialize the
Offset_Func component by means of 'Unrestricted_Access.diff --git a/gcc/ada/exp_ch3.ad
GNATprove changed the name of the pragma Annotate used to verify that
a subprogram always returns normally. It is now called Always_Return
instead of Terminating.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-aridou.adb: Use Always_Return instead of Terminating
Before this patch, the Functional Sets ans Maps were bounded both from
the user and the implementation points of view. To make them closer to
mathematical Sets ans Maps, this patch removes the bounds from the
contracts. Note that, in practice, they are still bounded by
Count_Type'Last, even if the
Local_Entity_Suppress and Global_Entity_Suppress variables referencing
tables were refactored to Local_Suppress_Stack_Top and
Global_Suppress_Stack_Top stacks back in 2007. Fix remaining references
to these variables.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo.ad
When iterating over list elements with First/Next there is no need to
check if the list is present, because First intentionally returns Empty
if list is not present and the condition of subsequent loop will not be
satisfied.
Code cleanup; semantics is unaffected.
Occurrences of the redundant patt
This eliminates the use of the secondary stack to return specific tagged
types from functions in calls that are not dispatching on result, which
comprises returning controlled types, by introducing thunks whose only
purpose is to move the result from the primary to the secondary stack
for primitive
Thunks are only referenced locally by dispatch tables and never inlined.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Clear the Is_Public
flag on thunks.diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
--- a/gcc/
The -gnatzr switch triggers the creation of distribution stubs for use
by the implementation of PolyORB. Now these stubs declare tagged types
and are generated at the very end of the analysis of compilation units,
after the static dispatch tables have been built, so these tables are
missing for th
No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/decl.cc (gnat_to_gnu_entity): Do not check the
scope of anonymous access Itypes.
* gcc-interface/trans.cc (Identifier_to_gnu): Do not translate
the return type of a s
This setting isn't useful in this context.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/Makefile.in (gnatlib-shared-default): Add
-fno-lto.diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
--- a/gcc/ada/gcc-interface/
This allows tools ingesting GNAT's output to properly classify these
messages.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gcc-interface/decl.cc (warn_on_field_placement): Add insertion
character '.q' to warning string.diff --git a/gcc/ada/gcc-interface/decl.cc b
To simplify the bootstrap constraints, duplicate a few definitions in
order to remove dependencies on a recent version of System.Case_Util,
System.Crtl, System.OS_Lib.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* osint.adb (File_Names_Equal): Declare To_Lower locally.
This system unit is instanciated with values of Single_Size either 32
or 64 currently. A lemma was only valid for value of 32, which became
visible when proving the instance with value of 64.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-aridou.adb (Lemma_Word_Co
Updated base requirement on GNAT version and the fact that stage1 of the
bootstrap now uses the base compiler's libgnat allows for more Ada
features in the runtime and makes these pragma obsolete.
Added comments in files that are still built during stage1 and that need
to be modified with care now
Constant names of Big2xx32, Big2xx63 and Big2xx64 were misleading, as
SIngle_Size and Double_Size need not be 32 and 64. Replace by names that
don't refer to an explicit size.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-aridou.adb: Apply replacement.
patch.dif
Support for external axiomatization in GNATprove has been deconstructed
few years ago, so the related frontend code can be deconstructed too.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wrapper):
Remove unrefer
This patch is minor cleanup. The Renamed_Entity and Alias synthesized
attributes are of type Entity_Id. No change in behavior.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo-utils.ads, einfo-utils.adb (Renamed_Entity Alias):
Change Node_Id to Entity_Id.diff -
When creating wrappers for dispatching functions with controlling
results, we first created the wrapper spec. Then we created a shallow
copy of its specification for the wrapper body using New_Copy_Tree.
However, formal parameters in spec and body must have distinct entities
and New_Copy_Tree does
Cleanup related to expansion of dispatching wrappers for GNATprove,
which just like instantiation involves copying of a specification from
an existing subprogram.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch12.adb (Instantiate_Formal_Subprogram): Remove redundant
This proves the generic unit System.Exponn instanciated for Integer,
Long_Long_Integer and Long_Long_Long_Integer. In order to be able to add
a suitable contract to the generic function, it is changed into a
generic package which contains the function. Instantiations are adapted.
GNATprove is call
Yet another cleanup related to expansion of dispatching primitives for
GNATprove. To keep this change semantically neutral, one parameter is
added to the Copy_Subprogram_Spec utility routine.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Make_Null_Procedure_Sp
Get_Current_Value_Condition should never return Val = Var, because that
could cause infinite recursion in Known_Null.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_util.ads (Get_Current_Value_Condition): Belt: Add a
postcondition that Val /= Var.
* sem_
Introduce expression functions to make the contract of Scan_Exponent
more readable. They can be reused in the contracts of scan functions for
scalar types.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-valuti.ads (Starts_As_Exponent_Format_Ghost): Ghost
f
List iteration with First/Present/Next is safe even for No_List. This
safety is intentional and we rely on it in many places.
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_disp.adb (Gen_Parameters_Profile): Remove redundant guard
This proves the generic unit System.Expont instantiated for Integer,
Long_Long_Integer and Long_Long_Long_Integer. The proof is similar to
the one done for the same units with checks off. In this case too, the
generic function is changed into a generic package.
GNATprove is called with switch --le
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (String_From_Numeric_Literal): Simplify using
membership tests and ranges; fix whitespace.diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
--- a/gcc/ada/sem_ut
Similar to the contracts added for the 32bits and 64bits versions, add
corresponding contracts for the 128bits version. Proof is currently too
difficult for this instance of generic System.Arith_Double, as even with
a huge prover timeout of 15 minutes, 2 checks remain unproved.
Tested on x86_64-pc
We should build subtype for discriminated types in several situations
where we know a priori that we never need to allocate the max possible
size.
To factorize these conditions between `Analyze_Component_Declaration`
and `Analyze_Object_Declaration`, the function `Should_Build_Subtypes`
is introdu
Code cleanup related to expansion of dispatching routines for GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Make_Eq_Body, Make_Neq_Body,
Make_Predefined_Primitive_Eq_Spec,
Make_Predefined_Primitive_Specs): Fix whitespace.diff --git a
Whitespace cleanup related to cleanup of creating copies of subprogram
specifications, which was needed for expanding dispatching wrappers for
GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_aggr.adb (Two_Pass_Aggregate_Expansion): Fix whitespace.
* li
Whitespace cleanup; wrong layout found with grep.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Expand_N_Op_Ne): Fix whitespace.
* sem_dim.adb (Expand_Put_Call_With_Symbol): Likewise.
(Reduce): Likewise.diff --git a/gcc/ada/exp_ch4.adb b/gcc/ad
Code cleanup related to expansion of dispatching routines for GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_attr.adb (Build_Array_VS_Func): Remove explicit "IN" in
spec of the generated array validation function; it was
redundant, just like i
Remove extra whitespace spotted while doing other cleanups related to
expansion of dispatching routines for GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Build_Dcheck_Function): Remove extra whitespace.
* libgnarl/s-taskin.adb (Initialize_AT
These units are not required anymore as oldest compiler version allowed
for bootstrap does not need them.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-sopco3.ads, libgnat/s-sopco3.adb: Remove.
* libgnat/s-sopco4.ads, libgnat/s-sopco4.adb: Remove.
This patch fixes a bug where if a parent library package contains a with
clause that mentions a child of that same parent package, then gnat can
crash if the parent package is compiled with the -gnatR2 switch.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* repinfo.adb (List
Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gnatls.adb (Gnatls): Use Name_Find function.
* targparm.adb (Get_Target_Parameters): Likewise.diff --git a/gcc/ada/gnatls.adb b/gcc/ada/gnatls.adb
--- a/gcc/ada/gnatls.adb
+++ b/gc
Adding a single character to name buffer should be (marginally) more
efficient with Add_Char_To_Name_Buffer and not Add_Str_To_Name_Buffer.
Even if not more efficient, it should be still more readable.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_dbug.adb, sem_dim.adb
Enable expansion of wrappers for dispatching functions with controlling
results in GNATprove mode. Without those wrappers the AST for calls to
dispatching functions on parent and child objects is exactly the same
and the GNATprove backend can't determine what function is actually
called.
Tested on
GNATprove prefers various internally generated functions to be
expression functions, because then it will use the expression itself as
an implicit postcondition. The same applies to wrappers for dispatching
functions with controlling results.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/
Cleanup originating from enabling expansion of dispatching wrappers for
GNATprove; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Adjust_External_Name_Case): Use membership test.diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
INOX allows casing on composite values. In some cases of bindings for
subcomponents, the compiler introduced copying which led to compiler
failures associated with finalizing those copies. In such cases a bound
object now provides a constant view of the appropriate subcomponent of
the selector obje
This proves the generic unit System.Exponu instantiated for Unsigned,
Long_Long_Unsigned and Long_Long_Long_Unsigned. The proof is simpler
than the one for signed integers, as there are no possible overflows
here.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-exp
This proof combines the difficulties of proving signed exponentiation,
as we need to compare the result to the mathematical one using big
integers, with pervasive use of modulo operation. This requires
lemmas which should later be isolated in a shared library, for possible
reuse in other runtime un
For pretty-printing of GNAT AST we had a custom hash table which stored
visited nodes. Now this custom hash table is replaced with an instance
of GNAT.Dynamic_Tables.Dynamic_Hash_Tables. Expansion and compression
factors for this table are the same as for all other instances of
Dynamic_Hash_Tables
Code cleanup; behaviour is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* treepr.adb (Visit_Node): Simplify repeated call to
Next_Entity.diff --git a/gcc/ada/treepr.adb b/gcc/ada/treepr.adb
--- a/gcc/ada/treepr.adb
+++ b/gcc/ada/treepr.adb
@@ -2305,8 +23
The compiler may crash processing a class-wide pre/postcondition
that has dispatching calls using the Object.Operation notation.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* contracts.adb (Restore_Original_Selected_Component): New
subprogram that traverses a prean
Analysis of loop variant is known to lead to false alarms with CodePeer.
Add pragma Annotate in such a case which can be justified.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-exponu.adb (Exponu): Add annotation.diff --git a/gcc/ada/libgnat/s-exponu.adb b/gcc/a
This patch removes various technical debt in the form of "???" comments
throughout the GNAT sources.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb (Add_Simple_Call_By_Copy_Code): Add comments
regarding special handling of components which depend on
Procedure Destroy is intentionally doing nothing and needs an IN OUT
parameter, because to match the profile of a generic formal subprogram.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* treepr.adb (Destroy): Prevent spurious check from CodePeer.diff --git a/gcc/ada/treepr
The front-end defines an Any_Access entity which is only used as the type
of the literal null. Now, since AI95-0230, the RM 4.2(8/2) clause reads:
"An integer literal is of type universal_integer. A real literal is of type
universal_real. The literal null is of type universal_access." and e.g.
Fin
In package Stringt we already have a Null_String_Id, which represents a
null string with length zero. There is no need to duplicate it in other
packages.
Cleanup originating from enabling expansion of dispatching wrappers for
GNATprove; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, comm
This patch implements the No_Tagged_Type_Registration restriction,
analogous to No_Exception_Registration, but for tagged types.
Fix several violations of the RTE_Available protocol, as documented in
rtsfind.ads:
-- If we call this and it returns True, we should generate a reference to
--
This patch fixes an issue in the compiler whereby it fails to recognize
the presence of a current instance of an incomplete type when the
instance is used within a default expression for a record component.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Build_A
Given a discriminated type T1 with discriminant D1 having a component C1
of another discriminated type T2 with discriminant D2 and a propagated
discriminant constraint (that is, "C1 : T2 (D2 => D1);" and, for
example, a parameter of type T1, the compiler will sometimes build an
anonymous subtype to
The previous fix introduced a not-yet-understood regression in compiling
CodePeer. For now, we attempt a quick workaround for the problem.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Build_Discriminant_Reference): In the unexpected
case where we pre
This gets rid of a spurious error given by the compiler on the instantiation
of a generic package, when the instance happens to be an homonym of one of
the subpackages of Text_IO (Fixed_IO, Float_IO, etc) and when it is placed
in a context where Text_IO itself is also visible.
Tested on x86_64-pc-
Cleanup related to handling of -gnatwE (warnings-as-errors) in instances
of generic units.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* checks.adb (Null_Exclusion_Static_Checks,
Selected_Range_Checks): Fix style.diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
When resolving a string literal we examine each character against low
and high bounds of the expected type. We stored each character as an Int
and implicitly converted it to Uint twice: for "<" and ">" operators.
Now we store convert it to Uint explicitly and only once.
Cleanup related to handling
Code cleanup; semantics is unaffacted.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_res.adb (Resolve_String_Literal): Simplify pointer
arithmetic.diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
--- a/gcc/ada/sem_res.adb
+++ b/gcc/ada/sem_res.adb
@@ -117
Cleanup related to handling of messages for compile-time known
constraint errors.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* errout.adb (Error_Msg_Internal): Reorder words.
* erroutc.ads (Is_Warning_Msg): Add closing paren.
* sem_util.adb (Compile_Time_C
Cleanup related to handling of -gnatwE (warnings-as-errors) in instances
of generic units.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* err_vars.ads (Warn_On_Instance): Remove; it was a relic from
the previous handling of warning in instances that was removed
When going to the outer level for the placement of a freeze node in the
case where the current package has no body, the previous change would
overlook instantiations whose body has not materialized yet.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch12.adb (Insert_Fre
All node lists can be safely iterated with First/Present/Next. There is
no need for explicit guard against empty lists. Code cleanup.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* errout.adb (Remove_Warning_Messages): Remove unnecessary guard.
* exp_util.adb (Kill_
All compile-time messages about division by zero are now located at the
right operand. Previously some of them were located at the division
operator, which was inconsistent.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_eval.adb (Eval_Arithmetic_Op): Add Loc parameter
Code cleanup related to handling of warnings-as-errors. Semantics is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Expand_Concatenate): There is no reason for using
declaring, raising and catching an exception; a simple return
state
Cleanup related to handling of warnings-as-errors. Semantics is
unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* errout.adb (Remove_Warning_Messages): Use traversal procedure
instead of traversal function, since we discard status of each
step anywa
701 - 800 of 872 matches
Mail list logo