Commit Graph

90 Commits

Author SHA1 Message Date
Arnaud Charlet
86f0e17adc 2011-10-24 Sergey Rybin <rybin@adacore.com frybin>
* gnat_ugn.texi: For gnatelim, move the note about using the GNAT
	driver for getting the project support into gnatelim section.

2011-10-24  Robert Dewar  <dewar@adacore.com>

	* gnat_rm.texi: Minor correction to documentation on address
	clause.

2011-10-24  Hristian Kirtchev  <kirtchev@adacore.com>

	* s-finmas.adb (Attach): Synchronize and call the unprotected version.
	(Attach_Unprotected): New routine.
	(Delete_Finalize_Address): Removed.
	(Delete_Finalize_Address_Unprotected): New routine.
	(Detach): Synchronize and call the unprotected version.
	(Detach_Unprotected): Remove locking.
	(Finalize): Add various comment on synchronization. Lock the critical
	region and call the unprotected versions of routines.
	(Finalize_Address): Removed.
	(Finalize_Address_Unprotected): New routine.
	(Set_Finalize_Address): Synchronize and call
	the unprotected version.
	(Set_Finalize_Address_Unprotected): New routine.
	(Set_Heterogeneous_Finalize_Address): Removed.
	(Set_Heterogeneous_Finalize_Address_Unprotected): New routine.
	(Set_Is_Heterogeneous): Add comment on synchronization and
	locking.
	* s-finmas.ads: Flag Finalization_Started is no longer atomic
	because synchronization uses task locking / unlocking.
	(Attach): Add comment on usage.
	(Attach_Unprotected): New routine.
	(Delete_Finalize_Address): Renamed to
	Delete_Finalize_Address_Unprotected.
	(Detach): Add comment on usage.
	(Detach_Unprotected): New routine.
	(Finalize_Address): Renamed to Finalize_Address_Unprotected.
	(Set_Finalize_Address): Add comment on usage.
	(Set_Finalize_Address_Unprotected): New routine.
	(Set_Heterogeneous_Finalize_Address): Renamed to
	Set_Heterogeneous_Finalize_Address_Unprotected.
	* s-stposu.adb (Allocate_Any_Controlled): Add local variable
	Allocation_Locked. Add various comments on synchronization. Lock
	the critical region and call the unprotected version of
	routines.
	(Deallocate_Any_Controlled): Add various comments on
	synchronization. Lock the critical region and call the unprotected
	version of routines.

2011-10-24  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Set_Fixed_Range): The bounds of a fixed point type
	are universal and must carry the corresponding type.
	* sem_eval.adb (Check_Non_Static_Context): If the type of the
	expression is universal real, as may be the case for a fixed point
	expression with constant operands in the context of a conversion,
	there is nothing to check.
	* s-finmas.adb: Minor reformatting

From-SVN: r180368
2011-10-24 11:19:15 +02:00
Arnaud Charlet
2c1b72d7b6 [multiple changes]
2011-08-04  Robert Dewar  <dewar@adacore.com>

	* par_sco.adb, prj-proc.adb, make.adb, bindgen.adb, prj.adb, prj.ads,
	makeutl.adb, makeutl.ads, prj-nmsc.adb, exp_ch5.adb, exp_ch12.adb,
	exp_ch7.ads, exp_util.ads, sem_util.ads, g-comlin.ads, exp_ch6.adb,
	exp_ch6.ads, lib-xref.ads, exp_ch7.adb, exp_util.adb, exp_dist.adb,
	exp_strm.adb, gnatcmd.adb, freeze.adb, g-comlin.adb, lib-xref-alfa.adb,
	sem_attr.adb, sem_prag.adb, sem_util.adb, sem_elab.adb, sem_ch8.adb,
	sem_ch11.adb, sem_eval.adb, sem_ch13.adb, sem_disp.adb, a-fihema.adb:
	Minor reformatting and code reorganization.

2011-08-04  Emmanuel Briot  <briot@adacore.com>

	* projects.texi: Added doc for aggregate projects.

From-SVN: r177320
2011-08-04 09:51:08 +02:00
Arnaud Charlet
f9ad6b6231 [multiple changes]
2011-08-03  Javier Miranda  <miranda@adacore.com>

	* sem_prag.adb (Process_Interface_Name): Allow duplicated export names
	in Java since they are always enclosed in a namespace that
	differentiates them, and overloaded entities are supported by the VM.

2011-08-03  Ed Schonberg  <schonberg@adacore.com>

	* checks.adb (Determine_Range): If a computed bound of an operation is
	outside the range of the base type of the expression, and overflow
	checks are enabled, the result is unknown and cannot be used for any
	subsequent constant folding.
	* sem_eval.adb (Compile_Time_Compare): if the bounds of one operand are
	unknown, so is the result of the comparison.

2011-08-03  Hristian Kirtchev  <kirtchev@adacore.com>

	* a-except-2005.adb (Raise_From_Controlled_Operation): Add new formal
	From_Abort. When finalization was triggered by an abort, propagate
	Standard'Abort_Signal rather than Program_Error.
	* a-except-2005.ads (Raise_From_Controlled_Operation): Add new formal
	From_Abort.
	* a-except.adb (Raise_From_Controlled_Operation): Add new formal
	From_Abort. When finalization was triggered by an abort, propagate
	Standard'Abort_Signal rather than Program_Error.
	* a-except.ads:(Raise_From_Controlled_Operation): Add new formal
	From_Abort.
	* exp_ch7.adb:(Build_Adjust_Or_Finalize_Statements): New local variable
	Abort_Id. Update the calls to Build_Object_Declarations and
	Build_Raise_Statement to include Abort_Id.
	(Build_Adjust_Statements): New local variable Abort_Id. Update the
	calls to Build_Object_Declarations and Build_Raise_Statement to include
	Abort_Id.
	(Build_Finalize_Statements): New local variable Abort_Id. Update the
	calls to Build_Object_Declarations and Build_Raise_Statement to include
	Abort_Id.
	(Build_Components): Create an entity for Abort_Id when exceptions are
	allowed on the target.
	(Build_Finalizer): New local variable Abort_Id.
	(Build_Initialize_Statements): New local variable Abort_Id. Update the
	calls to Build_Object_Declarations and Build_Raise_Statement to include
	Abort_Id.
	(Build_Object_Declarations): Add new formal Abort_Id. Create the
	declaration of flag Abort_Id to preserve the original abort status
	before finalization code is executed.
	(Build_Raise_Statement): Add new formal Abort_Id. Pass Abort_Id to
	runtime routine Raise_From_Controlled_Operation.
	(Create_Finalizer): Update the call to Build_Raise_Statement to include
	Abort_Id. Update the call to Build_Object_Declarations to include
	Abort_Id. Update the layout of the finalizer body.
	(Make_Handler_For_Ctrl_Operation): Add an actual for From_Abort.
	(Process_Transient_Objects): New local variable Abort_Id. Remove the
	clunky code to create all flags and objects related to
	exception propagation and replace it with a call to
	Build_Object_Declarations. Update the call to Build_Raise_Statement to
	include Abort_Id.
	* exp_ch7.ads (Build_Object_Declarations): Moved from body to spec.
	Add new formal Abort_Id and associated comment on its use.
	(Build_Raise_Statement): Add new formal Abort_Id and associated comment
	on its use.
	* exp_intr.adb (Expand_Unc_Deallocation): New local variable Abort_Id.
	Remove the clunky code to create all flags and objects related to
	exception propagation and replace it with a call to
	Build_Object_Declarations. Update the call to Build_Raise_Statement.

