IMA corner case with forward declarations of statics
Dale Johannesen
dalej@apple.com
Fri Jun 25 04:28:00 GMT 2004
On Jun 24, 2004, at 9:18 PM, Alexandre Oliva wrote:
> On Jun 24, 2004, Zack Weinberg <zack@codesourcery.com> wrote:
>> Dale Johannesen <dalej@apple.com> writes:
>>> I really don't think IMA mode ought to affect semantics.
>
>> I agree in principle, but I do not think it is feasible in practice
>> and in the present state of the implementation.
>
> I think IMA can actually be expected to be able to perform additional
> verifications and issue additional diagnostics that separate
> compilation can't. Violations of the ODR, for example, that can't be
> detected with the separate compilation model, for which no diagnostic
> is required, can be somewhat easy to diagnose in IMA. Forcing IMA to
> behave like separate compilation just for the sake of it sounds like
> missing a good opportunity to aid the user in finding
> otherwise-hard-to-locate errors.
It is not "just for the sake of it", it is so that C programs which
have worked for
the last 10 years or so will continue to work, only faster.
I agree that a warning is a good idea, and I'm willing to believe an
error would
be better in C++.
More information about the Gcc
mailing list