This is the mail archive of the gcc@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: IMA corner case with forward declarations of statics


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.

--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com


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