This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH [alternative] to fix mingw bootstrap failure
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: Per Bothner <per at bothner dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Andrew Pinski <pinskia at physics dot uc dot edu>
- Date: Wed, 02 Jun 2004 06:06:15 +0100
- Subject: Re: PATCH [alternative] to fix mingw bootstrap failure
- References: <40B92110.6030703@bothner.com> <40B924E9.2000105@bothner.com><9D944B4E-B1D8-11D8-A101-000393A6D2F2@physics.uc.edu>
- Reply-to: Danny Smith <dannysmith at users dot sourceforge dot net>
----- Original Message -----
From: "Andrew Pinski" <pinskia@physics.uc.edu>
To: "Per Bothner" <per@bothner.com>
Cc: <gcc-patches@gcc.gnu.org>; "Andrew Pinski" <pinskia@physics.uc.edu>
Sent: Sunday, 30 May 2004 02:28
Subject: Re: PATCH [alternative] to fix mingw bootstrap failure
|
| On May 29, 2004, at 20:03, Per Bothner wrote:
|
| > Per Bothner wrote:
| >
| >> I notice other targets (rs6000, arm, pa, possibly others)
| >> instead modify the SYMBOL_REF in place, smashing in a new name.
| >> That may be a better solution. If that is the recommended
| >> approach (which seems plausible), I'll try that instead.
| >
| > This alternative patch uses the smash-name-in-place approach.
| > It seems to work on my simple testcase at least
| >
| > I don't know any convenient way to test this, except to do
| > a mingw build (using Mohan's scripts). Assuming this works,
| > is this OK to check in? Perhaps someone else can test this
| > patch for their winnt target setup?
| > --
|
| I will note that the Darwin's back-end which I fixed does the
| create new SYMBOL_REF technique and not smash into place. I
| think it does this way as they can reference the original
| SYMBOL_REF still.
|
| Thanks,
| Andrew Pinski
The smash-in-place approach causes problems. This code should be rejected because
of type conflict:
void __attribute__((stdcall)) foo(int);
void foo(int i) {};
> stdcall.c:2: error: conflicting types for 'foo'
> stdcall.c:1: error: previous declaration of 'foo' was here
With your smash patch, the conflict is not diagnosed.
Danny
|