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 vs tree-ssa


Joseph S. Myers wrote:

On Mon, 8 Mar 2004, Mark Mitchell wrote:



are valid whether within one translation unit or across two. But, you cannot complete the same structure type in two different ways in the same translation unit. The idea that in C you could not validly combine all your translation units into a single translation unit (with appropriate alpha-renaming of things with internal linkage, and with appropriate merger of tentative definitions, if you've adopted that (optional) behavior) is, to me, in contradiction with the spirit of the language requiring declarations to have compatible types across translation units.



As far as I know you can combine translation units. Any object or function must have compatible complete type in all translation units. It may, however, be necessary to split up named structure or union types into several separate such named types, one for each incompatible completion of that type, but each object or function defined using such a type can be unambiguously assigned at most one completion (otherwise there is undefined behavior).

I intentionally did not include that operation above.

That's alpha-renaming of structure types, not of things with internal linkage. That's exactly what I mean by saying that positing that multiple completions are simultaneously valid breaks the idea that you combine things into one translation unit.

However, I don't think there's any point in all of us debating this issue. We don't agree on the answer, and none of us has a particularly good way of backing up our position. To me, this idea of multiple completions of the same incomplete type is ghastly. You, however, believe it is what the standard requires, and apparently that it is also what the committe intended.

I would appreciate it if you would communicate with the C committee to find out what they really intend. Ultimately, it's their opinion that matters. We can't resolve this issue just by talking among ourselves.

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