2011-08-03  Eric Botcazou  <ebotcazou@adacore.com>

	* s-tassta.adb: Fix minor typos.

2011-08-03  Robert Dewar  <dewar@adacore.com>

	* rtsfind.ads, makeutl.ads, prj.ads, prj.adb, make.adb,
	lib-writ.adb, makeutl.adb, s-soflin.ads, clean.adb: Minor reformatting.

From-SVN: r177283
2011-08-03 17:08:04 +02:00
Ralf Wildenhues
308e6f3a18 Fix typos in gcc/ada.
gcc/ada/:
	* projects.texi: Fix typos.
	* gnat_rm.texi: Likewise.
	* gnat_ugn.texi: Likewise.
	* sem_util.adb: Fix typo in variable, typos in comments.
	* a-btgbso.adb: Fix typos in comments.
	* a-cbdlli.adb, a-cbhase.ads, a-cdlili.adb, a-cobove.adb,
	a-coinve.adb, a-convec.adb, a-direct.ads, a-strunb-shared.adb,
	a-strunb-shared.ads, a-stuten.ads, a-stwiun-shared.adb,
	a-stwiun-shared.ads, a-stzunb-shared.adb, a-stzunb-shared.ads,
	a-suenco.adb, a-suenst.adb, a-suewst.adb, a-suezst.adb, ali.ads,
	aspects.ads, atree.ads, binde.adb, bindgen.adb, checks.adb,
	checks.ads, einfo.ads, err_vars.ads, errout.adb, errout.ads,
	exp_aggr.adb, exp_attr.adb, exp_cg.adb, exp_ch3.adb,
	exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch7.adb,
	exp_dbug.ads, exp_disp.adb, exp_fixd.ads, freeze.adb,
	g-altive.ads, g-comlin.ads, g-excact.ads, g-mbdira.adb,
	g-sechas.ads, g-sehash.ads, g-sha1.ads, g-sha224.ads,
	g-sha256.ads, g-sha384.ads, g-sha512.ads, g-shsh32.ads,
	g-shsh64.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
	gcc-interface/decl.c, gcc-interface/trans.c,
	gcc-interface/utils2.c, gnat1drv.adb, init.c, inline.adb,
	link.c, locales.c, make.adb, mingw32.h, namet.ads, osint.adb,
	par-ch12.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb,
	par-prag.adb, par.adb, par_sco.adb, prepcomp.adb,
	prj-conf.ads, prj-dect.adb, prj-env.adb, prj-env.ads,
	prj-nmsc.adb, prj-tree.ads, prj-util.ads, prj.adb, prj.ads,
	s-auxdec-vms-alpha.adb, s-auxdec-vms_64.ads, s-oscons-tmplt.c,
	s-osinte-vxworks.ads, s-osprim-mingw.adb, s-regexp.adb,
	s-stusta.adb, s-taprop-mingw.adb, s-taprop-solaris.adb,
	scn.adb, scos.ads, sem.adb, sem_aggr.adb, sem_attr.adb,
	sem_aux.adb, sem_aux.ads, sem_ch12.adb, sem_ch12.ads,
	sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
	sem_ch6.adb, sem_ch7.adb, sem_ch8.adb, sem_disp.adb,
	sem_disp.ads, sem_eval.adb, sem_intr.adb, sem_prag.adb,
	sem_res.adb, sem_scil.adb, sem_util.ads, sem_warn.adb,
	sem_warn.ads, sinfo.ads, socket.c, styleg.adb, switch.ads,
	sysdep.c, tb-alvxw.c, xoscons.adb: Likewise.

From-SVN: r168082
2010-12-20 07:26:57 +00:00
Arnaud Charlet
23b863538f [multiple changes]
2010-10-26  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch5.adb (Analyze_Iteration_Scheme): Diagnose attempt to use thew
	form "for X in A" when A is an array object. This form is only intended
	for containers.
	* sem_eval.adb: Fix reference to non-existing field of type conversion
	node.
	* sem_case.adb (Check_Choices): Improve error reporting for overlapping
	choices in case statements.

2010-10-26  Gary Dismukes  <dismukes@adacore.com>

	* exp_disp.adb (Expand_Interface_Actuals): When expanding an actual for
	a class-wide interface formal that involves applying a displacement
	conversion to the actual, check for the case of calling a build-in-place
	function and handle generation of the implicit BIP parameters (call
	Make_Build_In_Place_Call_In_Anonymous_Context).
	Add with and use of Exp_Ch6.

2010-10-26  Robert Dewar  <dewar@adacore.com>

	* sem_prag.adb, sem_cat.ads: Minor reformatting.

2010-10-26  Sergey Rybin  <rybin@adacore.com>

	* vms_data.ads: Define VMS qualifier for gnatelim '--ignore' option

2010-10-26  Thomas Quinot  <quinot@adacore.com>

	* sem_util.adb (Has_Preelaborable_Initialization.Check_Components):
	For a discriminant, use Discriminant_Default_Value rather than
	Expression (Declaration_Node (D)).

2010-10-26  Geert Bosch  <bosch@adacore.com>

	* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Parameterized
	expressions don't need a spec, even when style checks require
	subprograms to have one.

From-SVN: r165941
2010-10-26 12:51:36 +02:00
Arnaud Charlet
26df19ce4f [multiple changes]
2010-10-22  Robert Dewar  <dewar@adacore.com>

	* par-ch5.adb: Minor reformatting.
	* gcc-interface/Make-lang.in: Update dependencies.

2010-10-22  Robert Dewar  <dewar@adacore.com>

	* a-except.adb, a-except-2005.adb: Add new Rcheck entry.
	* exp_ch13.adb (Add_Call): Make sure subtype is marked with
	Has_Predicates set to True if it inherits predicates.
	* sem_attr.adb: Handle 'First/'Last/'Range for predicated types
	* types.ads (PE_Bad_Attribute_For_Predicate): New reason code
	* types.h: Add new Rcheck entry.
	* einfo.ads, einfo.adb (Static_Predicate): New field.
	Minor code reorganization (file float routines in proper section)
	Fix bad field name in comments.

2010-10-22  Robert Dewar  <dewar@adacore.com>

	* sem_eval.adb (Subtypes_Statically_Compatible): Check null exclusion
	case.

2010-10-22  Vincent Celier  <celier@adacore.com>

	* prj-conf.adb (Get_Config_Switches): Detect if there is at least one
	declaration of IDE'Compiler_Command for one of the language in the main
	project.
	(Do_Autoconf): If there were at least one Compiler_Command declared and
	no target, invoke gprconfig with --target=all instead of the normalized
	host name.

