summaryrefslogtreecommitdiff
path: root/gcc/ada/sinfo.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-16 12:21:07 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-16 12:21:07 +0000
commite33d6af44b535351b7356725a1951e41ca608ef7 (patch)
tree0989d9ca5b50bc66dbae68eaaf4a0c7ab927a05e /gcc/ada/sinfo.ads
parent0c57415b10f843383cc770ffd509ea228cc3ec52 (diff)
downloadgcc-e33d6af44b535351b7356725a1951e41ca608ef7.tar.gz
2007-08-16 Hristian Kirtchev <kirtchev@adacore.com>
Bob Duff <duff@adacore.com> Nicolas Setton <setton@adacore.com> * sem_res.adb (Comes_From_Predefined_Lib_Unit): New. (Resolve): Alphabetize local variables. Add new variable From_Lib. When the statement which is being resolved comes from a predefined library unit, all non-predefined library interpretations are skipped. (Resolve_Op_Concat): If string concatenation was folded in the parser, but the "&" is user defined, give an error, because the folding would be wrong. * sinfo.ads, sinfo.adb (Is_Folded_In_Parser): New flag to indicate that the parser has folded a long sequence of concatenations of string literals. * trans.c (Handled_Sequence_Of_Statements_to_gnu): Mark "JMPBUF_SAVE" and "JMP_BUF" variables as artificial. (N_String_Literal): Do not use alloca for very long string literals. Use xmalloc/free instead. Otherwise the stack might overflow. * utils.c (init_gigi_decls): Mark "JMPBUF_T" type as created by the compiler. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127550 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sinfo.ads')
-rw-r--r--gcc/ada/sinfo.ads21
1 files changed, 16 insertions, 5 deletions
diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads
index 403c5a2437f..65009c6796e 100644
--- a/gcc/ada/sinfo.ads
+++ b/gcc/ada/sinfo.ads
@@ -1202,11 +1202,6 @@ package Sinfo is
-- conditions holds, and the flag is set, then the division or
-- multiplication can be (and is) converted to a shift.
- -- Is_Overloaded (Flag5-Sem)
- -- A flag present in all expression nodes. Used temporarily during
- -- overloading determination. The setting of this flag is not relevant
- -- once overloading analysis is complete.
-
-- Is_Protected_Subprogram_Body (Flag7-Sem)
-- A flag set in a Subprogram_Body block to indicate that it is the
-- implemenation of a protected subprogram. Such a body needs cleanup
@@ -1820,11 +1815,19 @@ package Sinfo is
-- A STRING_ELEMENT is either a pair of quotation marks ("), or a
-- single GRAPHIC_CHARACTER other than a quotation mark.
+ --
+ -- Is_Folded_In_Parser is True if the parser created this literal by
+ -- folding a sequence of "&" operators. For example, if the source code
+ -- says "aaa" & "bbb" & "ccc", and the produces "aaabbbccc", the flag is
+ -- set. This flag is needed because the parser doesn't know about
+ -- visibility, so the folded result might be wrong, and semantic
+ -- analysis needs to check for that.
-- N_String_Literal
-- Sloc points to literal
-- Strval (Str3) contains Id of string value
-- Has_Wide_Character (Flag11-Sem)
+ -- Is_Folded_In_Parser (Flag4)
-- plus fields for expression
------------------
@@ -7870,6 +7873,9 @@ package Sinfo is
function Is_Entry_Barrier_Function
(N : Node_Id) return Boolean; -- Flag8
+ function Is_Folded_In_Parser
+ (N : Node_Id) return Boolean; -- Flag4
+
function Is_In_Discriminant_Check
(N : Node_Id) return Boolean; -- Flag11
@@ -8725,6 +8731,9 @@ package Sinfo is
procedure Set_Is_Entry_Barrier_Function
(N : Node_Id; Val : Boolean := True); -- Flag8
+ procedure Set_Is_Folded_In_Parser
+ (N : Node_Id; Val : Boolean := True); -- Flag4
+
procedure Set_Is_In_Discriminant_Check
(N : Node_Id; Val : Boolean := True); -- Flag11
@@ -10817,6 +10826,7 @@ package Sinfo is
pragma Inline (Is_Controlling_Actual);
pragma Inline (Is_Dynamic_Coextension);
pragma Inline (Is_Entry_Barrier_Function);
+ pragma Inline (Is_Folded_In_Parser);
pragma Inline (Is_In_Discriminant_Check);
pragma Inline (Is_Machine_Number);
pragma Inline (Is_Null_Loop);
@@ -11098,6 +11108,7 @@ package Sinfo is
pragma Inline (Set_Is_Controlling_Actual);
pragma Inline (Set_Is_Dynamic_Coextension);
pragma Inline (Set_Is_Entry_Barrier_Function);
+ pragma Inline (Set_Is_Folded_In_Parser);
pragma Inline (Set_Is_In_Discriminant_Check);
pragma Inline (Set_Is_Machine_Number);
pragma Inline (Set_Is_Null_Loop);