When using .C_Streams.Open with a null Name, the File will be
incorrectly set as a temporary file, causing a wrong attempt to delete
it when closing it.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-fileio.adb (Open): Fix setting of Tempfile.diff --git a/gcc/
In some cases involving a package spec using object.method notation
in e.g. subprogram aspects, an old change in Complete_Object_Operation
would disable the proper detection of an unused "with" clause.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch4.adb (Complete_Obj
When compiling iterated_component_association, the analysis, resolution
and range checking is done when expanding aggregate into assignments.
This is now mirrored in the custom expansion for GNATprove, so that the
backend sees a fully decorated (but unexpanded) AST.
Tested on x86_64-pc-linux-gnu,
When the Image attribute is applied to an enumeration type subject to
pragma Discard_Names, the underlying numeric value is printed instead
of the string of the literal and this is done by invoking the Image
routine of Long_Long_Long_Integer, which is overkill in the context.
Tested on x86_64-pc-l
To prevent ambiguities in the use of predefined containers in legacy
code, the resolution of aggregates must ignore the presence of the
Aggregate aspect when the compilation version is earlier than Ada_2020.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_aggr.adb (Resol
GNAT started generated a new legitimate warning on g-socthi__mingw.adb:
g-socthi.adb:395:19: warning: condition is always True
After further investigation, it appears that Original_WFS was
unconditionally dereferencing Writefds without first checking against null.
Tested on x86_64-pc-linux-gnu, c
Implement wait on set of sockets to become ready to perform I/O
operations. Current implementation of the similar functionality with
type Selector_Type and Check_Selector routine in GNAT.Sockets package is
limited by 1024 sockets. New implementation limited only by process
limit on number of open
This patch implements AI12-0035, AI12-0335, AI12-0345, AI12-0372, and
partially Ada2012-A235 and fixes many holes in accessibility checking.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* checks.adb (Apply_Accessibility_Check): Skip checks against
the extra accessib
We had code that was trying to read an existing ALI files to extract
information in -gnatc mode, mainly for ASIS use. Remove this code which
is no longer needed and might even cause hard to understand effects.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* lib-writ.ads, lib
In pragma Contract_Cases argument only "CASE_GUARD => CONSEQUENCE"
clauses are allowed. Once we know that the pragma argument is an
N_Aggregate, we checked if it has component associations; now we also
check that it has no expressions.
Same for the argument of the Subprogram_Variant contract, whos
This removes the now obsolete legality rules specified by AI12-0128
and replaces them with the new legality rules specified by AI12-0363
pertaining to nonatomic subcomponents of full access types and objects.
This also introduces the new aspect Full_Access_Only in Ada 2020 mode
and revamps the imp
The Digits_From_Size and Width_From_Size functions of Get_Targ, as well
as the *_Width and *_Digits constants of Ttypes, have been unused for a
while in the compiler.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* ada_get_targ.adb (Digits_From_Size): Delete.
(Width_
This unit added recently generate legitimate warnings which were not
caught because this file had not been added to Makefile.rtl.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-spogwa object.
* libgnat/g-spogwa.adb: Fix
This patch allows the compiler to handle array aggregates with more than
two dimensions, when the aggregate includes nested
Iterated_Component_Associations for sub-aggregates. These constructs are
expanded into a loop that contains a copy of the expression. Previously
their semantic analysis was do
This new flag is introduced to enable the transformation of function
returning constrained arrays into a procedure separately from
Modify_Tree_For_C for easier reuse.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch6.adb, freeze.adb, gnat1drv.adb, opt.ads, sem_ch6.adb
GNAT only partially analyzes iterated_component_associations within
array aggregates, as they are fully analyzed when expanded into loops.
GNATprove must therefore analyze iterated_component_associations as part
of its custom expansion. This only worked for one-dimensional array
aggregates; now it
on the list. Thank you
again for your contribution.
--
Pierre-Marie de Rodat
There several more missing cases of needing to reinitialize
Stored_Contraint when changing Etype from an incomplete type to
a modular or array type (where the field is Original_Array_Type).
Also, include the node number in the -gnatd_v output.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc
An aggregate of a type that has a variant part has to satisfy certain
rules about the discriminant value governing that variant part. If these
rules are violated, then the front end typically emits a message
associated with the discriminant value. However, this is not useful in
the case where the d
The next Ada standard will finally be Ada 2022, so update references to
Ada 2020 and 202X accordingly.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo.ads, errout.adb, errout.ads, exp_aggr.adb, exp_ch5.adb,
exp_ch6.adb, exp_ch8.adb, exp_ch9.adb, exp_imgv.adb,
When processing an access type declaration that completes an incomplete
type, we now cleanly switch to a proper access type before setting the
designated type. This simplifies the previous ad-hoc machinery for error
recovery, which actually didn't work when the completion as an access
type referenc
This patch fixes a bug in which the compiler could crash if there is a
subtype of a private type, and the full type has invariants.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Propagate_Invariant_Attributes): Call
Set_Has_Own_Invariants on the base
Give a better error message when we run out of fields.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gen_il-gen.adb (To_Bit_Offset): Use 'Base to avoid overflow in
computations in Last_Bit when Offset = 'Last.
(Choose_Offset): Give a better error message wh
The old compiler (pre-var-size nodes) had code in Set_Then_Actions to
set the parent of the Then_Actions to point to the If_Expression, even
though this field is not syntactic.
This was missing from the new version.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gen_il-gen
In particular we now recognize expressions of the form
xxx and False
xxx or True
when xxx has no side effect.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_eval.adb (Eval_Logical_Op, Test_Expression_Is_Foldable):
Add support for folding more "and"/"or" ex
The comment for Find_Overlaid_Entity which says "node N should be an
address representation clause" is now enforced with an assertion. A
defensive code is removed from the body; the defensive code at the
callers of this routine is enough to prevent crashes.
Code cleanup related to improved handlin
gnat_argv is defined as pointer to const memory in argv.c but declared
and accessed as pointer to mutable memory in rtinit.c, which breaks the
One Definition Rule in C++. Its initialization is also non-standard.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* argv.c: Add in
...for uniformity of referencing code.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gen_il-gen-gen_entities.adb (E_Loop_Parameter): Add
Interface_Name field.diff --git a/gcc/ada/gen_il-gen-gen_entities.adb b/gcc/ada/gen_il-gen-gen_entities.adb
--- a/gcc/ada/gen_il
This patch fixes a failure of ACATS test cxaib08, which was getting
errors in instances of Bounded_Hashed_Maps about nonpreelaborable
constructs.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_cat.adb (Check_Non_Static_Default_Expr): Allow nonstatic
expression i
Use Implementation_Base_Type instead of Base_Type in certain synthesized
attributes so they work on private types.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* einfo-utils.adb (Known_Component_Size,
Known_Static_Component_Size, Unknown_Component_Size): Use
Minor fix in comment; behaviour is unaffected. Spotted while examining
the expansion of attribute Image in GNAT so it can be better supported
in GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_imgv.adb (Expand_User_Defined_Enumeration_Image): Fix
typos
The compiler issues an error on passing 'Access of a subprogram declared
within a generic unit body to an anonymous access-to-subprogram formal
of a formal subprogram of the generic that has an "is null" default,
when the generic is instantiated and the actual for that formal
subprogram is defaulte
This Ada202X AI, as well as AI12-0396 and AI12-0423, clarifies the
notion of nonoverridable aspects, as well as the rules for confirming
inheritance of such aspects. This patch refines the check for confirming
specifications to allow, e.g. renamed discriminants to carry an
Implicit_Dereference aspe
Routine Is_Access_Variable, which relied on the Ekind of the type,
wrongly returned True for subtypes of an access-to-subprogram type. It
is more reliable to also use Directly_Designated_Type.
This only affects SPARK legality checks for Global and Depends
contracts; compilation is not affected, be
This patch fixes some calls to Reinit_Field_To_Zero that were called for
too many or too few Ekinds. In particular, SPARK_Aux_Pragma_Inherited
does not exist in concurrent subtypes, causing crashes in Atree when the
pragmas at the start of the file are removed.
Tested on x86_64-pc-linux-gnu, commi
Side-effects in component declarations are prohibited in SPARK (both in
the constraints of component type definitions and in the default
expressions), but GNAT requires them to be removed when processing
records with per-object constraints.
This patch allows removal of side-effects in component de
The patch implements the No_Task_Parts aspect, which says that a type
and extensions of it cannot contain tasks.
In addition, we optimize away tasking-related code for T'Class when T
has No_Task_Parts. This is mostly just an efficiency improvement, but it
fixes a bug in one obscure case: The expan
We have an existing mechanism for suppressing dead code warning messages
in the case of an if-statement within an instance of a generic where the
value of the condition is known statically. Generalize this approach to
also handle case statements.
Tested on x86_64-pc-linux-gnu, committed on trunk
When performing a bootstrap with Ada, we are currently using the runtime
files from the repository during stage1, causing some subtle
inconsistencies during stage1 of the bootstrap, sometimes hard to
workaround. This change now uses the runtime from the base compiler
during stage1 only. We still re
This removes obsolete stuff.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-except.ads (ZCX_By_Default): Delete.
(Require_Body): Likewise.
* libgnat/s-except.adb: Replace body with pragma No_Body.diff --git a/gcc/ada/libgnat/s-except.adb b/gcc/ada/
The placement of check for types of an unchecked conversion being
generic was done in the middle of switching from their original to
underlying views, which was inconsistent and made the surrounding
comments confusing.
Code cleanup in preparation for a follow-up improvement; behaviour is
unaffecte
During the implementation of AI12-0172, we incorrectly allowed illegal
cases of unconstrained components.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Analyze_Component_Declaration): Do not special
case raise expressions.
gcc/testsuite/
* gn
This removes obsolete stuff.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* initialize.c: Do not include vxWorks.h and fcntl.h from here.
(__gnat_initialize) [__MINGW32__]: Remove #ifdef and attribute
(__gnat_initialize) [init_float]: Delete.
(__gnat
This new version is both more straightforward to understand and to map
to the generated code at high optimization. No functional changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Current_Entity_In_Scope): Reimplement.diff --git a/gcc/ada/sem_util.adb b/
For an assignment statement of the form "A.B(C).D := ...", in a loop,
the index check on C can be missing.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* ghost.adb: Add another special case where full analysis is
needed. This bug is due to quirks in the way
Completing previous patch since it introduced a regression on ACATS
c611a03 under certified runtime.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_disp.adb (Build_Class_Wide_Check): Ensure that evaluation
of actuals is side effects free (since the check duplica
There is no need to walk the hierarchy rooted at a type that does not
come from source only to drop the result on the floor. No functional
changes.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* freeze.adb (Check_No_Parts_Violations): Return earlier if the
type is
The value returned by Incomplete_Or_Partial_View depends on the current
scope, which is unexpected at best.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Incomplete_Or_Partial_View): Retrieve the scope of
the parameter and use it to find its incomplet
This patch fixes an issue in the compiler whereby a non-static
expression is allowed as an argument to aspect Interrupt_Priority
despite restriction Static_Priorities being in effect.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Make_Aitem_Pragma): Check for
As First_Sloc is used to compute source location for entry guards, it
must be also used to compute the dominance marker source location in
this particular case (when a statement is dominated by an entry guard).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* par_sco.adb (Set
This patch fixes an issue in the compiler whereby taking 'Access of a
"for of" loop parameter caused spurious compile-time accessibility
errors.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Accessibility_Level): Take into account
renamings of loop pa
This patch fixes an issue in the compiler whereby the mixing of
positional and named entries in an enumeration representation clause was
erroneously allowed instead of rejected - as per RM rules.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch13.adb (Analyze_Enumerati
Code cleanup; behaviour is unaffected. The extra initialization most
likely come from a initial version of the patch, before the limit of
parameters to a subsequent call to New_List was discovered.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Build_Slice_Assi
Routine Is_Actual_Parameter now also detects entry parameters; this
change is harmless for GNAT and allows this routine to be reused in
GNATprove.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.ads (Is_Actual_Parameter): Update comment.
* sem_util.adb (Is_A
The expanded code should never reference entities in the tasking runtime
(libgnarl) except when expanding tasking constructs directly.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* rtsfind.ads, libgnarl/s-taskin.ads, exp_ch3.adb, exp_ch4.adb,
exp_ch6.adb, exp_ch9.a
This patch implements the legality rules specified in RM 11.3 (2) for
the placement of Raise_Expressions. In Ada2020 aspect specifications can
appear in several new declarative contexts, and the keyword "with" can
be part of a Raise_Expression or the start of a list of aspect
specifications. To pr
The aliasing check applies when some of the formals has their passing
mechanism unspecified; RM 6.2 (12/3). Previously it only applied when
the first formal had its passing mechanism unspecified and the second
had its passing mechanism either unspecified or by-reference.
Tested on x86_64-pc-linux-
For each instance of implementation advice given in the Ada RM, the
Implementation Advice section of the GNAT RM documents whether the
advice is followed (see Ada RM M.3(1)). Such documention was missing for
the implementation advice regarding Ada.Containers and its child units.
Rectify this omissi
As part of the work on changing side-effects removal in SPARK, a special
case was introduced to generate an Itype_Reference for Itypes in slices.
This was based on a misunderstanding of existing checks for bounds when
analyzing slices. These Itype_Reference are actually not needed to get
the corres
It works neither at compile time nor at run time because of the classical
issue that -Integer'First is not a valid Integer value.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* urealp.adb (Scale): Change first paramter to Uint and adjust.
(Equivalent_Decimal_Exponen
Detection of volatile expressions, i.e. references to volatile objects
and allocators, is done in two steps: first when analysing entity names
and allocators themselves (except when they occur within actual
parameters of subprogram calls) and then after the subprogram call has
been resolved (so tha
Function declared immediately within a protected body is a not a
protected function; the exact definition is RM 9.5.1(1): "A protected
subprogram is a subprogram declared immediately within a protected
definition."
Consequently, functions declared immediately within a protected body are
not volati
When detecting references to volatile objects in expressions of the
expression functions we couldn't determine the enclosing function. This
was because we examined a copy of the expression made for preanalysis
and this copy is not properly decorated. Consequently, we wrongly
rejected valid referenc
References to allocators, just like references to volatile objects, are
now rejected in all context restricted by SPARK, both within actual
parameters and outside of them.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch4.adb (Analyze_Allocator): Reject allocators in
This AI got updated to remove some detected incompatibilities and
Interfaces.C.bool is now named Interfaces.C.C_bool.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/i-c.ads, libgnat/i-cexten.ads,
libgnat/i-cexten__128.ads: bool renamed C_bool.diff --git a/gc
Run-time checks generated by the compiler with -gnateA switch are only
relevant for actuals that name existing objects. They are irrelevant for
other (anonymous) objects, because an object that acts as actual for one
parameter cannot be referenced as the actual for another parameter.
Consequently,
This patch fixes a bug in which procedures in Treepr such as pp would
fail to display the Entity or Associated_Node fields. This was because
of the shenanigans played with the Entity_Or_Associated_Node field (see
Sinfo.Utils).
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
*
This does not make a significant enough performance difference.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* atree.adb: Do not suppress checks.diff --git a/gcc/ada/atree.adb b/gcc/ada/atree.adb
--- a/gcc/ada/atree.adb
+++ b/gcc/ada/atree.adb
@@ -27,12 +27,11 @@
-- file
When seeing if we have any static predicates in an "others" choice for a
case statement, look at and possibly update choices
Others_Discrete_Choices.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_util.adb (Expand_Static_Predicates_In_Choices): Handle
Others_Dis
The function UI_To_Int is sometimes not sufficient, so provide this new
function which can be useful to some GNAT back-ends.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* uintp.ads, uintp.adb (UI_To_Unsigned_64): New.diff --git a/gcc/ada/uintp.adb b/gcc/ada/uintp.adb
--- a
The enumeration literals in type Node_Field were overloading the getter
functions, which causes gdb to be confused. Same for Entity_Field.
This patch prefixes all the enumeration literals with "F_", to
disambiguate.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* gen_il-ge
When compiling code with -gnateA -gnateE switches, i.e. with aliasing
checks and extra information in exception messages, the runtime error
includes names the overlapping formal parameters. Those parameters are
now printed exactly as they appear in the source code, not in casing
that has been deter
The ELIMINATED overflow checking mode, enabled either by a pragma or a
command line switch, requires Long_Long_Integer'Size to 64 (because of
the assumptions in the System.Bignums library). GNAT emitted a cryptic
error when this requirement was not satisfied, e.g. when using a target
configuration
This is an iterative patch as part of a greater project to reduce the
amount of technical debt present in the frontend of the compiler.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch3.adb (Check_Missing_Others): Add comment.
(Build_Initialization_Call): Remov
The initial implementation wrongly put s-putaim.ads, s-putaim.adb in
libgnat instead of libgnarl.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/s-putaim.ads, libgnat/s-putaim.adb: Move...
* libgnarl/s-putaim.ads, libgnarl/s-putaim.adb: ... here.diff --git /
Detection of overlapping actuals based on the mode and type of the
formal parameters (i.e. IN/OUT/IN-OUT and elementary/composite) involved
repeated conditions both in the outer loop (i.e. conditions applied to
first formal) and in the inner loop (i.e. conditions applied to both
formals).
Those re
In detection of overlapping actuals we were giving up on the first
formal parameter of a generic type, which caused errors to depend on the
order of parameters. Now we examine all parameters and simply ignore
generic ones.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_
In detection of overlapping actuals we first call Refer_Same_Object to
filter function calls that act as actual parameters. There is no need to
later special-case any function calls, e.g. in the prefix notation.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_warn.adb (W
When detecting overlapping actuals GNAT was giving up on the first pair
of parameters that refer to the same object (even when there was no
overlapping because both parameters had mode IN). Now we examine all
pairs.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_warn.ad
To detect overlapping slices acting as actual parameters we rely on the
Get_Index_Bounds routine. We were calling it with a type entity, while
its description says that it parameter "must be a range, subtype
indication, or the name of a scalar subtype."
Tested on x86_64-pc-linux-gnu, committed on
Checks for overlapping actuals only apply to "valid renamings", i.e.
renamings whose renamed object_name contains no references to non-static
expressions; RM 6.4.1 (6.11/3). Such references can appear both in
indexed components and slices.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada
The compiler wrongly issues an error on a generic instantiation when an
incomplete view of a type that is completed before the instantiation is
given as an actual for a formal incomplete type. We now check whether
the full view of the actual incomplete type is present at that point,
and associate t
On illegal declarations of illegal types, e.g.:
type X;
type X is new X;
the No_Wide_Characters restriction was checked using an incomplete
entity of type X, which caused a crash.
Now restriction No_Wide_Characters in derived types is checked after the
legality of the parent type has been
Routine Is_Valid_Renaming was a wrapper subprogram that simply called
its nested function. Code cleanup; semantics is unaffected.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_util.adb (Is_Valid_Renaming): Body moved from its nested
routine.diff --git a/gcc/ada
Exp_Util.Find_Hook_Context wasn't prepared to handle this case properly
and we ended up inserting a statement in the middle of an aggregate,
causing chaos.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_util.adb (Find_Hook_Context): Do not stop on an aggregate
n
Finalization may be missed when at least two if or case expressions
are nested together and a controlled object is created after the nested
expression.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch4.adb (Expand_N_Expression_With_Actions.Process_Action):
Do n
Initial support for casing on composite values if extensions are allowed
(e.g., if -gnatX is specified). The implementation is far from complete.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_ch5.adb
(Expand_N_Case_Statement.Expand_General_Case_Statement): New
This is a prototype implementation of the feature for defining array
types and subtypes with fixed lower bounds for index ranges as proposed
as part of the "Inox" language design effort. This feature is currently
supported under control of the -gnatX (language extensions) switch, and
allows unconst
Normally the warnings:
warning: formal parameter "..." is not modified
warning: mode could be "in" instead of "in out"
are disabled if the type contains components of an access type. This
patch enables such warnings if the only such components are in internal
private types.
Tested on x8
... when its length is close to Natural'Last.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* libgnat/a-strunb__shared.ads (Allocate): Additional parameter
to provide additional amount of space to be allocated.
* libgnat/a-strunb__shared.adb (Aligned_Max_Leng
This combination breaks an assumption in
Sem_Ch3.Check_Ops_From_Incomplete_Type.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch3.adb (Check_Ops_From_Incomplete_Type): Protect against
no Primitive_Operations.diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.a
When mixing GNAT.Compiler_Version and LTO, a warning about a type
mismatch between the import and export of __gnat_version is generated.
Fixed by introducing a level of indirection.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* bindgen.adb (Gen_Output_File_Ada): Generate
We use ??? when relevant, not TBD in GNAT comments
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_aggr.adb, exp_dist.adb, exp_unst.adb, sa_messages.ads,
sem_ch13.adb, sem_ch3.adb, sem_ch5.adb, sem_eval.adb,
sem_util.adb, sem_util.ads, sinfo.ads: Update c
Code cleanup: add a new value in Ada_Version_Type to represent the
latest version of Ada with GNAT extensions instead of using a separate
flag.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* fe.h, opt.adb, opt.ads, par-prag.adb, sem_prag.adb,
switch-c.adb (Extension
This commit implements basic support for the -fdiagnostics-format=json
option that GCC has. When GNAT finds this argument in the command line,
error messages such as:
tmp.adb:4:12: "My_Var" is undefined
Will be printed as:
[
{
"kind": "error",
"locations": [
{
"caret": {
The flag is first set on them as for any other constants but then
cleared when the import pragma is processed.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_prag.adb (Process_Import_Or_Interface): Do not
artificially record a possible modification for a constan
This is useful for e.g. CodePeer usage.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_ch6.adb (Null_Exclusions_Match): Relax null exclusion
mismatch check when Relaxed_RM_Semantics is set.diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
--- a/gcc/ada/sem_
Detection of overlapping actuals doesn't need to be special-cased for
prefix notation, because it is done after prefixed calls have been
rewritten into ordinary calls, both in normal compilation and semantic
checking mode (with switch -gnatc).
Behaviour is unaffected; the removed code was dead.
T
This patch adds the -gnatd_g switch, which lowers the threshold for
computing static aggregates at compile time.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* debug.adb: Document switch.
* exp_aggr.adb: If -gnatd_g was given, then do not bump the
limit to 5
Normally the warnings:
warning: formal parameter "..." is not modified
warning: mode could be "in" instead of "in out"
are disabled if the type contains components of an access type.
A previous patch enabled such warnings if the only such components
are in internal private types.
This pa
1401 - 1500 of 3299 matches
Mail list logo