2010-10-22  Robert Dewar  <dewar@adacore.com>

	* par-ch4.adb: Update syntax in comments for Ada 2012.
	* sinfo.ads: Update syntax in comments for Ada 2012
	* par-ch3.adb (Check_Restricted_Expression): Remove "in Ada 2012 mode"
	from msg.

From-SVN: r165822
2010-10-22 12:41:17 +02:00
Robert Dewar
4818e7b9f8 einfo.ads, einfo.adb: Add handling of predicates.
2010-10-21  Robert Dewar  <dewar@adacore.com>

	* einfo.ads, einfo.adb: Add handling of predicates.
	Rework handling of invariants.
	* exp_ch3.adb, exp_ch4.adb, exp_util.adb, sem_ch6.adb: Minor changes to
	handing of invariants.
	* par-prag.adb: Add dummy entry for pragma Predicate
	* sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for
	Predicate aspects.
	* sem_prag.adb: Add implementation of pragma Predicate.
	* snames.ads-tmpl: Add entries for pragma Predicate.

2010-10-21  Robert Dewar  <dewar@adacore.com>

	* elists.adb: Minor reformatting.

From-SVN: r165764
2010-10-21 12:33:36 +02:00
Arnaud Charlet
437f8c1ebe [multiple changes]
2010-10-19  Robert Dewar  <dewar@adacore.com>

	* sem_eval.adb: Minor reformatting.

2010-10-19  Tristan Gingold  <gingold@adacore.com>

	* exp_ch4.adb (Expand_N_And_Op, Expand_N_Or_Op, Expand_N_Xor_Op): Call
	Expand_Intrinsic_Call if the function is intrinsic.
	* exp_intr_adb (Expand_Binary_Operator): Handle VMS case for logical
	binary operator on the unsigned_quadword record.
	* exp_intr.ads (Expand_Intrinsic_Call): Update comments.

2010-10-19  Geert Bosch  <bosch@adacore.com>

	* gnat_rm.texi (pragma Float_Representation): Fix typo.

2010-10-19  Arnaud Charlet  <charlet@adacore.com>

	* switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateE.
	* fe.h (Exception_Extra_Info): Declare.
	* usage.adb (usage): Add -gnateE doc.
	* checks.adb (Install_Null_Excluding_Check): Use better sloc.
	* sem_util.adb (Insert_Explicit_Dereference): Ditto.
	* gnat_ugn.texi: Document -gnateE switch.
	* a-except.adb (Set_Exception_C_Msg): New parameter Column.
	* a-except-2005.adb (Set_Exception_C_Msg): New parameter Column.
	(Raise_Constraint_Error_Msg): Ditto.
	(Image): New helper function.
	(Rcheck_00_Ext, Rcheck_05_Ext, Rcheck_12_Ext): New procedure with more
	detailed exception information.
	Adjust calls to Set_Exception_C_Msg and Raise_Constraint_Error_Msg.
	* a-exexda.adb (Set_Exception_C_Msg): New parameter Column.
	* opt.ads (Exception_Extra_Info): New flag.
	* gcc-interface/utils.c (gnat_raise_decls_ext): New.
	* gcc-interface/utils2.c (build_call_raise_range,
	build_call_raise_column): New functions.
	* gcc-interface/gigi.h (exception_info_kind, gnat_raise_decls_ext,
	build_call_raise_range, build_call_raise_column): Declare.
	gcc-interface/trans.c (build_raise_check): New function.
	(gigi): Initialize gnat_raise_decls_ext.
	(gnat_to_gnu): Add initial support for -gnateE switch.
	* gcc-interface/Make-lang.in: Update dependencies.

From-SVN: r165696
2010-10-19 12:54:58 +02:00
Arnaud Charlet
199c6a1000 [multiple changes]
2010-09-10  Robert Dewar  <dewar@adacore.com>

	* sem_ch4.adb: Minor reformatting.
	* exp_ch6.adb: Add comment on testing limited on full type
	* gnat_rm.texi: Add documentation on Pure_Function.

2010-09-10  Vincent Celier  <celier@adacore.com>

	* prj-nmsc.adb (Add_Source): Allow an Ada source to have the same name
	as a source of another project and of another language.

2010-09-10  Robert Dewar  <dewar@adacore.com>

	* exp_ch3.adb (Expand_N_Object_Declaration): Defend against previous
	errors.
	* freeze.adb (Check_Unsigned_Type): Ditto.
	* sem_aggr.adb (Resolve_Aggr_Expr): Ditto.
	* sem_ch3.adb (Convert_Scalar_Bounds): Ditto.
	(Set_Scalar_Range_For_Subtype): Ditto.
	* sem_eval.adb (Subtypes_Statically_Match): Ditto.

From-SVN: r164170
2010-09-10 15:12:08 +02:00
Robert Dewar
f08b23714f gnatcmd.adb, [...]: Minor reformatting
2010-09-09  Robert Dewar  <dewar@adacore.com>

	* gnatcmd.adb, gnatlink.adb, sem_ch12.adb, sem_eval.adb, sinput-p.adb:
	Minor reformatting

From-SVN: r164099
2010-09-09 15:50:19 +02:00
Arnaud Charlet
4fb0b3f0dd [multiple changes]
2010-09-09  Ed Schonberg  <schonberg@adacore.com>

	* sem_eval.adb (Is_Same_Value): Two occurrences of the same
	discriminant cannot be assumed to be the same value because they may
	refer to bounds of a component of two different instances of a
	discriminated type.

2010-09-09  Gary Dismukes  <dismukes@adacore.com>

	* checks.adb (Apply_Arithmetic_Overflow_Check): When converting the
	operands of an operator to the type of an enclosing conversion, rewrite
	the operator so the conversion can't be flagged as redundant.
	Remove useless assignments to Typ and Rtyp.

2010-09-09  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat_ugn.texi: Fix another long line.

2010-09-09  Bob Duff  <duff@adacore.com>

	* sem_warn.adb (Output_Reference_Error): Don't warn for renames read
	but never assigned.

From-SVN: r164096
2010-09-09 15:44:04 +02:00
Arnaud Charlet
676e842077 [multiple changes]
2010-08-05  Thomas Quinot  <quinot@adacore.com>

	* sem_ch6.adb, gnat1drv.adb, exp_ch6.adb, sem_eval.adb: Minor
	reformatting.

2010-08-05  Steve Baird  <baird@adacore.com>

	* exp_util.adb (Remove_Side_Effects): An access value which designates
	a volatile object of a nonvolatile type is prohibited.
	Do not call Make_Reference to construct a reference to such an object.

From-SVN: r162905
2010-08-05 11:14:19 +02:00
Javier Miranda
b81a5940b4 sem_prag.adb, [...]: Code cleanup...
2010-06-22  Javier Miranda  <miranda@adacore.com>

	* sem_prag.adb, sem_util.adb, sem_util.ads, sem_attr.adb, exp_ch6.adb,
	exp_disp.adb, sem_eval.adb, exp_dist.adb lib-xref.adb: Code cleanup,
	this patch replaces duplication of code that traverses the chain of
	aliased primitives by a call to routine Ultimate_Alias that
	provides this functionality.

