Arnaud Charlet [Tue, 5 Aug 2008 14:37:44 +0000 (16:37 +0200)]
sem_ch5.adb (Analyze_Assignment_Statement): Apply conversion to right-hand side when it is an anonymous access_to_subprogram...
2008-08-05 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Assignment_Statement): Apply conversion to
right-hand side when it is an anonymous access_to_subprogram, to force
static accessibility check when needed.
Ed Schonberg [Tue, 5 Aug 2008 14:37:19 +0000 (16:37 +0200)]
sem_attr.adb: (Analyze_Attribute...
2008-08-05 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb:
(Analyze_Attribute, case 'Result): handle properly the case where some
operand of the expression in a post-condition generates a transient
block.
Sergey Rybin [Tue, 5 Aug 2008 14:10:38 +0000 (16:10 +0200)]
gnat_ugn.texi: Changing the description of the gnatcheck metrics rule according to the change...
2008-08-05 Sergey Rybin <rybin@adacore.com>
* gnat_ugn.texi: Changing the description of the gnatcheck metrics
rule according to the change in the rule option.
Add documentation for -gnatw.b/-gnatw.B
Ulrich Weigand [Tue, 5 Aug 2008 14:04:56 +0000 (14:04 +0000)]
spu_spu_mfcio.h: Wrap in extern "C" if __cplusplus.
* config/spu_spu_mfcio.h: Wrap in extern "C" if __cplusplus.
Reword some comments throughout the file.
(MFC_MIN_DMA_LIST_ELEMENTS): New define.
(MFC_MAX_DMA_LIST_ELEMENTS): Likewise.
(MFC_MIN_DMA_LIST_SIZE): Redefine in terms of MFC_MIN_DMA_LIST_ELEMENTS.
(MFC_MAX_DMA_LIST_SIZE): Redefine in terms of MFC_MAX_DMA_LIST_ELEMENTS.
Arnaud Charlet [Tue, 5 Aug 2008 13:24:27 +0000 (15:24 +0200)]
opt.ads (Warn_On_Biased_Representation): New flag
2008-08-05 Robert Dewar <dewar@adacore.com>
* opt.ads (Warn_On_Biased_Representation): New flag
* sem_ch13.adb:
(Analyze_Attribute_Definition_Clause): Issue warning when biased
representation is required.
(Minimum_Size): Don't allow biasing if enum rep clause case
* sem_warn.adb:
(Set_Dot_Warning_Switch): Add handling of -gnatw.b/B switches
(Set_Warning_Switch): Include -gnatw.b in -gnatwa, -gnatw.B in gnatws
Arnaud Charlet [Tue, 5 Aug 2008 09:30:53 +0000 (11:30 +0200)]
sem_ch3.adb (Analyze_Object_Declaration): Avoid type Any_Access in unresolved initial value of "null"...
2008-08-05 Bob Duff <duff@adacore.com>
* sem_ch3.adb (Analyze_Object_Declaration): Avoid type Any_Access in
unresolved initial value of "null", because it causes implicitly
generated "=" operators to be ambiguous, and because this type should
not be passed to gigi.
Jose Ruiz [Tue, 5 Aug 2008 09:27:49 +0000 (11:27 +0200)]
init.c (__gnat_install_handler for linux): If we are building the Xenomai run time then we need to do two additional things...
2008-08-05 Jose Ruiz <ruiz@adacore.com>
* init.c (__gnat_install_handler for linux): If we are building the
Xenomai run time then we need to do two additional things: avoid
memory swapping and transform the Linux environment task into a native
Xenomai task.
* gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for xenomai run
time): Use interface to Xenomai native skin and avoid linux-specific
way of setting CPU affinity.
(EH_MECHANISM for the xenomai run time): Use sjlj exception mechanism.
Arnaud Charlet [Tue, 5 Aug 2008 09:14:48 +0000 (11:14 +0200)]
make.adb (Switches_Of): Check for Switches (others), before checking for Default_Switches ("Ada").
2008-08-05 Vincent Celier <celier@adacore.com>
* make.adb (Switches_Of): Check for Switches (others), before checking
for Default_Switches ("Ada").
(Gnatmake): Use Builder'Switches (others) in preference to
Builder'Default_Switches ("Ada") if there are several mains.
* prj-attr-pm.adb:
(Add_Attribute): Add component Others_Allowed in Attribute_Record
aggregate.
* prj-attr.adb:
Add markers to indicates that attributes Switches allow others as index
(Others_Allowed_For): New Boolean function, returning True for
attributes with the mark.
(Initialize): Recognize optional letter 'O' as the marker for
associative array attributes where others is allowed as the index.
* prj-attr.ads:
(Others_Allowed_For): New Boolean function
(Attribute_Record): New Boolean component Others_Allowed
* prj-dect.adb:
(Parse_Attribute_Declaration): For associative array attribute where
others is allowed as the index, allow others as an index.
* prj-nmsc.adb:
(Process_Binder): Skip associative array attributes with index others
(Process_Compiler): Ditto
* prj-util.adb:
(Value_Of (Index, In_Array)): Make no attempt to put in lower case when
index is All_Other_Names.
Thomas Quinot [Tue, 5 Aug 2008 09:05:08 +0000 (09:05 +0000)]
gen-soccon.c: Rename to gen-oscons.c
2008-08-05 Thomas Quinot <quinot@adacore.com>
* gen-soccon.c: Rename to gen-oscons.c
* gen-oscons.c: New file. Now generate System.OS_Constants instead of
GNAT.Sockets.Constants.
Add new constants for GNAT.Serial_Communications and System.File_IO.
Javier Miranda [Tue, 5 Aug 2008 08:41:07 +0000 (10:41 +0200)]
sem_util.adb (Collect_Interfaces_Info): Minor reformating.
2008-08-05 Javier Miranda <miranda@adacore.com>
* sem_util.adb (Collect_Interfaces_Info): Minor reformating.
* exp_ch3.adb (Build_Offset_To_Top_Functions): Code cleanup: the
implementation of this routine has been simplified.
Ed Schonberg [Tue, 5 Aug 2008 08:17:02 +0000 (10:17 +0200)]
exp_strm.adb (Build_Record_Or_Elementary_Input_Function): For access discriminants...
2008-08-05 Ed Schonberg <schonberg@adacore.com>
* exp_strm.adb (Build_Record_Or_Elementary_Input_Function): For access
discriminants, indicate that the corresponding object declaration has
no initialization, to prevent spurious warnings when the access type is
null-excluding.
* g-comlin.adb (Sort_Sections, Group_Switches): New/Modified internal
methods needed to handle switch sections when building a command line.
(Define_Section, Add_Switch, Remove_Switch, Is_New_Section,
Current_Section): New public methods or methods modified to handle
building command lines with sections.
(Set_Command_Line): Take into account sections when analysing a switch
string.
(Start): Sort the switches by sections before iterating the command line
elements.
* g-comlin.ads (Define_Section, Add_Switch, Remove_Switch,
Is_New_Section, Current_Section): New methods or methods modified to
handle building command lines with sections.
Ed Schonberg [Mon, 4 Aug 2008 18:50:45 +0000 (20:50 +0200)]
2008-08-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb:
(Replace_Anonymous_Access_To_Protected_Subprogram): Handle properly an
anonymous access to protected subprogram that is the return type of the
specification of a subprogram body.
* sem_ch6.adb:
(Analyze_Subprogram_Body): if the return type is an anonymous access to
subprogram, freeze it now to prevent access anomalies in the back-end.
* exp_ch9.adb: Minor code cleanup.
Make sure that new declarations are inserted into the tree before
analysis (from code reading).
tree-ssa-loop-ivopts.c (add_iv_value_candidates): Also add the candidate with the stripped base if...
2008-08-04 Richard Guenther <rguenther@suse.de>
* tree-ssa-loop-ivopts.c (add_iv_value_candidates): Also add
the candidate with the stripped base if that base is different
from the original base even for offset zero.
Javier Miranda [Mon, 4 Aug 2008 12:14:25 +0000 (12:14 +0000)]
sem_ch3.adb (Access_Subprogram_Declaration): Adding missing support for N_Formal_Object_Declaration nodes.
2008-08-04 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Access_Subprogram_Declaration): Adding missing support
for N_Formal_Object_Declaration nodes. Adding kludge required by
First_Formal to provide its functionality with access to functions.
(Replace_Anonymous_Access_To_Protected_Subprogram): Add missing support
for anonymous access types returned by functions.
* sem_ch5.adb (Analyze_Assignment): Code cleanup to avoid duplicate
conversion of null-excluding access types (required only once to force
the generation of the required runtime check).
* sem_type.adb (Covers): minor reformating
* checks.adb (Null_Exclusion_Static_Checks): Avoid reporting errors
with internally generated nodes. Avoid generating the error inside init
procs.
* sem_res.adb (Resolve_Membership_Test): Minor reformating.
(Resolve_Null): Generate the null-excluding check in case of assignment
to a null-excluding object.
(Valid_Conversion): Add missing support for anonymous access to
subprograms.
* sem_ch6.adb (Check_Return_Subtype_Indication): Add missing support for
anonymous access types whose designated type is an itype. This case
occurs with anonymous access to protected subprograms types.
(Analyze_Return_Type): Add missing support for anonymous access to
protected subprogram.
* sem_eval.adb (Subtypes_Statically_Match): In case of access to
subprograms addition of missing check on matching convention. Required
to properly handle access to protected subprogram types.
Gary Dismukes [Mon, 4 Aug 2008 10:23:16 +0000 (12:23 +0200)]
exp_aggr.adb (Build_Record_Aggr_Code): Perform a conversion of the target to the type of the aggregate in the case...
2008-08-04 Gary Dismukes <dismukes@adacore.com>
* exp_aggr.adb (Build_Record_Aggr_Code): Perform a conversion of the
target to the type of the aggregate in the case where the target object
is class-wide.
* exp_ch5.adb (Expand_Simple_Function_Return): When the function's
result type is class-wide and inherently limited, and the expression
has a specific type, create a return object of the specific type, for
more efficient handling of returns of build-in-place aggregates (avoids
conversions of the class-wide return object to the specific type on
component assignments).
* sem_ch6.adb (Check_Return_Subtype_Indication): Suppress the error
about a type mismatch for a class-wide function with a return object
having a specific type when the object declaration doesn't come from
source. Such an object can result from the expansion of a simple return.
Ed Schonberg [Mon, 4 Aug 2008 10:22:48 +0000 (12:22 +0200)]
sem_ch4.adb (Analyze_Allocator): If the designated type is a non-null access type and the allocator is not...
2008-08-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Allocator): If the designated type is a non-null
access type and the allocator is not initialized, warn rather than
reporting an error.
Ed Schonberg [Mon, 4 Aug 2008 09:49:42 +0000 (11:49 +0200)]
exp_ch4.adb (Get_Allocator_Final_List): Freeze anonymous type for chain at once...
2008-08-04 Ed Schonberg <schonberg@adacore.com>
* exp_ch4.adb (Get_Allocator_Final_List): Freeze anonymous type for
chain at once, to ensure that type is properly decorated for back-end,
when allocator appears within a loop.
Jerome Lambourg [Mon, 4 Aug 2008 09:49:33 +0000 (11:49 +0200)]
g-comlin.adb (Group_Switches): Preserve the switch order when grouping and allow switch grouping of switches...
2008-08-04 Jerome Lambourg <lambourg@adacore.com>
* g-comlin.adb (Group_Switches): Preserve the switch order when
grouping and allow switch grouping of switches with more than one
character extension (e.g. gnatw.x).
(Args_From_Expanded): Remove this now obsolete method.
Arnaud Charlet [Mon, 4 Aug 2008 09:38:06 +0000 (11:38 +0200)]
gigi.h (fill_vms_descriptor): Add third parameter gnat_actual
2008-08-04 Doug Rupp <rupp@adacore.com>
* gigi.h (fill_vms_descriptor): Add third parameter gnat_actual
* trans.c (call_to_gnu): Call fill_vms_descriptor with new parameter.
* utils2.c (fill_vms_descriptor): Add third parameter for error sloc and
use it. Calculate pointer range overflow using 64bit types.