Commit Graph

88861 Commits

Author SHA1 Message Date
Simon Baldwin
771ce78ea0 re PR c++/36999 (Erroneous "declaration 'class ...' does not declare anything" warnings possible)
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 15:09:56 +00:00
H.J. Lu
6fc3c2b2c4 re PR c++/37012 (numerous stackalign related testsuite failures on i686-apple-darwin9)
2008-08-04  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/37012
	* config/i386/i386.c (ix86_expand_prologue): Use UNITS_PER_WORD
	instead of STACK_BOUNDARY / BITS_PER_UNIT to align stack.
	(ix86_expand_epilogue): Likewise.

From-SVN: r138631
2008-08-04 07:56:12 -07:00
Arnaud Charlet
a07c35938a adaint.c: Refine support for Windows file attributes.
2008-08-04  Pascal Obry  <obry@adacore.com>

	* adaint.c: Refine support for Windows file attributes.

From-SVN: r138620
2008-08-04 14:52:38 +02:00
Thomas Quinot
56a7a3ab67 sem_ch4.adb: Minor reformatting.
2008-08-04  Thomas Quinot  <quinot@adacore.com>

	* sem_ch4.adb: Minor reformatting.

From-SVN: r138619
2008-08-04 14:51:41 +02:00
Thomas Quinot
61549759f1 exp_ch6.adb: Minor comment fix.
2008-08-04  Thomas Quinot  <quinot@adacore.com>

	* exp_ch6.adb: Minor comment fix.

From-SVN: r138618
2008-08-04 14:51:30 +02:00
Robert Dewar
b6e209b5f8 2008-08-04 Robert Dewar <dewar@adacore.com>
* freeze.adb:
	(Freeze_Entity): Only check No_Default_Initialization restriction for
	constructs that come from source

From-SVN: r138617
2008-08-04 14:51:19 +02:00
Javier Miranda
bb98fe758e sem_eval.adb (Subtypes_Statically_Match): Remove superfluous patch added in previous patch to handle access to subprograms.
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 14:51:10 +02:00
Robert Dewar
9fa33291c7 2008-08-04 Robert Dewar <dewar@adacore.com>
* sem_res.adb:
	(Valid_Conversion): Catch case of designated types having different
	sizes, even though they statically match.

From-SVN: r138615
2008-08-04 14:51:00 +02:00
Pascal Obry
31e845120a adaint.h: Add missing prototype.
2008-08-04  Pascal Obry  <obry@adacore.com>

	* adaint.h: Add missing prototype.

From-SVN: r138614
2008-08-04 14:50:41 +02:00
Arnaud Charlet
d559d5c686 adaint.c, [...]: Use Windows ACL to deal with file attributes.
2008-08-04  Pascal Obry  <obry@adacore.com>

	* adaint.c, s-os_lib.adb, s-os_lib.ads: Use Windows ACL to deal with
	file attributes.

From-SVN: r138613
2008-08-04 14:35:08 +02:00
Robert Dewar
a0ac393230 sem_ch13.ads: Minor comment update
2008-08-04  Robert Dewar  <dewar@adacore.com>

	* sem_ch13.ads: Minor comment update

	* sem_res.adb: (Large_Storage_Type): Improve previous change.

From-SVN: r138612
2008-08-04 14:34:16 +02:00
H.J. Lu
5b2314f660 i386.c (ix86_compute_frame_layout): Fix a typo in comments.
2008-08-04  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (ix86_compute_frame_layout): Fix a typo
	in comments.

From-SVN: r138611
2008-08-04 05:29:08 -07:00
Javier Miranda
b1c11e0e0a 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.

	* exp_ch3 (Build_Assignment): Code cleanup removing duplicated check on
	null excluding access types.

From-SVN: r138610
2008-08-04 14:14:25 +02:00
Arnaud Charlet
10fb8ecd51 * gnat.dg/test_ai254.adb: New test.
From-SVN: r138609
2008-08-04 14:13:10 +02:00
Paolo Carlini
d27653b8a3 postypes.h: Reinstate inclusion of <stdint.h>; also define the __STDC_* macros.
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 12:05:41 +00:00
Arnaud Charlet
382dbcb228 * gnat.dg/bip_aggregate_bug.adb: New test.
From-SVN: r138606
2008-08-04 12:28:30 +02:00
Arnaud Charlet
b282ab3735 g-soccon-mingw-64.ads, [...]: New files.
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 12:25:26 +02:00
Robert Dewar
b59283f28d g-comlin.adb: Minor reformatting
2008-08-04  Robert Dewar  <dewar@adacore.com>

	* g-comlin.adb: Minor reformatting

