IMA corner case with forward declarations of statics

Geoff Keating geoffk@geoffk.org
Thu Jun 24 03:07:00 GMT 2004


On 23/06/2004, at 7:58 PM, Mark Mitchell wrote:

> Zack Weinberg wrote:
>
>> Now, GCC 3.4's IMA doesn't do the right thing with this either; no
>> matter which order the files are given in, you get
>>
>> Assembler messages:
>> Error: symbol `foo' is already defined
>>
>> No one has noticed, which leads me to believe that this will not be a
>> problem in real life.  So I propose to detect the case where we would
>> generate incorrect code, and call sorry() instead.
>>
> I think that's fine; it's certainly a progression.
>
> If IMA were implemented as in other compilers (i.e., parse entire 
> translation units in isolation, and then have a separate merge step) 
> things would not get confused.

By a strange coincidence, that's what the original implementation did.



More information about the Gcc mailing list