Commit Graph

72 Commits

Author SHA1 Message Date
Arnaud Charlet
56812278e8 [multiple changes]
2011-08-31  Jose Ruiz  <ruiz@adacore.com>

	* s-taprop-linux.adb (Set_Task_Affinity): Avoid the use of anonymous
	access types.
	* affinity.c (__gnat_set_affinity_mask): Declare index variable.

2011-08-31  Yannick Moy  <moy@adacore.com>

	* sem_ch8.adb (Analyze_Subprogram_Renaming): Refine expander test in
	full-expander test.
	Minor reformatting, renaming ALFA in Alfa (we dropped acronym)
	* einfo.adb (Primitive_Operations): Correctly return list of primitive
	operations in a case where it returned previously No_Elist.

From-SVN: r178358
2011-08-31 10:43:42 +02:00
Javier Miranda
dd54644b31 sem_ch3.adb (Check_Abstract_Overriding): Code cleanup...
2011-08-30  Javier Miranda  <miranda@adacore.com>

	* sem_ch3.adb (Check_Abstract_Overriding): Code cleanup: replace code
	which emits an error by a call to a new routine which report the error.
	* exp_ch9.adb (Build_Wrapper_Spec): Build the wrapper even if the
	entity does not cover an existing interface.
	* errout.ads, errout.adb (Error_Msg_PT): New routine. Used to factorize
	code.
	* sem_ch6.adb (Check_Conformance): Add specific error for wrappers of
	protected procedures or entries whose mode is not conformant.
	(Check_Synchronized_Overriding): Code cleanup: replace code which emits
	an error by a call to a new routine which report the error.

From-SVN: r178306
2011-08-30 15:50:19 +02:00
Arnaud Charlet
59e6b23c68 [multiple changes]
2011-08-29  Yannick Moy  <moy@adacore.com>

	* exp_ch13.adb (Expand_N_Freeze_Entity): Do nothing in Alfa mode.
	* exp_ch9.adb: Do not expand tasking constructs in Alfa mode.
	* gnat1drv.adb (Adjust_Global_Switches): Suppress the expansion of
	tagged types and dispatching calls in Alfa mode.

2011-08-29  Javier Miranda  <miranda@adacore.com>

	* sem_ch3.adb (Process_Discriminants): Add missing check to ensure that
	we do not report an error on an Empty node.

2011-08-29  Geert Bosch  <bosch@adacore.com>

	* Makefile.rtl (GNATRTL_NONTASKING_OBJECTS): Add a-nllrar.o,
	a-nlrear.o and a-nurear.o.

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

	* freeze.adb: Minor code reorganization.
	Minor reformatting.
	* sem_util.adb, errout.adb, exp_ch11.adb, a-ngrear.adb, s-gearop.adb,
	sem_ch6.adb: Minor reformatting

2011-08-29  Tristan Gingold  <gingold@adacore.com>

	* s-except.ads, s-except.adb: Provide dummy body.

2011-08-29  Yannick Moy  <moy@adacore.com>

	* sem_warn.adb (Within_Postcondition): Take into account the case of
	an Ensures component in a Test_Case.

From-SVN: r178222
2011-08-29 15:21:45 +02:00
Arnaud Charlet
25ebc08558 [multiple changes]
2011-08-29  Tristan Gingold  <gingold@adacore.com>

	* a-exstat.adb (String_To_EO): Do no set Cleanup_Flag.
	* a-exexda.adb (Set_Exception_C_Msg): Ditto.
	(Set_Exception_Msg): Ditto.
	* a-exexpr-gcc.adb (Setup_Current_Excep): Ditto.  Do not set
	Private_Data.
	* a-except.adb, a-except-2005.adb (Save_Occurrence_No_Private): Remove.
	Use Save_Occurrence instead of Save_Occurrence_No_Private.
	(Raise_With_Msg): Remove Cleanup_Flag.
	* a-except.ads, a-except-2005.ads (Exception_Occurrence): Remove
	Clean_Flag and Private_Data components.

2011-08-29  Yannick Moy  <moy@adacore.com>

	* freeze.adb (Freeze_Record_Type): Ignore packing in Alfa mode, like
	in CodePeer mode.
	* sem_ch3.adb (Signed_Integer_Type_Declaration): Correct the generation
	of an explicitly declared type, so that the base types of the original
	type and this generated type are the same, and a "type" (not a subtype
	like previously).
	* errout.adb (Special_Msg_Delete): Do not issue messages "Size too
	small" in Alfa mode, like in CodePeer mode.
	* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ignore rep
	clauses in Alfa mode.

2011-08-29  Javier Miranda  <miranda@adacore.com>

	* exp_ch6.ads, exp_ch6.adb (Is_Null_Procedure): Move the spec of this
	function to the package spec.
	* sem_ch6.adb (Find_Corresponding_Spec, New_Overloaded_Entity): For
	internally generated bodies of null procedures locate the internally
	generated spec enforcing mode conformance.
	(Is_Interface_Conformant): Ensure that the controlling formal of the
	primitives match.

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

	* sem_prag.adb (Analyze_Pragma, case Inline): In an instance, do not
	reject the pragma if it appears to apply to a formal subprogram.

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

	* exp_ch4.adb (Expand_Allocator_Expression): Use consistent name for
	inner expression, to prevent double evaluation.

From-SVN: r178216
2011-08-29 14:52:57 +02:00
Robert Dewar
e917aec294 sem_aggr.adb, [...]: Minor reformatting
2011-08-03  Robert Dewar  <dewar@adacore.com>

	* sem_aggr.adb, sem_ch3.adb, lib.ads, gnatcmd.adb, prj-proc.adb,
	make.adb, lib-writ.adb, prj-part.adb, prj-part.ads, prj-ext.adb,
	fname-uf.adb, prj-ext.ads, prj.adb, prj.ads, sem_attr.adb, alfa.adb,
	prj-makr.adb, errout.adb, makeutl.adb, makeutl.ads, restrict.ads,
	sem_ch6.adb, g-pehage.adb, clean.adb, put_alfa.adb, lib-xref-alfa.adb,
	prj-nmsc.adb, prj-nmsc.ads, sem_ch8.adb, prj-pars.ads, exp_aggr.adb,
	prj-attr.ads, sem_ch13.adb, get_alfa.adb, prj-env.adb, prj-env.ads,
	alfa_test.adb, prj-tree.adb, prj-tree.ads, einfo.ads: Minor reformatting

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

	* repinfo.adb (List_Mechanism): Add handling of
	Convention_Ada_Pass_By_XXX.
	* sem_mech.adb (Set_Mechanism): Ditto.
	* sem_prag.adb (Process_Convention): Add entries for
	Convention_Ada_Pass_By_XXX.
	* snames.adb-tmpl, snames.ads-tmpl: Ditto.

From-SVN: r177252
2011-08-03 11:47:07 +02:00
Arnaud Charlet
4ee646da94 [multiple changes]
2011-08-03  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb: guard against error nodes in return statements.

2011-08-03  Arnaud Charlet  <charlet@adacore.com>

	* errout.adb (Error_Msg_Internal): the main unit has not been read yet,
	a warning can only appear on a configuration file, so emit warning
	without further checks.

2011-08-03  Arnaud Charlet  <charlet@adacore.com>

	* s-interr.ads: add overriding keyword.

2011-08-03  Geert Bosch  <bosch@adacore.com>

	* exp_attr.adb: Fix minor typo.

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

	* par-ch4.adb: improve error recovery.

From-SVN: r177245
2011-08-03 11:26:00 +02:00
Yannick Moy
2ba431e53e sem_aggr.adb, [...]: cleanup of SPARK mode
2011-08-02  Yannick Moy  <moy@adacore.com>

	* sem_aggr.adb, err_vars.ads, sem_ch3.adb, sem_ch5.adb, sem_ch9.adb,
	debug.adb, sem_util.adb, sem_res.adb, sem_attr.adb, gnat1drv.adb,
	errout.adb, errout.ads, exp_ch6.adb, sem_ch4.adb, restrict.adb,
	restrict.ads, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb,
	opt.ads: cleanup of SPARK mode

From-SVN: r177175
2011-08-02 17:10:17 +02:00
Yannick Moy
4c60de0c97 errout.adb (First_Node): minor renaming
2011-08-02  Yannick Moy  <moy@adacore.com>

	* errout.adb (First_Node): minor renaming
	* restrict.adb (Check_Formal_Restriction): put restriction warning on
	first node.

