public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: James E Wilson <wilson@specifixinc.com>
Cc: Alan Modra <amodra@bigpond.net.au>,
	Nick Clifton <nickc@redhat.com>, Ben Elliston <bje@au1.ibm.com>,
	binutils@sources.redhat.com
Subject: Re: build failure for ia64 (due to -Werror)
Date: Fri, 18 Mar 2005 23:37:00 -0000	[thread overview]
Message-ID: <jell8k8wrd.fsf@sykes.suse.de> (raw)
In-Reply-To: <1111177693.9897.18.camel@aretha.corp.specifixinc.com> (James E. Wilson's message of "Fri, 18 Mar 2005 12:28:13 -0800")

James E Wilson <wilson@specifixinc.com> writes:

> On Fri, 2005-03-18 at 04:21, Alan Modra wrote:
>> I would guess 32-bit host, no --enable-64-bit-bfd.  Then "bfd_vma insn"
>> is 32-bit and ia64_insn is long long.  There's worse things in that code
>> than type-punned pointers..
>
> I believe this can only happen if --enable-targets=all is used.
>
> I see this is a documented feature in configure.in.  This seems like a
> flaw to me.  The elfxx-ia64.c file won't work without a 64-bit integer
> type, and it seems unreasonable to try to fix this.

The use of 32-bit vs 64-bit bfd_vma has nothing to do with the general
availability of a 64-bit type.  This bug is trivial to fix.  I've checked
in this patch as obvious.

Andreas.

2005-03-18  Andreas Schwab  <schwab@suse.de>

	* elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
	from bfd_vma to ia64_insn, remove broken cast.

Index: bfd/elfxx-ia64.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-ia64.c,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -a -p -u -p -a -r1.149 -r1.150
--- bfd/elfxx-ia64.c	14 Mar 2005 18:55:44 -0000	1.149
+++ bfd/elfxx-ia64.c	18 Mar 2005 21:31:31 -0000	1.150
@@ -3119,7 +3119,8 @@ elfNN_ia64_install_value (hit_addr, v, r
 {
   const struct ia64_operand *op;
   int bigendian = 0, shift = 0;
-  bfd_vma t0, t1, insn, dword;
+  bfd_vma t0, t1, dword;
+  ia64_insn insn;
   enum ia64_opnd opnd;
   const char *err;
   size_t size = 8;
@@ -3308,7 +3309,7 @@ elfNN_ia64_install_value (hit_addr, v, r
       insn = (dword >> shift) & 0x1ffffffffffLL;
 
       op = elf64_ia64_operands + opnd;
-      err = (*op->insert) (op, val, (ia64_insn *)& insn);
+      err = (*op->insert) (op, val, &insn);
       if (err)
 	return bfd_reloc_overflow;
 

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  parent reply	other threads:[~2005-03-18 21:33 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-18  3:58 Ben Elliston
2005-03-18 13:14 ` Nick Clifton
2005-03-18 14:13   ` Alan Modra
2005-03-18 22:15     ` James E Wilson
2005-03-18 22:49       ` Ian Lance Taylor
2005-03-18 23:31         ` Ian Lance Taylor
2005-03-18 23:52           ` James E Wilson
2005-03-18 23:37       ` Andreas Schwab [this message]
2005-03-19  0:42         ` Alan Modra
2005-03-19  1:56           ` Andreas Schwab
2005-03-19  4:04             ` James E Wilson
2005-03-19  4:30               ` Andreas Schwab
2005-03-19  9:44                 ` James E Wilson
2005-03-19 12:13                 ` James E Wilson
2005-03-19 17:57                 ` James E Wilson
2005-03-19 18:37                   ` Alan Modra
2005-03-19 18:33                 ` James E Wilson
2005-03-19 19:00                   ` Andreas Schwab
2005-03-23  9:45           ` James E Wilson
2005-03-23 19:24             ` Nick Clifton
2005-03-24  9:27               ` James E Wilson
2005-03-24 14:58                 ` Nick Clifton
2005-03-19  0:56       ` Alan Modra
2005-03-22  2:19   ` Ben Elliston
2005-03-20  9:26 Paul Schlie
2005-03-20 19:42 ` Andreas Schwab

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=jell8k8wrd.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=amodra@bigpond.net.au \
    --cc=binutils@sources.redhat.com \
    --cc=bje@au1.ibm.com \
    --cc=nickc@redhat.com \
    --cc=wilson@specifixinc.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: 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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).