[PATCH] Fix i?86 -mregparm for K&R fn declarations (PR target/36015)
Richard Guenther
richard.guenther@gmail.com
Wed Apr 23 22:48:00 GMT 2008
On Wed, Apr 23, 2008 at 11:19 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Wed, Apr 23, 2008 at 11:11:15PM +0200, Richard Guenther wrote:
> > On Wed, Apr 23, 2008 at 9:53 PM, Mark Mitchell <mark@codesourcery.com> wrote:
>
> > Let me just add that I hope with 4.4 we are going to use unit-at-a-time mode
> > always and also doing gimplification unit-at-a-time. This should allow us
> > to decide all these things with the complete TU in place ... hopefully.
>
> That would just fix the testcase in the patch, but:
>
> int foo ();
>
> int bar (void)
> {
> return foo (5, 6, 7, 8) + 3;
> }
>
> in one TU and
> int foo ();
>
> int foo (int a, int b, int c, int d)
> {
> return a + b + c + d;
> }
>
> in another one, everything compiled with -O2 -m32 -mregparm=3 would still be
> broken.
Yeah - bad missing prototypes. Which reminds me of a local patch we have in
our tree (attached) to warn about calls to such functions.
Richard.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Wunprototyped-calls.diff
Type: text/x-diff
Size: 3439 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080423/2d9a50cc/attachment.bin>
More information about the Gcc-patches
mailing list