From: Ulrich Drepper Date: Wed, 30 Jan 2019 07:18:22 +0000 (+0000) Subject: dumpfile.c (opt_info_switch_p_1): Ignore '-' if it appears after '='. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2ab6839bccb22a04c6df2000858c36d0ffa313ce;p=gcc.git dumpfile.c (opt_info_switch_p_1): Ignore '-' if it appears after '='. * dumpfile.c (opt_info_switch_p_1): Ignore '-' if it appears after '='. From-SVN: r268380 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d040d970d5f..1b9c8e4976f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-01-30 Ulrich Drepper + + * dumpfile.c (opt_info_switch_p_1): Ignore '-' if it appears + after '='. + 2019-01-29 Martin Sebor PR c/88956 diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c index c92bba8efd1..14b6dfea75e 100644 --- a/gcc/dumpfile.c +++ b/gcc/dumpfile.c @@ -1915,10 +1915,9 @@ opt_info_switch_p_1 (const char *arg, dump_flags_t *flags, end_ptr = strchr (ptr, '-'); eq_ptr = strchr (ptr, '='); - if (eq_ptr && !end_ptr) + if (eq_ptr && (!end_ptr || eq_ptr < end_ptr)) end_ptr = eq_ptr; - - if (!end_ptr) + else if (!end_ptr) end_ptr = ptr + strlen (ptr); length = end_ptr - ptr;