From-SVN: r161184
2010-06-22 15:32:54 +02:00
Arnaud Charlet
946db1e20e [multiple changes]
2010-06-22  Robert Dewar  <dewar@adacore.com>

	* sem_ch3.adb, sem_disp.adb: Minor code fixes.
	* sem_eval.adb: Minor reformatting.

2010-06-22  Vincent Celier  <celier@adacore.com>

	* make.adb (Scan_Make_Arg): When invoked with -nostdlib, pass -nostdlib
	to gnatlink, except on Open VMS.
	* osint.adb (Add_Default_Search_Dirs): Do not suppress the default
	object directories if -nostdlib is used.

From-SVN: r161141
2010-06-22 09:41:14 +02:00
Robert Dewar
7ec8363d05 sem_util.adb (Is_Delegate): Put in proper alpha order.
2010-06-22  Robert Dewar  <dewar@adacore.com>

	* sem_util.adb (Is_Delegate): Put in proper alpha order.
	* sem_eval.adb: Minor reformatting.

From-SVN: r161140
2010-06-22 09:32:15 +02:00
Robert Dewar
74e7891f8d g-expect-vms.adb, [...]: Minor reformatting.
2010-06-22  Robert Dewar  <dewar@adacore.com>

	* g-expect-vms.adb, sem_res.adb: Minor reformatting.
	* exp_aggr.adb: Minor comment changes and reformatting.
	* sem_eval.adb (Find_Universal_Operator_Type): Put in proper alpha order
	* sem_util.ads: Add some missing pragma Inline's (efficiency issue only)

From-SVN: r161139
2010-06-22 09:26:02 +02:00
Arnaud Charlet
f0d103851a [multiple changes]
2010-06-22  Gary Dismukes  <dismukes@adacore.com>

	* sem_ch3.adb (Build_Discriminal): Set default scopes for newly created
	discriminals to the current scope.
	* sem_util.adb (Find_Body_Discriminal): Remove setting of discriminal's
	scope, which could overwrite a different already set value.

2010-06-22  Ed Schonberg  <schonberg@adacore.com>

	* sem_res.adb (Valid_Conversion): If expression is a predefined
	operator, use sloc of type of interpretation to improve error message
	when operand is of some derived type.
	* sem_eval.adb (Is_Mixed_Mode_Operand): New function, use it.

2010-06-22  Emmanuel Briot  <briot@adacore.com>

	* g-expect-vms.adb (Expect_Internal): No longer raises an exception, so
	that it can set out parameters as well. When a process has died, reset
	its Input_Fd to Invalid_Fd, so that when using multiple processes we
	can find out which process has died.

From-SVN: r161135
2010-06-22 09:08:23 +02:00
Thomas Quinot
d7567964ea sem_eval.adb (Find_Universal_Operator_Type): New subprogram to identify the operand type of an operator on universal operands...
2010-06-22  Thomas Quinot  <quinot@adacore.com>

	* sem_eval.adb (Find_Universal_Operator_Type): New
	subprogram to identify the operand type of an operator on universal
	operands, when an explicit scope indication is present. Diagnose the
	case where such a call is ambiguous.
	(Eval_Arithmetic_Op, Eval_Relational_Op, Eval_Unary_Op):
	Use the above to identify the operand type so it can be properly frozen.
	* sem_res.adb (Make_Call_Into_Operator): Remove bogus freeze of operand
	type, done in an arbitrary, possibly incorrect type (the presence of
	some numeric type in the scope is checked for legality, but when more
	than one such type is in the scope, we just pick a random one, not
	necessarily the expected one).
	* sem_utils.ads, sem_utils.adb (Is_Universal_Numeric_Type): New utility
	subprogram.

From-SVN: r161134
2010-06-22 09:03:30 +02:00
Arnaud Charlet
ae77c68b39 [multiple changes]
2010-06-22  Robert Dewar  <dewar@adacore.com>

	* sem_eval.adb: Minor reformatting.

2010-06-22  Robert Dewar  <dewar@adacore.com>

	* exp_ch4.adb (Expand_N_Conditional_Expression): Use
	Expression_With_Actions to clean up the code generated when folding
	constant expressions.

2010-06-22  Vincent Celier  <celier@adacore.com>

	* g-expect-vms.adb: Add new subprograms Free, First_Dead_Process and
	Has_Process.

From-SVN: r161132
2010-06-22 08:53:11 +02:00
Arnaud Charlet
602a7ec025 [multiple changes]
2010-06-21  Robert Dewar  <dewar@adacore.com>

	* exp_ch4.adb (Expand_N_Conditional_Expression): Fold if condition
	known at compile time.

2010-06-21  Gary Dismukes  <dismukes@adacore.com>

	* atree.adb: Fix comment typo.

2010-06-21  Ed Schonberg  <schonberg@adacore.com>

	* sem_eval.adb (Test_Ambiguous_Operator): New procedure to check
	whether a universal arithmetic expression in a conversion, which is
	rewritten from a function call with an expanded name, is ambiguous.

2010-06-21  Vincent Celier  <celier@adacore.com>

	* prj-nmsc.adb (Name_Location): New Boolean component Listed, to record
	source files in specified list of sources.
	(Check_Package_Naming): Remove out parameters Bodies and Specs, as they
	are never used.
	(Add_Source): Set the Location of the new source
	(Process_Exceptions_File_Based): Call Add_Source with the Location
	(Get_Sources_From_File): If an exception is found, set its Listed to
	True
	(Find_Sources): When Source_Files is specified, if an exception is
	found, set its Listed to True. Remove any exception that is not in a
	specified list of sources.
	* prj.ads (Source_Data): New component Location

2010-06-21  Vincent Celier  <celier@adacore.com>

	* gnatbind.adb (Closure_Sources): Global table, moved from block.

From-SVN: r161088
2010-06-21 17:24:03 +02:00
Robert Dewar
1cf3727fb9 make.adb, [...]: Minor reformatting.
2010-06-18  Robert Dewar  <dewar@adacore.com>

	* make.adb, sem_cat.adb: Minor reformatting.
	* sem_eval.adb: Fix typos.

From-SVN: r160991
2010-06-18 15:40:56 +02:00
Arnaud Charlet
4d777a7162 [multiple changes]
2010-06-18  Robert Dewar  <dewar@adacore.com>

	* sem_eval.adb (Eval_Conditional_Expression): Result is static if
	condition and both sub-expressions are static (and result is selected
	expression).

2010-06-18  Robert Dewar  <dewar@adacore.com>

	* g-pehage.adb: Minor reformatting

2010-06-18  Pascal Obry  <obry@adacore.com>

	* prj-nmsc.adb (Search_Directories): Insert canonical filenames into
	source hash table.

