* 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).
From-SVN: r138650
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.
From-SVN: r138647
2008-08-04 Javier Miranda <miranda@adacore.com>
* sem_prag.adb (Process_Convention): Add missing support for
N_Private_Extension_Declaration nodes.
From-SVN: r138637
PR c++/36999
* parser.c (cp_parser_elaborated_type_specifier): Warn only when
the declaration's id is followed by a semicolon.
* g++.dg/warn/pr36999.C: New.
From-SVN: r138633
2008-08-04 Javier Miranda <miranda@adacore.com>
* sem_eval.adb (Subtypes_Statically_Match): Remove superfluous patch
added in previous patch to handle access to subprograms.
From-SVN: r138616
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.
* exp_ch3 (Build_Assignment): Code cleanup removing duplicated check on
null excluding access types.
From-SVN: r138610
2008-08-04 Paolo Carlini <paolo.carlini@oracle.com>
* include/bits/postypes.h: Reinstate inclusion of <stdint.h>;
also define the __STDC_* macros.
(streamoff): Adjust.
* include/tr1_impl/cstdint: Check that the __STDC_* macros are
not defined before defining.
From-SVN: r138608
2008-08-04 Vasiliy Fofanov <fofanov@adacore.com>
* g-soccon-mingw-64.ads, system-mingw-x86_64.ads: New files.
* gcc-interface/Makefile.in: Use 64bit-specific system files when
compiling for 64bit windows.
From-SVN: r138605
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.
From-SVN: r138603
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.
From-SVN: r138600
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.
From-SVN: r138597
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.
From-SVN: r138596
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.
From-SVN: r138594
2008-08-04 Arnaud Charlet <charlet@adacore.com>
* usage.adb (Usage): Minor rewording of -gnatwz switch, to improve
gnatcheck support in GPS.
From-SVN: r138592
2008-08-04 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Access_Definition): A formal object declaration is a
legal context for an anonymous access to subprogram.
* sem_ch4.adb (Analyze_One_Call): If the call can be interpreted as an
indirect call, report success to the caller to include possible
interpretation.
* sem_ch6.adb (Check_Return_Type_Indication): Apply proper conformance
check when the type
of the extended return is an anonymous access_to_subprogram type.
* sem_res.adb:
(Resolve_Call): Insert a dereference if the type of the subprogram is an
access_to_subprogram and the context requires its return type, and a
dereference has not been introduced previously.
From-SVN: r138591
2008-08-04 Vincent Celier <celier@adacore.com>
* gprep.adb (Process_One_File): Call Prep.Preprocess with a Boolean
variable, but don't check the resulting value as it has no impact on
the processing.
* opt.ads:
(Generate_Processed_File): New Boolean flag, set to True in the compiler
when switch -gnateG is used.
* prep.adb:
(Preprocess): new Boolean out parameter Source_Modified. Set it to True
when the source is modified by the preprocessor and there is no
preprocessing errors.
* prep.ads (Preprocess): new Boolean out parameter Source_Modified
* sinput-l.adb:
(Load_File): Output the result of preprocessing if the source text was
modified.
* switch-c.adb (Scan_Front_End_Switches): Recognize switch -gnateG
* switch-m.adb (Normalize_Compiler_Switches): Normalize switch -gnateG
* ug_words: Add VMS equivalent for -gnateG
* vms_data.ads:
Add VMS option /GENERATE_PROCESSED_SOURCE, equivalent to switch -gnateG
From-SVN: r138590
2008-08-04 Doug Rupp <rupp@adacore.com>
* utils2.c (fill_vms_descriptor): Use long_integer for comparison.
Call add_stmt_with_node to set locus.
From-SVN: r138589