From-SVN: r177155
2011-08-02 15:46:38 +02:00
Arnaud Charlet
f5afb270e6 [multiple changes]
2011-08-02  Yannick Moy  <moy@adacore.com>

	* sem_res.adb (Resolve_Logical_Op): ensure N is a binary operator
	before accessing operands.
	* sem_util.adb (Is_SPARK_Initialization_Expr): follow original nodes to
	decide whether an initialization expression respects SPARK rules, as
	the plain node is the expanded one. This allows for more valid warnings
	to be issued.
	* gnat_rm.texi: Minor update.

2011-08-02  Arnaud Charlet  <charlet@adacore.com>

	* sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Revert
	previous change.

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

	* sem_ch3.adb, sem_ch4.adb: Minor reformatting.

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

	* exp_ch5.adb (Expand_Iterator_Loop): Reformatting. Wrap the original
	loop statements and the element renaming declaration with a block when
	the element type is controlled.

2011-08-02  Yannick Moy  <moy@adacore.com>

	* sinfo.ads: Minor formatting.

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

	* sem_aggr.adb (Add_Association): if the association has a box and no
	expression, use the Sloc of the aggregate itself for the new
	association.
	* errout.adb (First_Node): Exclude nodes with no Sloc, and always use
	the Original_Node.

From-SVN: r177153
2011-08-02 15:43:04 +02:00
Arnaud Charlet
db72f10a75 [multiple changes]
2011-08-02  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and refactoring.
	When a container is provided via a function call, generate a renaming
	of the function result. This avoids the creation of a transient scope
	and the premature finalization of the container.
	* exp_ch7.adb (Is_Container_Cursor): Removed.
	(Wrap_Transient_Declaration): Remove the supression of the finalization
	of the list controller when the declaration denotes a container cursor,
	it is not needed.

2011-08-02  Yannick Moy  <moy@adacore.com>

	* restrict.adb (Check_Formal_Restriction): only issue a warning if the
	node is from source, instead of the original node being from source.
	* sem_aggr.adb
	(Resolve_Array_Aggregate): refine the check for a static expression, to
	recognize also static ranges
	* sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration,
	Array_Type_Declaration): postpone the test for the type being a subtype
	mark after the type has been resolved, so that component-selection and
	expanded-name are discriminated.
	(Make_Index, Process_Range_Expr_In_Decl): add a parameter In_Iter_Schm
	to distinguish the case of an iteration scheme, so that an error is
	issed on a non-static range in SPARK except in an iteration scheme.
	* sem_ch5.adb (Analyze_Iteration_Scheme): call Make_Index with
	In_Iter_Schm = True.
	* sem_ch6.adb (Analyze_Subprogram_Specification): refine the check for
	user-defined operators so that they are allowed in renaming
	* sem_ch8.adb
	(Find_Selected_Component): refine the check for prefixing of operators
	so that they are allowed in renaming. Move the checks for restrictions
	on selector name after analysis discriminated between
	component-selection and expanded-name.
	* sem_res.adb (Resolve_Op_Concat_Arg): do not issue a warning on
	concatenation argument of string type if it is static.
	* sem_util.adb, sem_util.ads
	(Check_Later_Vs_Basic_Declarations): add a new function
	Is_Later_Declarative_Item to decice which declarations are allowed as
	later items, in the two different modes Ada 83 and SPARK. In the SPARK
	mode, add that renamings are considered as later items.
	(Enclosing_Package): new function to return the enclosing package
	(Enter_Name): correct the rule for homonyms in SPARK
	(Is_SPARK_Initialization_Expr): default to returning True on nodes not
	from source (result of expansion) to avoid issuing wrong warnings.

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

	* errout.adb: On anything but an expression First_Node returns its
	argument.

From-SVN: r177152
2011-08-02 15:39:08 +02:00
Arnaud Charlet
23685ae6ec [multiple changes]
2011-08-02  Pascal Obry  <obry@adacore.com>

	* prj-proc.adb, make.adb, makeutl.adb: Minor reformatting.

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

	* exp_ch5.adb (Expand_Iterator_Loop): Code cleanup and reorganization.
	Set the associated loop as the related expression of internally
	generated cursors.
	* exp_ch7.adb (Is_Container_Cursor): New routine.
	(Wrap_Transient_Declaration): Supress the finalization of the list
	controller when the declaration denotes a container cursor.

2011-08-02  Yannick Moy  <moy@adacore.com>

	* opt.ads (SPARK_Mode): update comment, SPARK_Mode only set through
	command line now.
	* par-ch3.adb (P_Delta_Constraint): remove check in SPARK mode that the
	expression is a simple expression. This check cannot be performed in
	the semantics, so just drop it.
	(P_Index_Or_Discriminant_Constraint): move check that the index or
	discriminant is a subtype mark to Analyze_Subtype_Declaration in the
	semantics. Other cases were previously checked in the semantics.
	* par-ch4.adb (P_Name): move checks that a selector name is not
	character literal or an operator symbol to Find_Selected_Component in
	the semantics
	* par-ch5.adb (Parse_Decls_Begin_End): move check that basic
	declarations are not placed after later declarations in a separate
	procedure in Sem_Util (possibly not the best choice?), to be used both
	during parsing, for Ada 83 mode, and during semantic analysis, for
	SPARK mode.
	* par-endh.adb (Check_End): move check that end label is not missing
	to Process_End_Label in the semantics
	* par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): remove
	the special case for SPARK restriction
	* par.adb: use and with Sem_Util, for use in Parse_Decls_Begin_End
	* restrict.adb, restrict.ads (Check_Formal_Restriction): add a
	parameter Force to issue the error message even on internal node (used
	for generated end label). Call Check_Restriction to check when an error
	must be issued. In SPARK mode, issue an error message even if the
	restriction is not set.
	(Check_Restriction): new procedure with an additional out parameter to
	inform the caller that a message has been issued
	* sem_aggr.adb: Minor modification of message
	* sem_attr.adb (Analyze_Attribute): call Check_Formal_Restriction
	instead of issuing an error message directly
	* sem_ch3.adb (Analyze_Declarations): move here the check that basic
	declarations are not placed after later declarations, by calling
	Check_Later_Vs_Basic_Declarations
	(Analyze_Subtype_Declaration): move here the check that an index or
	discriminant constraint must be a subtype mark. Change the check that
	a subtype of String must start at one so that it works on subtype marks.
	* sem_ch4.adb (Analyze_Call): move here the check that a named
	association cannot follow a positional one in a call
	* sem_ch5.adb (Check_Unreachable_Code): call Check_Formal_Restriction
	instead of issuing an error message directly
	* sem_ch8.adb (Find_Selected_Component): move here the check that a
	selector name is not a character literal or an operator symbol. Move
	here the check that the prefix of an expanded name cannot be a
	subprogram or a loop statement.
	* sem_util.adb, sem_util.ads (Check_Later_Vs_Basic_Declarations): new
	procedure called from parsing and semantics to check that basic
	declarations are not placed after later declarations
	(Process_End_Label): move here the check that end label is not missing

2011-08-02  Arnaud Charlet  <charlet@adacore.com>

	* sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Ignore enum
	representation clause in codepeer mode, since it confuses CodePeer and
	does not bring useful info.

2011-08-02  Ed Falis  <falis@adacore.com>

	* init.c: initialize fp hw on MILS.

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

	* errout.adb (First_Node): for bodies, return the node itself (small
	optimization). For other nodes, do not check source_unit if the node
	comes from Standard.

From-SVN: r177151
2011-08-02 15:34:00 +02:00
Arnaud Charlet
bd65a2d740 [multiple changes]
2011-08-02  Yannick Moy  <moy@adacore.com>

	* errout.adb, errout.ads (Check_Formal_Restriction): move procedure
	from here...
	* restrict.adb, restrict.ads (Check_Formal_Restriction): ...to here
	* sem_aggr.adb, sem_ch5.adb, sem_util.adb:
	Add with/use clauses to make Check_Formal_Restriction visible

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

	* sem_ch12.adb (Check_Generic_Actuals): handle properly actual
	in-parameters when type of the generic formal is private in the generic
	spec and non-private in the body.

2011-08-02  Claire Dross  <dross@adacore.com>

	* a-cfdlli.adb, a-cfdlli.ads, a-cfhase.adb, a-cfhase.ads, a-cfhama.adb,
	a-cfhama.ads, a-cforse.adb, a-cforse.ads, a-cforma.adb, a-cforma.ads,
	a-cofove.adb, a-cofove.ads: New files implementing formal containers.
	* impunit.adb, Makefile.rtl: Take new files into account.

