public inbox for insight-prs@sourceware.org help / color / mirror / Atom feed
From: Johannes Schlatow <johannes.schlatow@googlemail.com> To: nobody@sources.redhat.com Cc: insight-prs@sources.redhat.com, Subject: Re: insight/352: 2 comparisons in cp-name-parser.y create errors at line 1980 and 1985 Date: Sat, 06 Nov 2010 20:33:00 -0000 [thread overview] Message-ID: <20101106203301.22860.qmail@sourceware.org> (raw) The following reply was made to PR insight/352; it has been noted by GNATS. From: Johannes Schlatow <johannes.schlatow@googlemail.com> To: insight-gnats@sources.redhat.com Cc: Subject: Re: insight/352: 2 comparisons in cp-name-parser.y create errors at line 1980 and 1985 Date: Sat, 06 Nov 2010 21:30:57 +0100 I just encountered the same problem. I think the gcc 4.5 is somewhat more restrictive when it comes to the comparison of enums. Thus I patched the corresponding lines: diff -rup insight-6.8/gdb//ada-lang.c insight-6.8_patch/gdb//ada-lang.c --- insight-6.8/gdb//ada-lang.c 2008-02-07 23:27:53.000000000 +0100 +++ insight-6.8_patch/gdb//ada-lang.c 2010-11-06 20:38:22.000000000 +0100 @@ -7683,7 +7683,7 @@ static const char *attribute_names[] = { const char * ada_attribute_name (enum exp_opcode n) { - if (n >= OP_ATR_FIRST && n <= (int) OP_ATR_VAL) + if (n >= (int) OP_ATR_FIRST && n <= (int) OP_ATR_VAL) return attribute_names[n - OP_ATR_FIRST + 1]; else return attribute_names[0]; @@ -8183,7 +8183,7 @@ assign_component (struct value *containe elt = ada_to_fixed_value (unwrap_value (elt)); } - if (exp->elts[*pos].opcode == OP_AGGREGATE) + if (exp->elts[*pos].opcode == (int)OP_AGGREGATE) assign_aggregate (container, elt, exp, pos, EVAL_NORMAL); else value_assign_to_component (container, elt, @@ -8338,7 +8338,7 @@ aggregate_assign_from_choices (struct va { LONGEST lower, upper; enum exp_opcode op = exp->elts[choice_pos].opcode; - if (op == OP_DISCRETE_RANGE) + if (op == (int)OP_DISCRETE_RANGE) { choice_pos += 1; lower = value_as_long (ada_evaluate_subexp (NULL, exp, pos, @@ -8537,7 +8537,7 @@ ada_evaluate_subexp (struct type *expect case BINOP_ASSIGN: arg1 = evaluate_subexp (NULL_TYPE, exp, pos, noside); - if (exp->elts[*pos].opcode == OP_AGGREGATE) + if (exp->elts[*pos].opcode == (int)OP_AGGREGATE) { arg1 = assign_aggregate (arg1, arg1, exp, pos, noside); if (noside == EVAL_SKIP || noside == EVAL_AVOID_SIDE_EFFECTS) @@ -9096,7 +9096,7 @@ ada_evaluate_subexp (struct type *expect return value_zero (value_type (arg1), not_lval); else return value_binop (arg1, arg2, - op == OP_ATR_MIN ? BINOP_MIN : BINOP_MAX); + op == (int)OP_ATR_MIN ? BINOP_MIN : BINOP_MAX); case OP_ATR_MODULUS: { diff -rup insight-6.8/gdb//cp-name-parser.y insight-6.8_patch/gdb//cp-name-parser.y --- insight-6.8/gdb//cp-name-parser.y 2008-01-01 23:53:09.000000000 +0100 +++ insight-6.8_patch/gdb//cp-name-parser.y 2010-11-06 20:38:22.000000000 +0100 @@ -1977,12 +1977,12 @@ cp_comp_to_string (struct demangle_compo char *str, *prefix = NULL, *buf; size_t err = 0; - if (result->type == GLOBAL_DESTRUCTORS) + if ((int)result->type == GLOBAL_DESTRUCTORS) { result = d_left (result); prefix = "global destructors keyed to "; } - else if (result->type == GLOBAL_CONSTRUCTORS) + else if ((int)result->type == GLOBAL_CONSTRUCTORS) { result = d_left (result); prefix = "global constructors keyed to ";
next reply other threads:[~2010-11-06 20:33 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-11-06 20:33 Johannes Schlatow [this message] -- strict thread matches above, loose matches on Subject: below -- 2010-11-10 19:27 kseitz 2010-07-23 7:23 captainhaggy
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20101106203301.22860.qmail@sourceware.org \ --to=johannes.schlatow@googlemail.com \ --cc=insight-prs@sources.redhat.com \ --cc=nobody@sources.redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).