From-SVN: r138604
2008-08-04 12:23:25 +02:00
Gary Dismukes
05a76b51fb 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.

From-SVN: r138603
2008-08-04 12:23:16 +02:00
Robert Dewar
53aa444419 exp_dist.adb: Minor reformatting
2008-08-04  Robert Dewar  <dewar@adacore.com>

	* exp_dist.adb: Minor reformatting

From-SVN: r138602
2008-08-04 12:23:07 +02:00
Robert Dewar
8654a24048 exp_ch4.adb: Minor reformatting
2008-08-04  Robert Dewar  <dewar@adacore.com>

	* exp_ch4.adb: Minor reformatting

From-SVN: r138601
2008-08-04 12:22:58 +02:00
Ed Schonberg
75ad504283 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.

From-SVN: r138600
2008-08-04 12:22:48 +02:00
Ed Schonberg
d882d0e15e sem_ch12.adb: Add comments
2008-08-04  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb: Add comments

From-SVN: r138599
2008-08-04 12:22:39 +02:00
Arnaud Charlet
54838d1f88 snames.h, [...]: Add Attr_To_Any, Attr_From_Any and Attr_TypeCode defines.
2008-08-04  Kevin Pouget  <pouget@adacore.com>

	* snames.h, snames.adb, snames.ads:
	Add Attr_To_Any, Attr_From_Any and Attr_TypeCode defines.

	* exp_dist.ads, exp_dist.adb: Add Build_From_Any_Call,
	Build_To_Any_Call and Build_TypeCode_Call procedures.

	* exp_attr.adb, sem_attr.adb: Add corresponding cases.

	* rtsfind.ads: Add corresponding names.

	* tbuild.adb: Update prefix restrictions to allow '_' character.

From-SVN: r138598
2008-08-04 11:50:09 +02:00
Ed Schonberg
9450205a0c 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.

From-SVN: r138597
2008-08-04 11:49:42 +02:00
Jerome Lambourg
c18b3a998d 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.

From-SVN: r138596
2008-08-04 11:49:33 +02:00
Arnaud Charlet
d5d33d0946 Minor reformatting.
From-SVN: r138595
2008-08-04 11:40:33 +02:00
Arnaud Charlet
819fad69b2 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.

From-SVN: r138594
2008-08-04 11:38:06 +02:00
Vincent Celier
48fbb62da1 mlib.adb (Create_Sym_Links): Create relative symbolic links when requested
2008-08-04  Vincent Celier  <celier@adacore.com>

	* mlib.adb (Create_Sym_Links): Create relative symbolic links when
	requested

From-SVN: r138593
2008-08-04 11:36:46 +02:00
Arnaud Charlet
f2170041e1 usage.adb (Usage): Minor rewording of -gnatwz switch, to improve gnatcheck support in GPS.
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 11:36:26 +02:00
Ed Schonberg
53cf46009d sem_ch3.adb (Access_Definition): A formal object declaration is a legal context for an anonymous access to...
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 11:36:10 +02:00
Vincent Celier
a037f91246 gprep.adb (Process_One_File): Call Prep.Preprocess with a Boolean variable...
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 11:17:44 +02:00
Doug Rupp
762dffe7bf utils2.c (fill_vms_descriptor): Use long_integer for comparison.
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
2008-08-04 11:16:54 +02:00
Arnaud Charlet
bdc33a55e8 2008-08-04 Doug Rupp <rupp@adacore.com>
* gcc-interface/utils2.c:
	(fill_vms_descriptor): Raise CE if attempt made to pass 64bit pointer
	in 32bit descriptor.

From-SVN: r138588
2008-08-04 11:07:31 +02:00
Thomas Quinot
7b84d8c139 sem_ch10.adb: Minor comment fix.
2008-08-04  Thomas Quinot  <quinot@adacore.com>

	* sem_ch10.adb: Minor comment fix.

From-SVN: r138587
2008-08-04 11:06:45 +02:00
Arnaud Charlet
57eb1cf51a sem_prag.adb (Check_Form_Of_Interface_Name): Fix handling for CLI target.
2008-08-04  Arnaud Charlet  <charlet@adacore.com>

	* sem_prag.adb (Check_Form_Of_Interface_Name): Fix handling for CLI
	target.