From-SVN: r177102
2011-08-02 11:17:46 +02:00
Yannick Moy
fe5d30682c errout.adb, errout.ads (Check_Formal_Restriction): new procedure which issues an error in formal mode if...
2011-08-02  Yannick Moy  <moy@adacore.com>

	* errout.adb, errout.ads (Check_Formal_Restriction): new procedure
	which issues an error in formal mode if its argument node is originally
	from source
	* sem_ch3.adb (Analyze_Full_Type_Declaration): move test that a type
	has a discriminant specification so that it does not include the case
	of derived types
	(Derived_Type_Declaration): move here the test that a derived type has a
	discriminant specification
	* sem_aggr.adb (Resolve_Record_Aggregate): test the presence of the
	first element of a component association before accessing its choices
	(presence of component association is not enough)
	* exp_ch6.adb (Expand_N_Subprogram_Declaration): test if a subprogram
	declaration is a library item before accessing the next element in a
	list, as library items are not member of lists
	* sem_attr.adb, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
	sem_ch8.adb, sem_ch9.adb, sem_res.adb, sem_util.adb: use
	Check_Formal_Restriction whenever possible.

From-SVN: r177099
2011-08-02 11:05:58 +02:00
Robert Dewar
2933b16cf2 sem_util.ads, [...] (Last_Source_Statement): Replaces Last_Source_Node_In_Sequence.
2011-08-01  Robert Dewar  <dewar@adacore.com>

	* sem_util.ads, sem_util.adb, sem_ch6.adb (Last_Source_Statement):
	Replaces Last_Source_Node_In_Sequence.
	* err_vars.ads (Error_Msg_Lang): 16 is OK, don't need 4K
	* errout.adb (Set_Error_Msg_Lang): Takes arg with no parens, but stores
	parens and blank in string (this was inconsistently implemented).
	* errout.ads
	(Set_Error_Msg_Lang): Takes arg with no parens, but stores parens and
	blank in string (this was inconsistently implemented).
	* gnat1drv.adb
	(Set_Global_Switches): Set formal mode switches appropriately
	* opt.ads, opt.adb: Formal mode is now global switches, more consistent
	* par-prag.adb
	(Analyze_Pragma, case SPARK_95): Set opt switches appropriately and
	call Set_Error_Msg_Lang to set "spark" as language name.
	* par.adb: Remove unnecessary call to set formal language for errout
	* sem_prag.adb (P_Pragma, case SPARK_95): Set opt switches
	appropriately and call Set_Error_Msg_Lang to set "spark" as language
	name.
	* sem_ch4.adb (Analyze_Concatenation_Operand): remove procedure and
	calls to it, moved after resolution so that types are known
	* sem_res.adb (Resolve_Op_Concat): issue an error in formal mode if
	result of concatenation is not of type String
	(Resolve_Op_Concat_Arg): issue an error in formal mode if an operand of
	concatenation is not properly restricted
	* gnat_rm.texi: Add doc on pragma Spark_95.
	* gcc-interface/Makefile.in: Remove obsolete target pairs for
	Interfaces.C.* on VMS. Remove s-parame-vms-restrict.ads.
	* gcc-interface/Make-lang.in: Update dependencies.

From-SVN: r177061
2011-08-01 18:16:24 +02:00
Yannick Moy
53beff2222 err_vars.ads (Error_Msg_Lang, [...]): new variables for insertion character ~~
2011-08-01  Yannick Moy  <moy@adacore.com>

	* err_vars.ads (Error_Msg_Lang, Error_Msg_Langlen): new variables for
	insertion character ~~
	* errout.ads, errout.adb (Formal_Error_Msg_...): remove procedures
	(Set_Error_Msg_Lang): new procedure which fixes the language for use
	with insertion character ~~
	(Set_Msg_Text): treat insertion character ~~
	* par-ch4.adb, par-ch5.adb, par-endh.adb, sem_attr.adb, sem_ch11.adb,
	sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_util.adb: Replace calls to
	Formal_Error_Msg_... procedures by equivalent Error_Msg_...
	procedures. Favor calls to Error_Msg_F(E) over Error_Msg_N(E). Make
	errors related to the formal language restriction not serious
	(insertion character |).
	* par.adb (Par): set formal language for error messages if needed
	* sem_ch6.adb (Check_Missing_Return): take into account possible
	generated statements at the end of the function
	* snames.ads-tmpl (Name_SPARK_95, Pragma_SPARK_95): new variable and
	enumeration value to define a new pragma SPARK_95
	* opt.ads, opt.adb (SPARK_Version_Type, SPARK_Version_Default,
	SPARK_Version): new type and variables to store the SPARK version
	(none by default).
	(SPARK_Mode): return True when SPARK_Version is set
	* par-prag.adb: Correct indentation
	(Prag): take Pragma_SPARK_95 into account
	* sem_prag.adb (Set_Mechanism_Value, Sig_Flags): take Pragma_SPARK_95
	into account.

