summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authornvachhar <nvachhar@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-01 01:20:13 +0000
committernvachhar <nvachhar@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-01 01:20:13 +0000
commit440c2ffe0543d5d7ba28ed20f2ef805c551d95cc (patch)
tree84d1914db546f894b1634e8556a864003486304a /libiberty
parent44532e80eb47fc4a07c0587714df71f31f548a11 (diff)
downloadgcc-440c2ffe0543d5d7ba28ed20f2ef805c551d95cc.tar.gz
2009-09-30 Martin Thuresson <martint@google.com>
* regex.c (byte_re_match_2_internal): Split declaration and assignment to avoid -Wc++-compat warning due to goto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152354 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog5
-rw-r--r--libiberty/regex.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 03a84798d30..1b3a44c4a2e 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,8 @@
+2009-09-30 Martin Thuresson <martint@google.com>
+
+ * regex.c (byte_re_match_2_internal): Split declaration and
+ assignment to avoid -Wc++-compat warning due to goto.
+
2009-09-29 Jason Merrill <jason@redhat.com>
* Makefile.in: Enable demangle target.
diff --git a/libiberty/regex.c b/libiberty/regex.c
index fa1df197ce9..ad496846904 100644
--- a/libiberty/regex.c
+++ b/libiberty/regex.c
@@ -5910,11 +5910,14 @@ byte_re_match_2_internal (struct re_pattern_buffer *bufp,
{
/* 1 if this match ends in the same string (string1 or string2)
as the best previous match. */
- boolean same_str_p = (FIRST_STRING_P (match_end)
- == MATCHING_IN_FIRST_STRING);
+ boolean same_str_p;
+
/* 1 if this match is the best seen so far. */
boolean best_match_p;
+ same_str_p = (FIRST_STRING_P (match_end)
+ == MATCHING_IN_FIRST_STRING);
+
/* AIX compiler got confused when this was combined
with the previous declaration. */
if (same_str_p)