Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kai Tietz <ktietz70@googlemail.com>
To: gdb-patches@sourceware.org
Subject: [patch]: Fix build of gdb with gcc 4.5
Date: Mon, 27 Jul 2009 18:51:00 -0000	[thread overview]
Message-ID: <90baa01f0907271145r6f87f6f8r7fc6b065808dc160@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 397 bytes --]

Hello,

ChangeLog
2009-07-27  Kai Tietz  <kai.tietz@onevision.com>

	* ada-lang.c (ada_attribute_name): Fix compare of different
	enum types.
	* cp-name-parser.y: Likewise.
	* dwarf2read.c: Likewise.

Tested for i686-pc-cygwin and for x86_64-pc-mingw32. Ok for apply?

Kai

-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

[-- Attachment #2: gdb.diff --]
[-- Type: text/x-c, Size: 3337 bytes --]

? gdb.diff
Index: ada-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/ada-lang.c,v
retrieving revision 1.229
diff -u -3 -r1.229 ada-lang.c
--- ada-lang.c	2 Jul 2009 17:25:52 -0000	1.229
+++ ada-lang.c	27 Jul 2009 18:37:08 -0000
@@ -7498,7 +7498,7 @@
 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];
@@ -8005,7 +8005,7 @@
       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, 
@@ -8160,7 +8160,7 @@
     {
       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,
@@ -8578,7 +8578,7 @@
 
     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)
@@ -9198,7 +9198,7 @@
 	{
 	  binop_promote (exp->language_defn, exp->gdbarch, &arg1, &arg2);
 	  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:
Index: cp-name-parser.y
===================================================================
RCS file: /cvs/src/src/gdb/cp-name-parser.y,v
retrieving revision 1.15
diff -u -3 -r1.15 cp-name-parser.y
--- cp-name-parser.y	31 Mar 2009 20:21:06 -0000	1.15
+++ cp-name-parser.y	27 Jul 2009 18:37:09 -0000
@@ -1979,12 +1979,12 @@
   char *str, *prefix = NULL, *buf;
   size_t err = 0;
 
-  if (result->type == GLOBAL_DESTRUCTORS)
+  if (result->type == (int) GLOBAL_DESTRUCTORS)
     {
       result = d_left (result);
       prefix = "global destructors keyed to ";
     }
-  else if (result->type == GLOBAL_CONSTRUCTORS)
+  else if (result->type == (int) GLOBAL_CONSTRUCTORS)
     {
       result = d_left (result);
       prefix = "global constructors keyed to ";
@@ -2048,7 +2048,7 @@
   char *str;
   size_t err = 0;
 
-  if (result->type == GLOBAL_DESTRUCTORS)
+  if (result->type == (int) GLOBAL_DESTRUCTORS)
     {
       result = d_left (result);
       fputs ("global destructors keyed to ", stdout);
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.324
diff -u -3 -r1.324 dwarf2read.c
--- dwarf2read.c	20 Jul 2009 21:21:17 -0000	1.324
+++ dwarf2read.c	27 Jul 2009 18:37:15 -0000
@@ -8999,7 +8999,7 @@
 	 to canonicalize them.  */
       return DW_STRING (attr);
     default:
-      if (attr->form != GDB_FORM_cached_string)
+      if (attr->form != (int) GDB_FORM_cached_string)
 	{
 	  DW_STRING (attr)
 	    = dwarf2_canonicalize_name (DW_STRING (attr), cu,

             reply	other threads:[~2009-07-27 18:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-27 18:51 Kai Tietz [this message]
2009-07-27 19:45 ` Jan Kratochvil
2009-07-27 19:59   ` Kai Tietz
2009-08-16 12:56   ` Kai Tietz
2009-08-16 15:47     ` Kai Tietz

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=90baa01f0907271145r6f87f6f8r7fc6b065808dc160@mail.gmail.com \
    --to=ktietz70@googlemail.com \
    --cc=gdb-patches@sourceware.org \
    /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: link
Be 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