From-SVN: r177056
2011-08-01 18:02:10 +02:00
Arnaud Charlet
8ed68165ed [multiple changes]
2011-08-01  Yannick Moy  <moy@adacore.com>

	* sem_util.ads, sem_util.adb, par.adb, par_util.adb
	(Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
	procedures out of these packages.
	* errout.ads, errout.adb 
	(Formal_Error_Msg, Formal_Error_Msg_N, Formal_Error_Msg_SP): move
	procedures in of this package
	(Formal_Error_Msg_NE): new procedure for wrapper on Error_Msg_NE
	* par-ch5.adb (Parse_Decls_Begin_End): issue syntax error in SPARK mode
	on misplaced later vs initial declarations, like in Ada 83
	* sem_attr.adb (Processing for Analyze_Attribute): issue error in
	formal mode on attribute of private type whose full type declaration
	is not visible
	* sem_ch3.adb (Analyze_Declarations): issue error in formal mode on a
	package declaration inside a package specification
	(Analyze_Full_Type_Declaration): issue error in formal mode on
	controlled type or discriminant type
	* sem_ch6.adb (Analyze_Subprogram_Specification): only issue error on
	user-defined operator means that it should come from the source
	(New_Overloaded_Entity): issue error in formal mode on overloaded
	entity.
	* sem_ch6.ads, sem_ch13.ads: typos in comments.

2011-08-01  Thomas Quinot  <quinot@adacore.com>

	* atree.adb: Minor reformatting.
	* checks.adb: Minor reformatting.

From-SVN: r177052
2011-08-01 17:51:41 +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
e1d9659dd3 [multiple changes]
2010-09-10  Robert Dewar  <dewar@adacore.com>

	* errout.adb: Remove tests of Parsing_Main_Subunit, since this test is
	now done in In_Extended_Main_Source_Unit.
	* errout.ads (Compiler_State[_Type]): Moved from Errout to Lib
	(Parsing_Main_Subunit): Moved from Errout to Lib and renamed
	as Parsing_Main_Extended_Source.
	* frontend.adb: Set Parsing_Main_Extended_Source True for parsing main
	unit.
	* lib-load.adb (Load_Unit): Add PMES parameter
	Set PMES appropriately in all calls to Load_Unit
	* lib-load.ads (Load_Unit): Add PMES parameter
	* lib.adb (In_Extended_Main_Source_Unit): When called with
	Compiler_State set to Parsing, test new flag
	Compiling_Main_Extended_Source.
	* lib.ads (Compiler_State[_Type]): Moved from Errout to Lib
	(Parsing_Main_Subunit): Moved from Errout to Lib and renamed
	as Parsing_Main_Extended_Source
	* par-load.adb (Load): Set PMES properly in call to Load_Unit

2010-09-10  Ed Schonberg  <schonberg@adacore.com>

	* exp_cg.adb: Use proper entity to handle overloads.
	* sem_res.adb (Check_Parameterless_Call): An operator node without
	actuals cannot be a call, and must be treated as a string.

From-SVN: r164182
2010-09-10 16:41:21 +02:00
Arnaud Charlet
a113c55d5a [multiple changes]
2010-09-10  Vincent Celier  <celier@adacore.com>

	* vms_data.ads: Add new GNAT BIND qualifiers /32_MALLOC (for -H32) and
	/64_MALLOC (for -H64).

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

	* errout.adb (Error_Msg_Internal): Test Parsing_Main_Subunit flag
	(Error_Msg_NW): Test Parsing_Main_Subunit flag
	* errout.ads (Parsing_Main_Subunit): New flag
	* lib-load.adb (Load_Unit): Set Parsing_Main_Subunit flag
	* par-ch6.adb: Minor style fix (remove redandant parentheses)
	* par-ch9.adb: Minor style fix (remove redundant parens)
	* par-load.adb: (Load): Deal with setting Parsing_Main_Subunit

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

	* make.adb (Create_Binder_Mapping_File): Remove procedure. Replaced by
	function of the same name in Makeutl.
	(Gnatmake): Call function Create_Binder_Mapping_File in Makeutl, instead
	of removed procedure when creating a binder mapping file.
	* makeutl.adb (Create_Binder_Mapping_File): New function. Was a
	procedure in Make.
	* makeutl.ads (Create_Binder_Mapping_File): New function

From-SVN: r164176
2010-09-10 15:53:51 +02:00
Robert Dewar
b94e425dc2 errout.adb, [...]: Minor reformatting.
2010-08-05  Robert Dewar  <dewar@adacore.com>

	* errout.adb, a-suewen.adb, a-suezen.adb: Minor reformatting.

From-SVN: r162903
2010-08-05 10:59:22 +02:00
Robert Dewar
13d923cc90 sem_ch6.adb, [...]: Minor reformatting.
2010-06-23  Robert Dewar  <dewar@adacore.com>

	* sem_ch6.adb, exp_ch4.adb, s-rannum.ads, sem.adb, sem_ch12.adb: Minor
	reformatting.  Add comments.
	* errout.adb (Finalize): Properly adjust warning count when deleting
	continuations.

From-SVN: r161242
2010-06-23 07:40:52 +02:00
Arnaud Charlet
9bebf0e989 [multiple changes]
2010-06-22  Robert Dewar  <dewar@adacore.com>

	* errout.adb (Finalize): Set Prev pointers.
	(Finalize): Delete continuations for deletion by warnings off(str).
	* erroutc.ads: Add Prev pointer to error message structure.

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

	* sem.adb (Do_Unit_And_Dependents): If the spec of the main unit is a
	child unit, examine context of parent units to locate instantiated
	generics whose bodies may be needed. 
	* sem_ch12.adb: (Mark_Context): if the enclosing unit does not have a
	with_clause for the instantiated generic, examine the context of its
	parents, to set Withed_Body flag, so that it can be visited earlier.
	* exp_ch4.adb (Expand_N_Op_Not): If this is a VMS operator applied to
	an unsigned type, use a type of the proper size for the intermediate
	value, to prevent alignment problems on unchecked conversion.

2010-06-22  Geert Bosch  <bosch@adacore.com>

	* s-rannum.ads Change Generator type to be self-referential to allow
	Random to update its argument. Use "in" mode for the generator in the
	Reset procedures to allow them to be called from the Ada.Numerics
	packages without tricks.
	* s-rannum.adb: Use the self-referencing argument to get write access
	to the internal state of the random generator.
	* a-nudira.ads: Make Generator a derived type of
	System.Random_Numbers.Generator.
	* a-nudira.adb: Remove use of 'Unrestricted_Access.
	Put subprograms in alpha order and add headers.
	* g-mbdira.ads: Change Generator type to be self-referential.
	* g-mbdira.adb: Remove use of 'Unrestricted_Access.

From-SVN: r161215
2010-06-22 19:29:41 +02:00
Arnaud Charlet
e86a3a7e6f [multiple changes]
2010-06-22  Robert Dewar  <dewar@adacore.com>

	* errout.adb (Unwind_Internal_Type): Improve handling of First_Subtype
	test to catch more cases where first subtype is the results we want.
	* sem_res.adb (Make_Call_Into_Operator): Don't go to First_Subtype in
	error case, since Errout will now handle this correctly.
	* gcc-interface/Make-lang.in: Add Sem_Aux to list of GNATBIND objects.
	Update dependencies.

2010-06-22  Arnaud Charlet  <charlet@adacore.com>

	* exp_ch4.adb (Expand_Allocator_Expression): Set Related_Node properly
	when calling Make_Temporary.

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

	* sem_ch3.adb (Access_Subprogram_Declaration): An anonymous access to
	subprogram can be associated with an entry body.

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

	* scos.ads: Add note on membership test handling.

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

	* projects.texi: Minor spelling fixes.
	Minor reformatting.

2010-06-22  Paul Hilfinger  <hilfinger@adacore.com>

	* s-rannum.adb: Correct off-by-one error in Extract_Value.

From-SVN: r161171
2010-06-22 14:42:24 +02:00
Arnaud Charlet
b086849e7c [multiple changes]
2010-06-22  Vincent Celier  <celier@adacore.com>

	* mlib-prj.adb (Display): In non verbose mode, truncate after fourth
	argument.
	* mlib-utl.adb (Gcc): In non verbose mode, truncate the display of the
	gcc command if it is too long.

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

	* errout.adb (Set_Msg_Node): Fix incorrect reference to node.

2010-06-22  Arnaud Charlet  <charlet@adacore.com>

	* exp_ch6.adb (Expand_Actuals): Use Actual as the related node when
	calling Make_Temporary.

From-SVN: r161170
2010-06-22 14:32:34 +02:00
Robert Dewar
9e64a2c19d sem_res.adb, [...]: Minor reformatting.
2010-06-22  Robert Dewar  <dewar@adacore.com>

	* sem_res.adb, sem_aux.adb, errout.adb: Minor reformatting.

From-SVN: r161169
2010-06-22 14:25:00 +02:00
Arnaud Charlet
47d3b920ce [multiple changes]
2010-06-22  Robert Dewar  <dewar@adacore.com>

	* lib-writ.ads, errout.adb, einfo.adb, einfo.ads: Minor reformatting.

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

	* adaint.c (__gnat_locate_regular_file): If a directory in the path is
	empty, make it the current working directory.

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

	* sem_ch3.adb (Build_Derived_Record_Type): When deriving a tagged
	private type with discriminants, make sure the parent type is frozen.

2010-06-22  Eric Botcazou  <ebotcazou@adacore.com>

	* exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_Bit>: Deal
	with packed array references specially.
	* exp_ch4.adb (Expand_N_Indexed_Component): Do not convert a reference
	to a component of a bit packed array if it is the prefix of 'Bit.
	* exp_pakd.ads (Expand_Packed_Bit_Reference): Declare.
	* exp_pakd.adb (Expand_Packed_Bit_Reference): New procedure.  Expand a
	'Bit reference, where the prefix involves a packed array reference.
	(Get_Base_And_Bit_Offset): New helper, extracted from...
	(Expand_Packed_Address_Reference): ...here.  Call above procedure to
	get the outer object and offset expression.

From-SVN: r161160
2010-06-22 12:07:05 +02:00
Arnaud Charlet
1e0e653424 [multiple changes]
2009-11-30  Vincent Celier  <celier@adacore.com>

	* gnatcmd.adb (Check_Files): Recognize documented switches that have a
	separate parameter.

2009-11-30  Robert Dewar  <dewar@adacore.com>

	* sem_util.ads: Minor reformatting
	* errout.adb: Minor reformatting
	Minor code reorganization (use N_Subprogram_Specification to simplify)
	* exp_ch7.adb: Add comment.

From-SVN: r154802
2009-11-30 14:58:01 +01:00
Arnaud Charlet
226e989e7e [multiple changes]
2009-11-30  Emmanuel Briot  <briot@adacore.com>

	* clean.adb ("-eL"): Also set Follow_Links_For_Dirs, to match what is
	done in other project-aware tools like gnatmake and gprbuild.

2009-11-30  Jerome Lambourg  <lambourg@adacore.com>

	* exp_ch3.adb (Make_Predefined_Primitive_Specs): Take care of CIL
	ValueTypes.
	* exp_ch7.adb (Needs_Finalization): Do not finalize CIL valuetypes.
	* sem_util.adb (Is_Value_Type): Protect against invalid calls to Chars
	(Is_Delegate): New method used for CIL.
	* sem_util.ads (Is_Delegate): New method for CIL handling.
	(Is_Value_Type): Improve documentation.

2009-11-30  Ed Schonberg  <schonberg@adacore.com>

	* errout.adb (Unwind_Internal_Type): Improve error reporting if the
	type is an anonymous access to subprogram that is the type of a formal
	in a subprogram spec.

2009-11-30  Vincent Celier  <celier@adacore.com>

	* prj-nmsc.adb (Check_Interfaces): In a Stand-Alone Library project, if
	attribute Interfaces is not declared, then Library_Interface should
	define the interfaces.

2009-11-30  Ed Schonberg  <schonberg@adacore.com>

	* sem_prag.adb: New semantics for Annotate.

From-SVN: r154800
2009-11-30 14:45:45 +01:00
Arnaud Charlet
ce14c57705 [multiple changes]
2009-07-23  Sergey Rybin  <rybin@adacore.com>

	* gnat_ugn.texi (Misnamed_Controlling_Parameters gnatcheck rule): Fix
	misprint in rule description.

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

	* exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): Replace
	test that the object declaration is within an extended return statement
	with direct test of whether the declared object associated with the
	build-in-place call is a return object, since the enclosing function
	might not even be a build-in-place function.

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

	* freeze.adb, prj-nmsc.adb, errout.adb: Minor reformatting
	Minor code reorganization