From-SVN: r138586
2008-08-04 11:06:36 +02:00
Vincent Celier
bfb110208d make.adb: Correct spelling error in comment
2008-08-04  Vincent Celier  <celier@adacore.com>

	* make.adb: Correct spelling error in comment

From-SVN: r138585
2008-08-04 11:06:16 +02:00
Vincent Celier
2f0bc54835 prj-attr.adb: New Builder attribute Global_Compilation_Switches
2008-08-04  Vincent Celier  <celier@adacore.com>

	* prj-attr.adb: New Builder attribute Global_Compilation_Switches
	
	* snames.adb: New standard name Global_Compilation_Switches
	
	* snames.ads: New standard name Global_Compilation_Switches

From-SVN: r138584
2008-08-04 11:05:56 +02:00
Ed Schonberg
0f5177ad72 sem_ch3.adb (Access_Definition): Create an itype reference for an anonymous access return type of a regular...
2008-08-04  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Access_Definition): Create an itype reference for an
	anonymous access return type of a regular function that is not a
	compilation unit.

From-SVN: r138583
2008-08-04 11:05:40 +02:00
Pascal Obry
ba622ca2e1 i-cobol.adb: Minor reformatting.
2008-08-04  Pascal Obry  <obry@adacore.com>

	* i-cobol.adb: Minor reformatting.

From-SVN: r138582
2008-08-04 11:05:29 +02:00
Robert Dewar
fbe0e1ad3f par-ch10.adb: Minor reformatting
2008-08-04  Robert Dewar  <dewar@adacore.com>

	* par-ch10.adb: Minor reformatting

From-SVN: r138581
2008-08-04 11:05:01 +02:00
Arnaud Charlet
fc1b906a0a Resync.
From-SVN: r138580
2008-08-04 10:40:22 +02:00
Ed Schonberg
75bee27009 sem_prag.adb (Check_Precondition_Postcondition): When scanning the list of declaration to find previous subprogram...
2008-08-04  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb (Check_Precondition_Postcondition): When scanning the
	list of declaration to find previous subprogram, do not go to the
	original node of a generic unit.

From-SVN: r138579
2008-08-04 10:38:06 +02:00
Vincent Celier
570d3cfb8d 2008-08-04 Vincent Celier <celier@adacore.com>
* prj-proc.adb:
	(Copy_Package_Declarations): When inheriting package Naming from a
	project being extended, do not inherit source exception names.

From-SVN: r138578
2008-08-04 10:37:57 +02:00
Robert Dewar
6719855697 freeze.adb (Freeze_Entity): Check for size clause for boolean warning
2008-08-04  Robert Dewar  <dewar@adacore.com>

	* freeze.adb (Freeze_Entity): Check for size clause for boolean warning

From-SVN: r138577
2008-08-04 10:37:47 +02:00
Robert Dewar
2ca90ff00c system-darwin-x86.ads: Correct bad definition of Max_Nonbinary_Modulus
2008-08-04  Robert Dewar  <dewar@adacore.com>

	* system-darwin-x86.ads: Correct bad definition of Max_Nonbinary_Modulus

From-SVN: r138576
2008-08-04 10:37:40 +02:00
Robert Dewar
9b7c38af5a restrict.adb: Improved messages for restriction warnings
2008-08-04  Robert Dewar  <dewar@adacore.com>

	* restrict.adb: Improved messages for restriction warnings

	* restrict.ads: Improved messages for restriction messages

	* s-rident.ads (Profile_Name): Add No_Profile

From-SVN: r138575
2008-08-04 10:37:31 +02:00
GCC Administrator
d6b251539f Daily bump.
From-SVN: r138573
2008-08-04 00:16:36 +00:00
Jerry DeLisle
804ac23239 fmt_t_7.f: Replace CR-LF with LF.
2008-08-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* gfortran.dg/fmt_t_7.f: Replace CR-LF with LF.

From-SVN: r138568
2008-08-03 22:02:22 +00:00
Uros Bizjak
b7c9c5ab7f mmx.md (*mov<mode>_internal_rex64): Use Yi instead of x to avoid inter-unit moves for !TARGET_INTER_UNIT_MOVES.
* config/i386/mmx.md (*mov<mode>_internal_rex64): Use Yi instead of x
	to avoid inter-unit moves for !TARGET_INTER_UNIT_MOVES.
	(*movv2sf_internal_rex64): Ditto.

From-SVN: r138566
2008-08-03 20:45:17 +02:00