From-SVN: r160988
2010-06-18 15:08:10 +02:00
Arnaud Charlet
ed2233dc6d par-ch9.adb, [...]: Update comments.
* par-ch9.adb, sem_aggr.adb, sem_ch3.adb, layout.adb, sem_ch4.adb,
	sem_ch5.adb, sem_mech.adb, exp_util.adb, par-ch10.adb, sem_ch6.adb,
	par-ch11.adb, sem_ch7.adb, par-prag.adb, exp_disp.adb, par-ch12.adb,
	sem_ch8.adb, style.adb, sem_ch9.adb, sem_ch10.adb, prep.adb,
	sem_warn.adb, par-util.adb, scng.adb, sem_eval.adb, checks.adb,
	sem_prag.adb, sem_ch12.adb, styleg.adb, sem_ch13.adb, par-ch3.adb,
	par-tchk.adb, freeze.adb, sfn_scan.adb, par-ch4.adb, sem_util.adb,
	sem_res.adb, par-ch5.adb, lib-xref.adb, sem_attr.adb, par-ch6.adb,
	sem_disp.adb, prepcomp.adb, par-ch7.adb, sem_elab.adb, exp_ch4.adb,
	errout.ads: Update comments. Minor reformatting.

From-SVN: r160979
2010-06-18 14:14:52 +02:00
Robert Dewar
19d846a008 checks.adb (Safe_To_Capture_In_Parameter_Value): Deal with case expression (cannot count on a particular branch being executed).
2010-06-18  Robert Dewar  <dewar@adacore.com>

	* checks.adb (Safe_To_Capture_In_Parameter_Value): Deal with case
	expression (cannot count on a particular branch being executed).
	* exp_ch4.adb (Expand_N_Case_Expression): New procedure.
	* exp_ch4.ads (Expand_N_Case_Expression): New procedure.
	* exp_util.adb (Insert_Actions): Deal with proper insertion of actions
	within case expression.
	* expander.adb (Expand): Add call to Expand_N_Case_Expression
	* par-ch4.adb Add calls to P_Case_Expression at appropriate points
	(P_Case_Expression): New procedure
	(P_Case_Expression_Alternative): New procedure
	* par.adb (P_Case_Expression): New procedure
	* par_sco.adb (Process_Decisions): Add dummy place holder entry for
	N_Case_Expression.
	* sem.adb (Analyze): Add call to Analyze_Case_Expression
	* sem_case.ads (Analyze_Choices): Also used for case expressions now,
	this is a documentation change only.
	* sem_ch4.ads, sem_ch4.adb (Analyze_Case_Expression): New procedure.
	* sem_ch6.adb (Fully_Conformant_Expressions): Add handling of case
	expressions.
	* sem_eval.ads, sem_eval.adb (Eval_Case_Expression): New procedure.
	* sem_res.adb (Resolve_Case_Expression): New procedure.
	* sem_scil.adb (Find_SCIL_Node): Add processing for
	N_Case_Expression_Alternative.
	* sinfo.ads, sinfo.adb (N_Case_Expression): New node.
	(N_Case_Expression_Alternative): New node.
	* sprint.adb (Sprint_Node_Actual): Add processing for new nodes
	N_Case_Expression and N_Case_Expression_Alternative.

2010-06-18  Robert Dewar  <dewar@adacore.com>

	* par-ch7.adb, sem_warn.adb, types.ads, par-ch3.adb: Minor reformatting.
	* gnat1drv.adb: Fix typo.

2010-06-18  Robert Dewar  <dewar@adacore.com>

	* par-prag.adb (Prag, case Style_Checks): All_Checks sets gnat style
	for -gnatg.
	* sem_prag.adb (Analyze_Pragma, case Style_Checks): All_Checks sets
	gnat style for -gnatg.
	* gnat_rm.texi: Add documentation for ALL_CHECKS in GNAT mode.

From-SVN: r160971
2010-06-18 11:41:49 +02:00
Arnaud Charlet
305caf424d [multiple changes]
2010-06-18  Thomas Quinot  <quinot@adacore.com>

	* sem_eval.adb (Test_In_Range): New subprogram, factoring duplicated
	code between...
	(Is_In_Range, Is_Out_Of_Range): Reimplement in terms of call to
	Test_In_Range.

2010-06-18  Robert Dewar  <dewar@adacore.com>

	* sprint.adb: Minor change in output format for expression wi actions.
	* par-ch3.adb: Minor code reorganization.  Minor reformatting.
	* sem_ch5.adb: Minor comment fix.

2010-06-18  Robert Dewar  <dewar@adacore.com>

	* debug.adb: New debug flag -gnatd.L to control
	Back_End_Handles_Limited_Types.
	* exp_ch4.adb (Expand_N_Conditional_Expression): Let back end handle
	limited case if Back_End_Handles_Limited_Types is True.
	(Expand_N_Conditional_Expression): Use N_Expression_With_Actions to
	simplify expansion if Use_Expression_With_Actions is True.
	* gnat1drv.adb (Adjust_Global_Switches): Set
	Back_End_Handles_Limited_Types.
	* opt.ads (Back_End_Handles_Limited_Types): New flag.

2010-06-18  Ed Schonberg  <schonberg@adacore.com>

	* sem_res.adb (Rewrite_Operator_As_Call): Do not rewrite user-defined
	intrinsic operator if expansion is not enabled, because in an
	instantiation the original operator must be present to verify the
	legality of the operation.

From-SVN: r160969
2010-06-18 11:28:45 +02:00
Arnaud Charlet
22cb89b5d6 [multiple changes]
2010-06-18  Ed Schonberg  <schonberg@adacore.com>

	* exp_util.adb (Make_Subtype_From_Expr): If the unconstrained type is
	the class-wide type for a private extension, and the completion is a
	subtype, set the type of the class-wide type to the base type of the
	full view.

2010-06-18  Robert Dewar  <dewar@adacore.com>

	* g-socket.ads, sem_aggr.adb, einfo.ads, sem_elim.adb,
	sem_intr.adb, sem_eval.adb: Minor reformatting

2010-06-18  Ed Schonberg  <schonberg@adacore.com>

	* sem_type.adb (Is_Ancestor): If either type is private, examine full
	view.

From-SVN: r160966
2010-06-18 11:05:37 +02:00
Robert Dewar
8a95f4e867 sem_intr.adb, [...]: Minor reformatting.
2010-06-17  Robert Dewar  <dewar@adacore.com>

	* sem_intr.adb, sem_prag.adb, sem_res.adb, sem_type.adb, sem_util.adb,
	sem_warn.adb, sem_eval.adb: Minor reformatting.  Use Ekind_In.
	(Set_Slice_Subtype): Explicitly freeze the slice's itype at the point
	where the slice's actions are inserted.
	(Decompose_Expr): Account for possible rewriting of slice bounds
	resulting from side effects suppression caused by the above freezing,
	so that folding of bounds is preserved by such rewriting.

2010-06-17  Robert Dewar  <dewar@adacore.com>

	* einfo.ads, einfo.adb (Get_Record_Representation_Clause): New function.
	* freeze.adb (Freeze_Record_Type): Add call to
	Check_Record_Representation_Clause.
	* sem_ch13.adb (Check_Record_Representation_Clause): New function
	(Analyze_Record_Representation_Clause): Split out overlap code into this
	new function.
	(Check_Component_Overlap): Moved inside
	Check_Record_Representation_Clause.
	* sem_ch13.ads (Check_Record_Representation_Clause): New function.