2009-07-23  Arnaud Charlet  <charlet@adacore.com>

	* sem_prag.adb (Analyze_Pragma): Do not ignore pragma Pack on records
	for static analysis, only packed arrays are causing troubles.

From-SVN: r150007
2009-07-23 14:50:44 +02:00
Arnaud Charlet
d58b951506 freeze.adb (Set_Small_Size): Remove extra space for consistency with other similar messages.
2009-07-23  Arnaud Charlet  <charlet@adacore.com>

	* freeze.adb (Set_Small_Size): Remove extra space for consistency with
	other similar messages.
	* sem_prag.adb (Freeze_Record_Type, Freeze_Entity): Disable error
	messages/implicit packing in CodePeer mode.
	(Analyze_Pragma [case pragma Pack]): Ignore pragma in CodePeer mode.
	* errout.adb (Special_Msg_Delete): Suppress 'size too small' message in
	CodePeer mode.

From-SVN: r150005
2009-07-23 14:41:17 +02:00
Robert Dewar
97cb64f052 exp_ch5.adb (Expand_N_Assignment_Statement): Do left-side validity check right away so it does not get skipped for early...
2009-07-23  Robert Dewar  <dewar@adacore.com>

	* exp_ch5.adb (Expand_N_Assignment_Statement): Do left-side validity
	check right away so it does not get skipped for early returns, e.g.
	array assignments.
	(Expand_N_Assignment_Statement): Don't propagate Is_Known_Valid to
	left-side unless we really know the value is valid.

	* errout.adb, exp_ch3.adb, exp_disp.ads, sinfo.ads, exp_disp.adb: Minor
	reformatting. Minor code reorganization. Add comments.

From-SVN: r149978
2009-07-23 11:10:58 +02:00
Arnaud Charlet
81d9336562 [multiple changes]
2009-07-23  Gary Dismukes  <dismukes@adacore.com>

	* sem_ch6.adb (Check_Return_Subtype_Indication): Replace type equality
	with test of coverage, to allow specific type objects in extended
	returns of class-wide functions. Remove now-unnecessary special-case
	tests that allowed this in certain cases of expanded extended returns.

2009-07-23  Javier Miranda  <miranda@adacore.com>

	* sinfo.ads,sinfo.adb (Entity/Set_Entity): Attribute available in
	N_Null_Statements (for SCIL nodes).
	(Is_Scil_Node/Set_Is_Scil_Node): New attribute (for SCIL nodes).
	(Scil_Nkind/Set_Scil_Nkind): New attribute (for SCIL nodes).
	(Scil_Related_Node/Set_Scil_Related_Node): New attribute (for SCIL
	nodes).
	(Scil_Target_Prim/Set_Scil_Target_Prim): New attribute (for SCIL nodes).
	* exp_disp.adb (Expand_Dispatching_Call): Add generation of SCIL node
	associated with dispatching call.
	(Get_Scil_Node_Kind): New function that returns the kind of SCIL node.
	(Make_DT, Make_Tags): Add generation of SCIL nodes associated with
	initialization of dispatch tables and initialization of tags.
	(New_Scil_Node): New function that creates a new SCIL node.
	(Build_Init_Procedure): Add generation of SCIL node associated with the
	initialization of tags done in the IP subprogram.

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

	* errout.adb (Error_Msg_NEL): If the entity in the initial message has
	Warnings_Off, do not emit continuation messages.

	* sem_ch10.adb: Set Is_Compilation_Unit on generated child subprogram
	spec.

2009-07-23  Emmanuel Briot  <briot@adacore.com>

	* ali.adb: Minor comment update

2009-07-23  Vasiliy Fofanov  <fofanov@adacore.com>

	* s-win32.ads (HANDLE): Define to be the same size as address type.
	Fix copyright.

2009-07-23  Olivier Hainque  <hainque@adacore.com>

	* g-sse.ads: New file. Root of the SSE facilities trees, with
	general description and common declarations.
	* g-ssvety.ads: New file. Expose user level SSE vector types.
	* impunit.adb (Non_Imp_File_Names_95): Register new units.
	* gcc-interface/Makefile.in (x86 32/64 linux, win32): Add
	EXTRA_GNATRTL_NONTASKING_OBJS entries for SSE units.

2009-07-23  Ben Brosgol  <brosgol@adacore.com>

	* gnat_ugn.texi: Wordsmithing.

From-SVN: r149974
2009-07-23 10:48:01 +02:00
Arnaud Charlet
74462a6a0c [multiple changes]
2009-07-22  Robert Dewar  <dewar@adacore.com>

	* gnat_ugn.texi: Minor reformatting

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

	* errout.adb (Error_Msg): A style message within an instantiation
	should not be labelled as an error.

From-SVN: r149938
2009-07-22 17:04:18 +02:00
Robert Dewar
d1ced162c2 s-stchop.adb, [...]: Make sure sources obey short-circuit style rule.
2009-07-22  Robert Dewar  <dewar@adacore.com>

	* s-stchop.adb, a-direct.adb, a-ztexio.adb, gnatchop.adb, prj-proc.adb,
	make.adb, s-regpat.adb, ali-util.adb, a-ngcefu.adb, prep.adb,
	s-tassta.adb, a-tifiio.adb, a-textio.adb, prj.adb, uintp.adb,
	s-valrea.adb, a-ngelfu.adb, prepcomp.adb, sinput-l.adb, vms_conv.adb,
	errout.adb, g-alleve.adb, repinfo.adb, a-wtedit.adb, ali.adb,
	a-witeio.adb, prj-dect.adb, prj-nmsc.adb, sinput-c.adb, binde.adb,
	s-regexp.adb, s-imgrea.adb, a-teioed.adb, errutil.adb, prj-util.adb,
	a-ztedit.adb, gnatls.adb, prj-conf.adb, bcheck.adb, s-scaval.adb,
	erroutc.adb, osint.adb, a-strfix.adb, s-fileio.adb: Make sure sources
	obey short-circuit style rule.

From-SVN: r149921
2009-07-22 12:25:32 +02:00
Robert Dewar
483c78cb8e errout.adb: Minor reformatting
2009-05-06  Robert Dewar  <dewar@adacore.com>

	* errout.adb: Minor reformatting

	* scng.adb, sem_prag.adb, par-ch4.adb, sem_res.adb, par-ch6.adb,
	sem_ch6.adb, par-prag.adb, sem_ch8.adb, sem_warn.adb, par-util.adb,
	styleg.adb: Add stylized comments to error messages that are included
	in the codefix circuitry of IDE's such as GPS.

From-SVN: r147173
2009-05-06 14:53:27 +02:00
Ed Schonberg
f3a67cfc20 lib-load.ads, [...] (Make_Child_Decl_Unit): New subprogram...
2009-04-22  Ed Schonberg  <schonberg@adacore.com>

	* lib-load.ads, lib-load.adb (Make_Child_Decl_Unit): New subprogram, to
	create a unit table entry for the subprogram declaration created for a
	child suprogram body that has no separate specification.

	* sem_ch10.adb (Analyze_Compilation_Unit): For a child unit that is a
	subprogram body, call Make_Child_Decl_Unit.

	* lib.adb (Get_Cunit_Unit_Number): Verify that an entry not yet in the
	table can only be the created specification of a child subprogram body
	that is the main unit, which has not been entered in the table yet.

	* errout.adb  (Output_Messages): Ignore created specification of a
	child subprogram body to prevent repeated listing of error messages.

	* gnat1drv.adb (gnat1drv): The generated specification for a child
	subprogram body does not generate code.

