All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H . J . Lu" <hjl@lucon.org>
To: Kjeld Borch Egevang <kjelde@mips.com>
Cc: linux-mips@oss.sgi.com
Subject: Re: Error in gcc version 2.96 20000731
Date: Thu, 13 Sep 2001 14:14:54 -0700	[thread overview]
Message-ID: <20010913141454.A30909@lucon.org> (raw)
In-Reply-To: <NFBBKGGKGLLGNBGCEPKIEEHDCAAA.kjelde@mips.com>; from kjelde@mips.com on Thu, Sep 13, 2001 at 11:09:04PM +0200

On Thu, Sep 13, 2001 at 11:09:04PM +0200, Kjeld Borch Egevang wrote:
> Perhaps I don't get you point, but I get the same with:
> 
> int main()
> {
>   rtx rt;
> 
>   put_code(&rt, (short)5);
>   printf("gen_rtx, code=%d\n", (int)rt.code);
> }
> 

That is not what I meant. You have

typedef struct rtx_def
{
  short code;
  int dummy;
} rtx;
 
The first field of rtx_def is short.

  for (; length >= 0; length--)
    ((int *) rt)[length] = 0;

But you access it as int. If you do

  for (; length >= 0; length--)
    ((short *) rt)[length] = 0;

It will be ok.


H.J.

  reply	other threads:[~2001-09-13 21:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-13 14:15 Error in gcc version 2.96 20000731 Kjeld Borch Egevang
2001-09-13 15:10 ` H . J . Lu
2001-09-13 21:09   ` Kjeld Borch Egevang
2001-09-13 21:09     ` Kjeld Borch Egevang
2001-09-13 21:14     ` H . J . Lu [this message]
2001-09-13 21:22       ` Kjeld Borch Egevang
2001-09-13 21:22         ` Kjeld Borch Egevang
2001-09-13 21:26         ` H . J . Lu
2001-09-13 15:14 ` Maciej W. Rozycki
2001-09-13 15:16   ` H . J . Lu
2001-09-13 20:47   ` Kjeld Borch Egevang
2001-09-13 20:47     ` Kjeld Borch Egevang
2001-09-14 14:42     ` Maciej W. Rozycki

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=20010913141454.A30909@lucon.org \
    --to=hjl@lucon.org \
    --cc=kjelde@mips.com \
    --cc=linux-mips@oss.sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.