summaryrefslogtreecommitdiff
path: root/gcc/ada/a-stzsea.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-07 13:38:45 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-07 13:38:45 +0000
commit865909d3870128ebe441cad8e9bf85899fe51ae0 (patch)
treede9464c08d324cf727aa591acdf3d8cad2584ad6 /gcc/ada/a-stzsea.adb
parentad73b39701cd115f28e1a536c66d4a999de3f55c (diff)
downloadgcc-865909d3870128ebe441cad8e9bf85899fe51ae0.tar.gz
2009-07-07 Gary Dismukes <dismukes@adacore.com>
* exp_ch6.adb (Expand_Actuals): Call Add_Call_By_Copy_Code for in out parameters when the subtype of the actual is not known to be a subrange of the formal's subtype. (Expand_Call): Generate a range check only in the E_In_parameter case (in out parameter range checks are now handled in Expand_Actuals). * exp_ch4.adb (Expand_N_Slice): Restore code that calls Enable_Range_Check. 2009-07-07 Robert Dewar <dewar@adacore.com> * a-stwise.adb, a-stzsea.adb, a-strsea.adb: Add comments 2009-07-07 Javier Miranda <miranda@adacore.com> * exp_disp.adb (Expand_Interface_Conversion): Handle access type whose designated type comes from a limited views. 2009-07-07 Emmanuel Briot <briot@adacore.com> * prj.ads, prj-nmsc.adb (Mark_Excluded_Sources): Fix handling of locally removed files that are later made visible again in an importing project. 2009-07-07 Robert Dewar <dewar@adacore.com> * gnat_rm.texi: Clarify documentation of Stream_Convert pragma 2009-07-07 Sergey Rybin <rybin@adacore.com> * gnat_ugn.texi: Add an example to the description of gnatcheck 'Style_Checks' rule option. 2009-07-07 Tristan Gingold <gingold@adacore.com> * seh_init.c: Fix inline assembly statement in seh_init.c 2009-07-07 Ed Schonberg <schonberg@adacore.com> * sem_warn.adb (Check_References): Do not emit warnings on formals of an entry body. Only the formals of the entry declaration are traced. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149328 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-stzsea.adb')
-rw-r--r--gcc/ada/a-stzsea.adb7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/a-stzsea.adb b/gcc/ada/a-stzsea.adb
index 4947896809c..0dc6d9bbf5c 100644
--- a/gcc/ada/a-stzsea.adb
+++ b/gcc/ada/a-stzsea.adb
@@ -237,9 +237,14 @@ package body Ada.Strings.Wide_Wide_Search is
return Natural
is
PL1 : constant Integer := Pattern'Length - 1;
- Ind : Integer; -- can be negative if Pattern'Length > Source'Length
Cur : Natural;
+ Ind : Integer;
+ -- Index for start of match check. This can be negative if the pattern
+ -- length is greater than the string length, which is why this variable
+ -- is Integer instead of Natural. In this case, the search loops do not
+ -- execute at all, so this Ind value is never used.
+
begin
if Pattern = "" then
raise Pattern_Error;