From-SVN: r146559
2009-04-22 12:11:00 +02:00
Thomas Quinot
d8221f4558 sem_ch6.ads (Check_Subtype_Conformant): Add ??? comment for undocumented formal.
2009-04-10  Thomas Quinot  <quinot@adacore.com>

	* sem_ch6.ads (Check_Subtype_Conformant): Add ??? comment for
	undocumented formal.
	Minor reformatting

	* a-direio.ads: Fix typo in comment

	* sem_ch3.adb, g-dirope.adb, sem_type.adb, sem_ch12.adb, sem_case.adb,
	errout.adb, sem_ch4.adb, sem_ch11.adb, exp_dist.adb, sem_ch13.adb:
	Use uniform phrasing for comment at start of subprogram body.

	* xsnamest.adb: Add note to explain why we use specific names for the
	newly generated files instead of generating snames.{ads,adb,h} directly

From-SVN: r145918
2009-04-10 17:12:15 +02:00
Arnaud Charlet
c75c4293c3 [multiple changes]
2009-04-09  Vincent Celier  <celier@adacore.com>

	* errout.adb: Remove dependency on package Style

	* style.ads, styleg.adb, styleg.ads (RM_Column_Check): Remove function,
	moved to Stylesw.
	
	* stylesw.ads, stylesw.adb (RM_Column_Check): New function, moved from
	Styleg.

	* errutil.adb, par.adb: Import Stylesw

2009-04-09  Arnaud Charlet  <charlet@adacore.com>

	* opt.ads: Fix typos.

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

	* einfo.adb: Minor reformatting

From-SVN: r145832
2009-04-09 14:28:57 +02:00
Robert Dewar
923e6ff331 binderr.adb, [...]: New circuitry for handling Maximum_Messages.
2009-04-09  Robert Dewar  <dewar@adacore.com>

	* binderr.adb, errout.adb, errutil.adb: New circuitry for handling
	Maximum_Messages.
	
	* erroutc.adb, erroutc.ads (Warnings_Suppressed): Now tests global
	warning status as well.
	
	* opt.ads (Maximum_Messages): New name for Maximum_Errors.
	
	* switch-b.adb, switch-c.adb: Change name Maximum_Errors to
	Maximum_Messages.
	
	* bindusg.adb, usage.adb: Update line for -gnatm switch

	* gnat_ugn.texi: Update documentation for -gnatmnn compiler switch and
	-mnn binder switch.

	* sem_ch10.adb: Minor reformatting.

From-SVN: r145822
2009-04-09 12:38:54 +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
Ralf Wildenhues
f3d0f304ff vms_data.ads: Fix typo in constant.
gcc/ada/

	* vms_data.ads: Fix typo in constant.
	* gen-soccon.c: Fix typo in error string.
	* gnat_rm.texi (Pragma Optimize_Alignment, Pragma Postcondition):
	Fix typos.
	* a-calcon.ads, a-calend-vms.adb, a-calend.adb, a-crdlli.ads,
	bcheck.adb, checks.adb, einfo.ads, errout.adb, erroutc.adb,
	erroutc.ads, exp_attr.adb, exp_ch11.adb, exp_ch2.adb,
	exp_ch5.adb, exp_ch9.adb, exp_ch9.ads, exp_pakd.adb,
	exp_util.adb, fmap.adb, g-soccon-linux-mips.ads,
	g-soccon-rtems.ads, g-timsta.adb, g-timsta.ads, lib-writ.ads,
	mlib-tgt-specific-linux.adb, mlib-tgt-specific-tru64.adb,
	s-interr-vxworks.adb, s-interr.adb, s-osinte-lynxos.ads,
	s-rident.ads, s-taprop-solaris.adb, s-tassta.adb, s-win32.ads,
	sem_aggr.adb, sem_attr.ads, sem_ch10.adb, sem_ch13.ads,
	sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb, sem_ch9.adb,
	sem_prag.ads, sem_res.adb, sem_util.adb, sem_util.ads,
	sinfo.ads: Fix typos in comments.

From-SVN: r134291
2008-04-14 21:07:59 +00:00
Robert Dewar
a1e2130ca1 back_end.adb: Remove Big_String_Ptr declarations (now in Types)
2008-04-08  Robert Dewar  <dewar@adacore.com>

	* back_end.adb: Remove Big_String_Ptr declarations (now in Types)

	* errout.adb: Remove Big_String_Ptr declarations (now in Types)
	Change name Is_Style_Msg to Is_Style_Or_Info_Msg

	* fmap.adb: Remove Big_String declarations (now in Types)
	(No_Mapping_File): New Boolean global variable
	(Initialize): When mapping file cannot be read, set No_Mapping_File to
	False.
	(Update_Mapping_File): Do nothing if No_Mapping_File is True. If the
	tables were empty before adding entries, open the mapping file
	with Truncate = True, instead of delete/re-create.

	* fname-sf.adb: Remove Big_String declarations (now in Types)

	* s-strcom.adb, g-dyntab.ads, g-table.ads, s-carsi8.adb,
        s-stalib.ads, s-carun8.adb: Add zero size Storage_Size clauses for big
	pointer types

	* table.ads: Add for Table_Ptr'Storage_Size use 0

	* types.ads: Add Big_String declarations
	Add Size_Clause of zero for big pointer types

