From: Richard Hirst <rhirst@linuxcare.com>
To: Alan Modra <alan@linuxcare.com.au>
Cc: parisc-linux@thepuffingroup.com
Subject: Re: [parisc-linux] hppa64 gcc sizeof() bug?
Date: Wed, 6 Dec 2000 12:18:55 +0000 [thread overview]
Message-ID: <20001206121855.S7166@linuxcare.com> (raw)
In-Reply-To: <20001206115203.Q7166@linuxcare.com>; from rhirst@linuxcare.com on Wed, Dec 06, 2000 at 11:52:03AM +0000
On Wed, Dec 06, 2000 at 11:52:03AM +0000, Richard Hirst wrote:
> Hi Alan,
> The following shows the compiler getting confused over the size
> of a struct. This is with a gcc/binutils built since the last
> fix you did for me.
>
> Richard
>
>
> [rhirst@rhirst play]$ cat tc.c
>
>
> typedef unsigned int u32;
> #define NULL ((void *)0)
>
> struct kernel_sym32 {
> u32 value;
> char name[60];
> };
>
> extern int sys_get_kernel_syms(void *);
> extern int thing(struct kernel_sym32 *table);
>
> int sys32_get_kernel_syms(struct kernel_sym32 *table)
> {
> int len, i;
>
> len = sizeof (struct kernel_sym32);
> for (i = 0; i < len; i++, table += sizeof (struct kernel_sym32)) {
> if (thing(table))
> break;
> }
> return i;
> }
Just changed it to 'table += 64' and it still generates code that
adds 4096, so sizeof is not relevant.
Richard
next prev parent reply other threads:[~2000-12-06 12:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-06 11:52 [parisc-linux] hppa64 gcc sizeof() bug? Richard Hirst
2000-12-06 12:18 ` Richard Hirst [this message]
2000-12-06 18:28 ` Grant Grundler
2000-12-06 12:44 ` Richard Hirst
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=20001206121855.S7166@linuxcare.com \
--to=rhirst@linuxcare.com \
--cc=alan@linuxcare.com.au \
--cc=parisc-linux@thepuffingroup.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