From-SVN: r160892
2010-06-17 11:57:32 +02:00
Arnaud Charlet
e1b871e93c [multiple changes]
2010-06-17  Robert Dewar  <dewar@adacore.com>

	* back_end.adb, sem_res.adb, switch-c.adb, sem_scil.adb: Minor
	reformatting.
	* sem_attr.adb, sem_cat.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb,
	sem_eval.adb: Use Ekind_In

2010-06-17  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch8.adb: better error message for illegal inherited discriminant

2010-06-17  Vincent Celier  <celier@adacore.com>

	* bindusg.adb: Remove lines for -A and -C
	* gnat_ugn.texi: Remove all documentation and examples of switches -A
	and -C for gnatbind and gnatlink.
	* gnatlink.adb (Usage): Remove lines for -A and -C
	* switch-b.adb (Scan_Binder_Switches): Issue warning when switch -C is
	specified.
	* gcc-interface/Make-lang.in: Update dependencies.

From-SVN: r160891
2010-06-17 11:32:20 +02:00
Arnaud Charlet
001c7783c4 [multiple changes]
2010-06-14  Ed Schonberg  <schonberg@adacore.com>

	* sem_util (Is_VMS_Operator): New predicate to determine whether an
	operator is an intrinsic operator declared in the DEC system extension.
	* sem_res.adb (Resolve_Logical_Op): operation is legal on signed types
	if the operator is a VMS intrinsic.
	* sem_eval.adb (Eval_Logical_Op): Operation is legal and be
	constant-folded if the operands are signed and the operator is a VMS
	intrinsic.

2010-06-14  Robert Dewar  <dewar@adacore.com>

	* g-socket.adb, gnatcmd.adb: Minor reformatting

From-SVN: r160734
2010-06-14 14:51:24 +02:00
Robert Dewar
9dbf1c3e7f par_sco.adb (Traverse_Declarations_Or_Statments): Implement new format of statement sequence SCO entries (one location/statement).
2010-01-26  Robert Dewar  <dewar@adacore.com>

	* par_sco.adb (Traverse_Declarations_Or_Statments): Implement new
	format of statement sequence SCO entries (one location/statement).
	* put_scos.adb (Put_SCOs): Implement new format of CS lines
	* scos.ads: Update comments.
	* sem_eval.adb: Minor reformatting.

From-SVN: r156242
2010-01-26 11:30:04 +01:00
Arnaud Charlet
ebd34478e3 [multiple changes]
2010-01-26  Robert Dewar  <dewar@adacore.com>

	* s-commun.ads, s-osprim-mingw.adb, s-stchop-vxworks.adb, sem_aggr.adb,
	s-vxwext.adb, sem_ch10.adb, sem_eval.adb, sem_prag.adb: Minor
	reformatting.

2010-01-26  Vasiliy Fofanov  <fofanov@adacore.com>

	* g-regist.adb, g-regist.ads (For_Every_Key): New generic procedure
	that allows to iterate over all subkeys of a key.

2010-01-26  Ed Falis  <falis@adacore.com>

	* sysdep.c: enable NFS for VxWorks MILS
	* env.c: enable __gnat_environ for VxWorks MILS
	* gcc-interface/Makefile.in: Add VxWorks MILS target pairs.

From-SVN: r156233
2010-01-26 10:42:04 +01:00
Arnaud Charlet
d610088df8 [multiple changes]
2010-01-25  Ed Schonberg  <schonberg@adacore.com>

	* sem_aggr.adb (Resolve_Array_Aggregate): If the bounds in a choice
	have errors, do not continue resolution of the aggregate.
	* sem_eval.adb (Eval_Indexed_Component): Do not attempt to evaluate if
	the array type indicates an error.

2010-01-25  Bob Duff  <duff@adacore.com>

	* sinfo.ads: Minor comment fixes.

From-SVN: r156212
2010-01-25 15:53:51 +01:00
Samuel Tardieu
fdfea49e45 sem_eval.adb: Give a more precise error message.
gcc/ada/
	* sem_eval.adb: Give a more precise error message.

From-SVN: r152619
2009-10-10 14:52:18 +00:00
Ed Schonberg
57036dccfc [multiple changes]
2009-07-27  Ed Schonberg  <schonberg@adacore.com>

	* sem_eval.adb (Compile_Time_Compare): More precise handling of
	Known_Valid flag, to prevent spurious range deductions when scalar
	variables may be uninitialized. New predicate Is_Known_Valid_Operand.

2009-07-27  Robert Dewar  <dewar@adacore.com>

	* sem.adb: Minor reformatting

From-SVN: r150118
2009-07-27 15:49:46 +02:00
Arnaud Charlet
75ba322d4b [multiple changes]
2009-07-27  Robert Dewar  <dewar@adacore.com>

	* exp_ch6.adb (Expand_Call): Reset Is_Known_Valid after call

	* sem_ch3.adb, sem_eval.adb, sem_aux.adb: Minor comment reformatting

2009-07-27  Geert Bosch  <bosch@adacore.com>

	* checks.adb (Find_Check): Minor streamlining of logic.
	* gnat1drv.adb(Gnat1drv): Put Check_Rep_Info in its alphabetical order.
	* debug.adb: Document -gnatdX debug flag
	* exp_ch2.adb(Expand_Entity_Reference): Implement new -gnatdX flag to
	list information about reads from scalar entities.
	Also slightly simplify condition for Expand_Current_Value.
	* sem_util.ads, sem_util.adb (Is_LHS, Is_Actual_Out_Parameter): New
	functions.

From-SVN: r150110
2009-07-27 15:20:37 +02:00
Arnaud Charlet
e27b834be0 [multiple changes]
2009-07-23  Ed Schonberg  <schonberg@adacore.com>

	* sem.adb (Do_Unit_And_Dependents): Now that specs and bodies are not
	done at the same time, guard against listing a body more than once.

2009-07-23  Robert Dewar  <dewar@adacore.com>

	* exp_ch6.adb: Minor reformatting

2009-07-23  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch3.adb (Analyze_Object_Declaration): A scalar constant with a
	static expression is known valid.
	* sem_eval.adb (Compile_Time_Compare): Handle properly non-static
	operands of a subtype with a single value.

From-SVN: r150009
2009-07-23 15:04:33 +02:00
Arnaud Charlet
1d1bd8ad31 [multiple changes]
2009-07-22  Robert Dewar  <dewar@adacore.com>

	* exp_tss.ads, sem_eval.adb: Minor reformatting

2009-07-22  Bob Duff  <duff@adacore.com>

	* exp_dist.adb, exp_dist.ads: Update comments.

From-SVN: r149933
2009-07-22 15:24:46 +02:00
Arnaud Charlet
09494c325c [multiple changes]
2009-07-22  Brett Porter  <porter@adacore.com>

	* init.c (__gnat_init_float): For SPE, set bits in SPEFSCR instead of
	FPSCR.
	* sysdep.c (__gnat_get_task_options): Set task option enabling SPE.