From-SVN: r134022
2008-04-08 08:48:30 +02:00
Robert Dewar
14f1ec15bd errout.ads: Document new !! insertion sequence
2008-03-26  Robert Dewar  <dewar@adacore.com>

	* errout.ads: Document new !! insertion sequence

	* errout.adb (N_Pragma): Chars field removed, use Chars
	(Pragma_Identifier (..  instead.
	Replace use of Warnings_Off by Has_Warnings_Off
	(Error_Msg_Internal): Don't delete warning ending in !!

From-SVN: r133556
2008-03-26 08:37:35 +01:00
Bob Duff
10303118b3 atree.ads, atree.adb (Traverse_Func): Walk Field2 last, and eliminate the resulting tail recursion by hand.
2007-12-19  Bob Duff  <duff@adacore.com>

	* atree.ads, atree.adb (Traverse_Func): Walk Field2 last, and eliminate
	the resulting tail recursion by hand. This prevents running out of
	memory on deeply nested concatenations, since Field2 is where the left
	operand of concatenations is stored.
	Fix bug (was returning OK_Orig in some cases). Fix return subtype to
	clarify that it can only return OK or Abandon.

	* sem_res.adb (Resolve_Op_Concat): Replace the recursion on the left
	operand by iteration, in order to avoid running out of memory on
	deeply-nested concatenations. Use the Parent pointer to get back up the
	tree.
	(Resolve_Op_Concat_Arg, Resolve_Op_Concat_First,
	 Resolve_Op_Concat_Rest): New procedures split out of
	Resolve_Op_Concat, so the iterative algorithm in Resolve_Op_Concat is
	clearer.

	* checks.adb (Remove_Checks): Use Traverse_Proc instead of
	Traverse_Func, because the former already takes care of discarding the
	result.

	* errout.adb (First_Node): Use Traverse_Proc instead of Traverse_Func,
	because the former already takes care of discarding the result.
	(Remove_Warning_Messages): Use appropriate subtype for Status and
	Discard

From-SVN: r131070
2007-12-19 17:22:40 +01:00
Vincent Celier
987c5cecd0 errout.adb (Output_Source_Line): Do not keep a trailing space after the source line number if...
2007-12-06  Vincent Celier  <celier@adacore.com>

	* errout.adb (Output_Source_Line): Do not keep a trailing space after
	the source line number if the source line is empty.

From-SVN: r130826
2007-12-13 11:23:55 +01:00
Robert Dewar
b5c84c3ccf exp_atag.ads, [...]: Replace headers with GPL v3 headers.
2007-09-10  Robert Dewar  <dewar@adacore.com>

	* exp_atag.ads, exp_atag.adb, mlib-tgt-tru64.adb, mlib-tgt-aix.adb,
	mlib-tgt-irix.adb, mlib-tgt-hpux.adb, mlib-tgt-linux.adb,
	mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
	mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb, ali.adb, ali.ads,
	ali-util.adb, ali-util.ads, atree.h, back_end.adb, back_end.ads,
	bcheck.adb, bcheck.ads, binde.adb, binde.ads, binderr.adb, binderr.ads,
	bindgen.adb, bindgen.ads, bindusg.adb, bindusg.ads, butil.adb,
	butil.ads, checks.adb, checks.ads, clean.adb, clean.ads, comperr.adb,
	comperr.ads, cstand.adb, cstand.ads, debug_a.adb, debug_a.ads,
	elists.h, errout.adb, erroutc.ads, errutil.adb, errutil.ads,
	err_vars.ads, eval_fat.adb, eval_fat.ads, exp_sel.ads, exp_sel.adb,
	exp_aggr.adb, exp_aggr.ads, expander.adb, expander.ads, exp_attr.ads,
	exp_ch10.ads, exp_ch11.adb, exp_ch12.adb, exp_ch12.ads, exp_ch13.adb,
	exp_ch13.ads, exp_ch2.adb, exp_ch2.ads, exp_ch3.ads, exp_ch4.adb,
	exp_ch4.ads, exp_ch5.adb, exp_ch5.ads, exp_ch6.adb, exp_ch6.ads,
	exp_ch7.adb, exp_ch7.ads, exp_ch8.adb, exp_ch8.ads, exp_ch9.adb,
	exp_ch9.ads, exp_code.adb, exp_code.ads, exp_dbug.adb, exp_dbug.ads,
	exp_disp.ads, exp_dist.adb, exp_dist.ads, exp_fixd.adb, exp_fixd.ads,
	exp_imgv.adb, exp_imgv.ads, exp_intr.adb, exp_intr.ads, exp_pakd.adb,
	exp_pakd.ads, exp_prag.adb, exp_prag.ads, exp_smem.adb, exp_strm.adb,
	exp_strm.ads, exp_tss.adb, exp_tss.ads, exp_util.adb, exp_util.ads,
	exp_vfpt.adb, exp_vfpt.ads, fmap.adb, fmap.ads, fname-sf.adb,
	fname-sf.ads, fname-uf.adb, fname-uf.ads, frontend.adb, frontend.ads,
	get_targ.adb, get_targ.ads, gnat1drv.adb, gnat1drv.ads, gnatbind.adb,
	gnatbind.ads, gnatbl.c, gnatchop.adb, gnatclean.adb, gnatcmd.adb,
	gnatcmd.ads, gnatdll.adb, gnatfind.adb, gnatkr.adb, gnatkr.ads,
	gnatlbr.adb, gnatlink.adb, gnatlink.ads, gnatls.adb, gnatls.ads,
	gnatmake.adb, gnatmake.ads, gnatmem.adb, gnatname.adb, gnatname.ads,
	gnatprep.adb, gnatprep.ads, gnatsym.adb, gnatxref.adb,
	gprep.adb, gprep.ads, hlo.adb, hlo.ads, impunit.adb, impunit.ads,
	inline.adb, inline.ads, itypes.adb, itypes.ads, layout.adb, layout.ads,
	lib-load.adb, lib-load.ads, lib-util.adb, lib-util.ads, lib-writ.adb,
	lib-writ.ads, lib-xref.adb, lib-xref.ads, live.adb, live.ads,
	make.adb, make.ads, makeutl.ads, makeutl.adb, makeusg.adb, makeusg.ads,
	mdll.adb, mdll.ads, mdll-fil.adb, mdll-fil.ads, mdll-utl.adb,
	mdll-utl.ads, memroot.adb, memroot.ads, mlib.adb, mlib.ads,
	mlib-fil.adb, mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb,
	mlib-tgt.ads, mlib-utl.adb, mlib-utl.ads, namet.h, nmake.adt,
	osint.adb, osint.ads, osint-b.adb, osint-b.ads, osint-c.adb,
	osint-c.ads, osint-l.adb, osint-l.ads, osint-m.adb, osint-m.ads,
	par.adb, par.ads, par-ch10.adb, par-ch11.adb, par-ch12.adb,
	par-ch13.adb, par-ch2.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
	par-ch6.adb, par-ch7.adb, par-ch8.adb, par-ch9.adb, par-endh.adb,
	par-labl.adb, par-load.adb, par-prag.adb, par-sync.adb, par-tchk.adb,
	par-util.adb, prep.adb, prep.ads, prepcomp.adb, prepcomp.ads,
	prj.adb, prj.ads, prj-attr.adb, prj-attr.ads, prj-com.ads,
	prj-dect.adb, prj-dect.ads, prj-err.adb, prj-err.ads, prj-ext.adb,
	prj-ext.ads, prj-makr.adb, prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads,
	prj-pars.adb, prj-pars.ads, prj-part.adb, prj-part.ads,
	prj-pp.adb, prj-pp.ads, prj-proc.adb, prj-proc.ads,
	prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
	prj-util.adb, prj-util.ads, restrict.adb, restrict.ads,
	rtsfind.adb, rtsfind.ads, scn.adb, scn.ads,
	scng.adb, scng.ads, sdefault.ads, sem.ads, sem_aggr.ads, sem_attr.adb,
	sem_case.adb, sem_case.ads, sem_cat.adb, sem_cat.ads, sem_ch10.adb,
	sem_ch10.ads, sem_ch11.adb, sem_ch11.ads, sem_ch12.ads, sem_ch13.adb,
	sem_ch13.ads, sem_ch2.adb, sem_ch2.ads, sem_ch3.adb, sem_ch3.ads,
	sem_ch4.ads, sem_ch5.adb, sem_ch5.ads, sem_ch6.adb, sem_ch6.ads,
	sem_ch7.adb, sem_ch7.ads, sem_ch8.adb, sem_ch8.ads, sem_ch9.adb,
	sem_ch9.ads, sem_disp.adb, sem_disp.ads, sem_dist.adb, sem_dist.ads,
	sem_elab.adb, sem_elab.ads, sem_elim.adb, sem_elim.ads, sem_eval.adb,
	sem_eval.ads, sem_intr.adb, sem_intr.ads, sem_maps.adb, sem_maps.ads,
	sem_mech.adb, sem_mech.ads, sem_prag.adb, sem_prag.ads, sem_res.adb,
	sem_res.ads, sem_smem.adb, sem_smem.ads, sem_type.adb, sem_type.ads,
	sem_util.adb, sem_util.ads, sem_vfpt.adb, sem_vfpt.ads, sem_warn.adb,
	sem_warn.ads, sfn_scan.ads, sinfo-cn.adb, sinfo-cn.ads, sinput-c.adb,
	sinput-c.ads, sinput-d.adb, sinput-d.ads, sinput-l.adb, sinput-l.ads,
	sinput-p.adb, sinput-p.ads, snames.h, sprint.adb, sprint.ads,
	stringt.h, style.ads, styleg.adb, styleg.ads, styleg-c.adb,
	styleg-c.ads, stylesw.adb, stylesw.ads, switch.adb, switch.ads,
	switch-b.adb, switch-b.ads, switch-c.adb, switch-c.ads, switch-m.adb,
	switch-m.ads, symbols.adb, symbols.ads, targparm.adb, tbuild.adb,
	tbuild.ads, tempdir.adb, tempdir.ads, tree_gen.adb, tree_gen.ads,
	treepr.adb, treepr.ads, treeprs.adt, ttypef.ads, ttypes.ads,
	types.h, uintp.h, urealp.h, usage.adb, usage.ads,
	validsw.adb, validsw.ads, vxaddr2line.adb, xeinfo.adb, xnmake.adb,
	xref_lib.adb, xref_lib.ads, xr_tabls.adb, xr_tabls.ads, xsinfo.adb,
	xtreeprs.adb, xsnames.adb, vms_conv.ads, vms_conv.adb, xgnatugn.adb,
	gprmake.adb, makegpr.ads, makegpr.adb, prj-attr-pm.ads, prj-attr-pm.adb,
	mlib-tgt-lynxos.adb, mlib-tgt-darwin.adb, symbols-vms.adb,
	symbols-processing-vms-alpha.adb, symbols-processing-vms-ia64.adb,
	mlib-tgt-specific.adb, mlib-tgt-specific.ads, mlib-tgt-vms.adb,
	mlib-tgt-vms.ads: Replace headers with GPL v3 headers.

From-SVN: r128332
2007-09-10 14:47:10 +02:00
Arnaud Charlet
762031177e (Write_Eol): Remove trailing spaces before writing the line
(Write_Eol): Remove trailing spaces before writing the line
	(Write_Eol_Keep_Blanks): New procedure to write a line, including
	possible trailing spaces.
	(Output_Source_Line): Call Write_Eol_Keep_Blanks to output a source line
	Fix problem with suppressing warning messages from back end
	Improve handling of deleted warnings

From-SVN: r127474
2007-08-14 11:04:48 +02:00
Robert Dewar
107cd232e1 comperr.adb (Compiler_Abort): New Finalize/Output_Messages interface for Errout
2007-04-20  Robert Dewar  <dewar@adacore.com>

	* comperr.adb (Compiler_Abort): New Finalize/Output_Messages interface
	for Errout

	* errout.adb: New Finalize/Compilation_Errors/Output_Messages
	implementation

	* errout.ads (Finalize): Changed interface
	(Output_Messages): New procedure
	(Compilation_Errors): New Interface

	* prepcomp.ads, prepcomp.adb (Parse_Preprocessing_Data_File): New
	Finalize/Output_Messages interface for Errout
	(Prepare_To_Preprocess): New Finalize/Output_Messages interface for
	Errout.

From-SVN: r125374
2007-06-06 12:18:16 +02:00
Ed Schonberg
fea9e956ec errout.adb (Unwind_Internal_Type): Use predicate Is_Access__Protected_Subprogram_Type.
2007-04-06  Ed Schonberg  <schonberg@adacore.com>
	    Robert Dewar  <dewar@adacore.com>
	    Bob Duff  <duff@adacore.com>
	    Gary Dismukes  <dismukes@adacore.com>

	* errout.adb (Unwind_Internal_Type): Use predicate
	Is_Access__Protected_Subprogram_Type.

	* freeze.adb (Size_Known): Use First/Next_Component_Or_Discriminant
	(Freeze_Entity, packed array case): Do not override explicitly set
	alignment and size clauses.
	(Freeze_Entity):  An entity declared in an outer scope can be frozen if
	the enclosing subprogram is a child unit body that acts as a spec.
	(Freeze_Entity): Use new predicate Is_Access_Protected_Subprogram_Type.
	(Freeze_Record_Type): New Ada 2005 processing for reverse bit order
	Remove all code for DSP option

	* layout.adb (Layout_Record_Type): Use First/
	Next_Component_Or_Discriminant
	(Layout_Type): Use new predicate Is_Access_Protected_Subprogram_Type,
	to handle properly the anonymous access case.

	* sem_attr.adb (Build_Access_Object_Type): Use E_Access_Attribute_Type
	for all access attributes, because overload resolution should work the
	same for 'Access, 'Unchecked_Access, and 'Unrestricted_Access. This
	causes the error message for the ambiguous "X'Access = Y'Access" and
	"X'Unrestricted_Access = Y'Access" and so forth to match.
	(Resolve_Attribute, case 'Access): Remove use of Original_Access_Type,
	now that anonymous access to protected operations have their own kind.
	(Resolve_Attribute): In case of dispatching call check the violation of
	restriction No_Dispatching_Calls.
	(Check_Array_Type): Check new -gnatyA array index style option

	* sem_ch3.ads, sem_ch3.adb (Derived_Type_Declaration): Reject an
	attempt to derive from a synchronized tagged type.
	(Analyze_Type_Declaration): If there is a incomplete tagged view of the
	type, inherit the class-wide type already created, because it may
	already have been used in a self-referential anonymous access component.
	(Mentions_T): Recognize self-referential anonymous access components
	that use (a subtype of) the class-wide type of the enclosing type.
	(Build_Derived_Record_Type): Add earlier setting of Is_Tagged_Type. Pass
	Derived_Type for Prev formal on call to
	Check_Anonymous_Access_Components rather than Empty.
	(Make_Incomplete_Type_Declaration): Add test for case where the type has
	a record extension in deciding whether to create a class-wide type,
	rather than just checking Tagged_Present.
	(Replace_Anonymous_Access_To_Protected_Subprogram): Procedure applies
	to stand-alone object declarations as well as component declarations.
	(Array_Type_Declaration): Initialize Packed_Array_Type to Empty, to
	prevent accidental overwriting when enclosing package appears in
	a limited_with_clause.
	(Array_Type_Declaration): If the component type is an anonymous access,
	the associated_node for the itype is the type declaration itself.
	(Add_Interface_Tag_Components): Modified to support concurrent
	types with abstract interfaces.
	(Check_Abstract_Interfaces): New subprogram that verifies the ARM
	rules 3.9.4 (15/2), 9.1 (9.d/2) and 9.4 (11.d/2).
	(Build_Derived_Record_Type): Add call to Analyze_Interface_Declaration
	to complete the decoration of synchronized interface types. Add also
	a call to Check_Abstract_Interfaces to verify the ARM rules.
	(Derive_Interface_Subprograms): Modified to support concurrent types
	with abstract interfaces.
	(Analyze_Subtype_Indication): Resolve the range with the given subtype
	mark, rather than delaying the full resolution depending on context.
	(Analyze_Component_Declaration,Analyze_Interface_Declaration,
	Analyze_Object_Declaration,Analyze_Subtype_Declaration,
	Array_Type_Declaration,Build_Derived_Record_Type,
	Build_Discriminated_Subtype,Check_Abstract_Overriding,Check_Completion,
	Derive_Interface_Subprograms,Derive_Subprogram,Make_Class_Wide_Type,
	Process_Full_View,Record_Type_Declaration): Split Is_Abstract flag into
	Is_Abstract_Subprogram and Is_Abstract_Type. Make sure these are
	called only when appropriate.
	(Copy_And_Swap): Copy Has_Unreferenced_Objects flag from full type
	to private type.
	(Analyze_Subtype_Declaration): For an access subtype declaration, create
	an itype reference for the anonymous designated subtype, to prevent
	scope anonmalies in gigi.
	(Build_Itype_Reference): New utility, to simplify construction of such
	references.

From-SVN: r123559
2007-04-06 11:19:23 +02:00
Robert Dewar
4ecc031cdb errout.ads, errout.adb (Finalize): Implement switch -gnatd.m Avoid abbreviation Creat
2006-10-31  Robert Dewar  <dewar@adacore.com>

	* errout.ads, errout.adb (Finalize): Implement switch -gnatd.m
	Avoid abbreviation Creat
	(Finalize): List all sources in extended mail source if -gnatl
	switch is active.
	Suppress copyright notice to file in -gnatl=f mode if -gnatd7 set
	(Finalize): Implement new -gnatl=xxx switch to output listing to file
	(Set_Specific_Warning_On): New procedure
	(Set_Specific_Warning_Off): New procedure
	Add implementation of new insertion \\
	(Error_Msg_Internal): Add handling for Error_Msg_Line_Length
	(Unwind_Internal_Type): Improve report on anonymous access_to_subprogram
	types.
	(Error_Msg_Internal): Make sure that we set Last_Killed to
	True when a message from another package is suppressed.
	Implement insertion character ~ (insert string)
	(First_Node): Minor adjustments to get better placement.

	* frontend.adb: 
	Implement new -gnatl=xxx switch to output listing to file

	* gnat1drv.adb: 
	Implement new -gnatl=xxx switch to output listing to file

        * opt.ads: (Warn_On_Questionable_Missing_Paren): New switch
	(Commands_To_Stdout): New flag
	Implement new -gnatl=xxx switch to output listing to file
	New switch Dump_Source_Text
	(Warn_On_Deleted_Code): New warning flag for -gnatwt
	Define Error_Msg_Line_Length
	(Warn_On_Assumed_Low_Bound): New switch

	* osint.ads, osint.adb
	(Normalize_Directory_Name): Fix bug.
	Implement new -gnatl=xxx switch to output listing to file
	(Concat): Removed, replaced by real concatenation
	Make use of concatenation now allowed in compiler
	(Executable_Prefix.Get_Install_Dir): First get the full path, so that
	we find the 'lib' or 'bin' directory even when the tool has been
	invoked with a relative path.
	(Executable_Name): New function taking string parameters.

	* osint-c.ads, osint-c.adb: 
	Implement new -gnatl=xxx switch to output listing to file

	* sinput-d.adb: Change name Creat_Debug_File to Create_Debug_File

	* switch-c.adb: 
	Implement new -gnatl=xxx switch to output listing to file
	Recognize new -gnatL switch
	(no longer keep in old warning about old style usage)
	Use concatenation to simplify code
	Recognize -gnatjnn switch
	(Scan_Front_End_Switches): Clean up handling of -gnatW
	(Scan_Front_End_Switches): Include Warn_On_Assumed_Low_Bound for -gnatg

From-SVN: r118251
2006-10-31 18:52:20 +01:00