This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH [alternative] to fix mingw bootstrap failure


----- 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


| 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]