2009-07-22  Gary Dismukes  <dismukes@adacore.com>

	* exp_ch5.adb, sem_util.adb, sem_attr.adb, exp_dbug.ads, exp_ch2.adb,
	exp_tss.ads, exp_ch4.adb, sem_ch4.adb: Correct spelling error.
	Minor reformatting.
	* sem_res.adb (Resolve_Explicit_Dereference): Reword one comment that
	used poor terminology.

2009-07-22  Robert Dewar  <dewar@adacore.com>

	* freeze.adb, sem_ch3.adb, sem_prag.adb: Minor reformatting
	* sem_eval.adb, exp_tss.adb: Minor comment update.
	* stylesw.adb: Code clean up.

From-SVN: r149932
2009-07-22 15:16:44 +02:00
Arnaud Charlet
514d0fc530 [multiple changes]
2009-07-10  Arnaud Charlet  <charlet@adacore.com>

	* i-cexten.ads (bool): New type.

2009-07-10  Robert Dewar  <dewar@adacore.com>

	* sinfo.ads (N_Short_Circuit): New definition
	
	* sem_ch13.adb, sem_ch6.adb, sem_eval.adb, sem_res.adb,
	treepr.adb: Minor code reorganization (use N_Short_Circuit)

From-SVN: r149467
2009-07-10 11:36:00 +02:00
Gary Dismukes
d79e621af2 checks.adb (Generate_Range_Check): Replace type conversions with unchecked conversions to support the case of...
2009-07-07  Gary Dismukes  <dismukes@adacore.com>

	* checks.adb (Generate_Range_Check): Replace type conversions with
	unchecked conversions to support the case of performing range checks
	on Enum'Val (permits integer values to be converted to enumeration).

	* exp_attr.adb (Expand_N_Attribute_Reference, cases Attribute_Pred,
	Attribute_Succ): Set Do_Range_Check to False before calling
	Expand_Pred_Succ, to prevent gigi from generating any range checks.
	(Expand_N_Attribute_Reference, case Attribute_Val):
	Generate a range check when needed (and set Do_Range_Check to False).

	* exp_ch3.adb (Expand_N_Object_Declaration): Generate a range check on
	scalar object initialization if needed.

	* exp_ch4.adb (Expand_Allocator_Expression): Generate range checks
	when needed on scalar allocators.
	(Expand_N_Qualified_Expression): Generate range check when needed.
	(Expand_N_Slice): Remove call to Enable_Range_Check on slice ranges.
	Checks on slice ranges handled in Resolve_Slice.

	* exp_ch5.adb (Expand_N_Assignment_Statement): Generate a range check,
	when needed, for all scalar assignments, not just discrete.
	(Expand_Simple_Function_Return): Resolve the conversion created for a
	scalar function return so that the conversion will get expanded to
	generate a possible constraint check.

	* exp_ch6.adb (Expand_Actuals): Call Add_Call_By_Copy_Code for out and
	in out scalar actuals when subtypes don't match, to ensure generation
	of return checks (and set Do_Range_Check to False).
	(Expand_Call): Uncomment code to perform range checks, but make it apply
	only to in and in out parameters (checks on parameter returns are
	handled in Expand_Actuals). If a scalar actual for a call to a derived
	subprogram is marked as needing a range check, peform it here (and set
	Do_Range_Check to False).

	* sem_aggr.adb (Resolve_*_Aggregate.Resolve_Aggr_Expr): Generate a
	range check on scalar component associations when needed.

	* sem_eval.adb (In_Subrange_Of): Return False when the first type has
	infinities but the second type does not, as these aren't compatible
	floating-point types.

	* sem_res.adb (Resolve_Slice): In the case where the prefix of the
	slice is itself a slice, pick up the Etype of the prefix. This handles
	the case where the prefix was an Image attribute expanded to a slice,
	and ensures that we get the subtype with the slice constraint rather
	than the unconstrained subbtype of the 'Image.

From-SVN: r149318
2009-07-07 12:52:14 +02:00
Arnaud Charlet
f61580d461 [multiple changes]
2009-06-22  Jose Ruiz  <ruiz@adacore.com>

	* sysdep.c (__gnat_localtime_tzoff for RTX):
	SystemTimeToTzSpecificLocalTime is not supported by RTX. Use
	GetTimeZoneInformation instead.

2009-06-22  Robert Dewar  <dewar@adacore.com>

	* sem_res.adb (Check_No_Direct_Boolean_Operators): New procedure

2009-06-22  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch12.adb (Collect_Previous_Instances): Do not collect
	instantiations declared in a previous generic package body.

2009-06-22  Robert Dewar  <dewar@adacore.com>

	* gnat_rm.texi: Add doc that X=True and X=False is allowed for the
	restriction No_Direct_Boolean_Operators.

2009-06-22  Thomas Quinot  <quinot@adacore.com>

	* bindusg.adb: Minor fixes to gnatbind usage message

	* sem_eval.adb: Minor reformatting

From-SVN: r148794
2009-06-22 15:28:59 +02:00
Arnaud Charlet
93c3fca75e [multiple changes]
2009-06-19  Eric Botcazou  <ebotcazou@adacore.com>

	* einfo.ads (Handling of Type'Size Values): Fix Object_Size values.

2009-06-19  Robert Dewar  <dewar@adacore.com>

	* a-nudira.adb (Need_64): Handle negative ranges and also dynamic
	ranges

	* checks.adb (Determine_Range): Move the test for generic types later.

	* sem_eval.adb (Compile_Time_Compare): Improve circuitry to catch more
	cases.
	(Eval_Relational_Op): Fold more cases including string compares

	* sem_util.ads, sem_util.adb (References_Generic_Formal_Type): New
	function.

From-SVN: r148697
2009-06-19 12:59:04 +02:00
Robert Dewar
af02a866e6 sem_attr.adb (Eval_Attribute, [...]): Catch more cases where this attribute can be evaluated at compile time.
2009-04-20  Robert Dewar  <dewar@adacore.com>

	* sem_attr.adb (Eval_Attribute, case Length): Catch more cases where
	this attribute can be evaluated at compile time.
	(Eval_Attribute, case Range_Length): Same improvement

	* sem_eval.ads, sem_eval.adb (Compile_Time_Compare): New procedure

From-SVN: r146420
2009-04-20 15:28:50 +02:00
Arnaud Charlet
9fbb3ae64a [multiple changes]
2009-04-16  Robert Dewar  <dewar@adacore.com>

	* g-pehage.adb: Minor reformatting

	* sem_ch12.adb: Minor reformatting

	* exp_dist.adb: Minor reformatting

	* bindgen.adb: Minor style fixes.

2009-04-16  Ed Schonberg  <schonberg@adacore.com>

	* sem_eval.adb (Eval_Indexed_Component): Extend constant-folding of
	indexed components to the case where the prefix is a static string
	literal.

2009-04-16  Javier Miranda  <miranda@adacore.com>

	* exp_ch3.adb (Expand_N_Object_Declaration): In case of build-in-place
	objects avoid any further expansion of the expression initializing the
	object.

From-SVN: r146189
2009-04-16 15:19:37 +02:00
Arnaud Charlet
bafc9e1d98 [multiple changes]
2009-04-15  Robert Dewar  <dewar@adacore.com>

	* sem_eval.adb (Get_Static_Length): Go to origin node for array bounds
	in case they were rewritten by expander (Force_Evaluation).

	* targparm.adb (Get_Target_Parameters): Correct check for
	Suppress_Exception_Locations.

2009-04-15  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch6.adb (Expand_Inlined_Call): If an in-parameter in a call to be
	inlined  is of an array type that is not bit-packed, use a renaming
	declaration to capture its value, rather than a constant declaration.

From-SVN: r146104
2009-04-15 14:18:14 +02:00
Thomas Quinot
3996951a3e sem_eval.adb: Minor reformatting
2009-04-10  Thomas Quinot  <quinot@adacore.com>

	* sem_eval.adb: Minor reformatting

From-SVN: r145894
2009-04-10 15:10:46 +02:00
Robert Dewar
a4100e5582 sem_aggr.adb, [...]: Reorganize einfo/sem_aux, moving routines from einfo to sem_aux
2009-04-09  Robert Dewar  <dewar@adacore.com>

	* sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, exp_atag.adb, layout.adb,
	sem_dist.adb, exp_ch7.adb, sem_ch5.adb, sem_type.adb, exp_imgv.adb,
	exp_util.adb, sem_aux.adb, sem_aux.ads, exp_attr.adb, exp_ch9.adb,
	sem_ch7.adb, inline.adb, fe.h, sem_ch9.adb, exp_code.adb, einfo.adb,
	einfo.ads, exp_pakd.adb, checks.adb, sem_ch12.adb, exp_smem.adb,
	tbuild.adb, freeze.adb, sem_util.adb, sem_res.adb, sem_attr.adb,
	exp_dbug.adb, sem_case.adb, exp_tss.adb, exp_ch4.adb, exp_ch6.adb,
	sem_smem.adb, sem_ch4.adb, sem_mech.adb, sem_ch6.adb, exp_disp.adb,
	sem_ch8.adb, exp_aggr.adb, sem_eval.adb, sem_cat.adb, exp_dist.adb,
	sem_ch13.adb, exp_strm.adb, lib-xref.adb, sem_disp.adb, exp_ch3.adb:
	Reorganize einfo/sem_aux, moving routines from einfo to sem_aux

From-SVN: r145820
2009-04-09 12:27:10 +02:00
Arnaud Charlet
3d5952be50 [multiple changes]
2009-04-08  Robert Dewar  <dewar@adacore.com>

	* checks.adb (Enable_Overflow_Check): Do not enable if overflow checks
	suppressed.
	
	* exp_ch4.adb (Expand_Concatenate): Make sure checks are off for all
	resolution steps.

2009-04-08  Robert Dewar  <dewar@adacore.com>

	* sem_ch12.adb (Analyze_Package_Instantiation): Remove test for
	No_Local_Allocators restriction preventing local instantiation.

2009-04-08  Thomas Quinot  <quinot@adacore.com>

	* sem_eval.adb: Minor comment fix

2009-04-08  Thomas Quinot  <quinot@adacore.com>

	* g-socket.adb, g-socket.ads (GNAT.Sockets.Sockets_Library_Controller):
	New limited controlled type used to automate the initialization and
	finalization of the sockets implementation.
	(GNAT.Sockets.Initialize, Finalize): Make these no-ops

2009-04-08  Vincent Celier  <celier@adacore.com>

	* prj-attr.adb: New read-only project-level attribute Project_Dir

	* prj-proc.adb (Add_Attributes): New parameter Project_Dir, value of
	read-only attribute of the same name.
	(Process_Declarative_Items): Call Add_Attributes with Project_Dir
	(Recursive_Process): Ditto

	* snames.adb: Add new standard name Project_Dir

	* snames.ads: Add new standard name Project_Dir

From-SVN: r145766
2009-04-08 20:03:10 +02:00
Robert Dewar
c27f2f15fd checks.adb: Remove Assume_Valid parameter from In_Subrange_Of calls
2009-04-07  Robert Dewar  <dewar@adacore.com>

	* checks.adb:
	Remove Assume_Valid parameter from In_Subrange_Of calls
	
	* sem_eval.adb:
	(Is_Subrange_Of): Remove Assume_Valid parameter, not needed
	(Is_In_Range): Remove incorrect use of Assume_Valid
	(Is_Out_Of_Range): Remove incorrect use of Assume_Valid
	
	* sem_eval.ads:
	(Is_Subrange_Of): Remove Assume_Valid parameter, not needed
	(Is_In_Range): Documentation cleanup
	(Is_Out_Of_Range): Documentation cleanup

	* gnat_rm.texi:
	Add documentation for Assume_No_Invalid_Values pragma

	* sem_ch12.adb: Minor reformatting

	* sem_ch6.adb: (Check_Conformance): Avoid cascaded errors

	* sem_prag.adb: Improve error message.

	* gnatchop.adb, osint.ads, sinput.adb, sinput.ads, styleg.adb:
	LF/CR no longer recognized as line terminator

	* switch.ads: Minor documentation improvement

	* vms_data.ads: Minor reformatting

From-SVN: r145675
2009-04-07 16:18:13 +02:00
Robert Dewar
c800f86287 checks.adb (Determine_Range): Add Assume_Valid parameter
2009-04-07  Robert Dewar  <dewar@adacore.com>

	* checks.adb (Determine_Range): Add Assume_Valid parameter
	
	* checks.ads (Determine_Range): Add Assume_Valid parameter
	
	* errout.adb (Error_Msg_NEL): Use Suppress_Loop_Warnings rather than
	 Is_Null_Loop to suppress warnings in a loop body.
	
	* exp_ch4.adb:
	(Rewrite_Comparison): Major rewrite to accomodate invalid values
	
	* exp_ch5.adb:
	(Expand_N_Loop_Statement): Delete loop known not to execute
	
	* opt.ads:
	(Assume_No_Invalid_Values): Now set to False, and as documented, this
	 fully enables the proper handling of invalid values.
	
	* sem_attr.adb:
	New calling sequence for Is_In_Range
	
	* sem_ch5.adb:
	(Analyze_Iteration_Scheme): Accomodate possible invalid values
	 in determining if a loop range is null.
	
	* sem_eval.adb:
	(Is_In_Range): Add Assume_Valid parameter
	(Is_Out_Of_Range): Add Assume_Valid_Parameter
	(Compile_Time_Compare): Major rewrite to accomodate invalid values and
	 also to do more accurate and complete range analysis, catching more
	 cases.
	
	* sem_eval.ads:
	(Is_In_Range): Add Assume_Valid parameter
	(Is_Out_Of_Range): Add Assume_Valid_Parameter
	
	* sem_util.adb:
	New calling sequence for Is_In_Range
	
	* sinfo.adb:
	(Suppress_Loop_Warnings): New flag
	
	* sinfo.ads:
	(Is_Null_Loop): Update documentation
	(Suppress_Loop_Warnings): New flag
	
	* gnat_ugn.texi: Document -gnatB switch

From-SVN: r145672
2009-04-07 15:55:31 +02:00