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: Ada policy


Robert Dewar <dewar@gnat.com> writes:

> Reading Zack's message:
>> Second, the Ada maintainers have said in the past that they
>> deliberately break source compatibility between releases (such that
>> GCC 3.x with Ada is only guaranteed to be buildable with GCC 3.(x-1)).
>
> That's entirely wrong. Nothing is broken deliberately, and no one
> ever said anything of the kind.

I disagree; that *is*, in fact, what is said or at least strongly
implied by messages like
<http://gcc.gnu.org/ml/gcc/2002-05/msg00086.html>:

# Right now, we are in a transitioning phase, since there is no GCC
# release yet with Ada support. We could even disable Ada by default,
# as there will be people building binary versions anyway. For future
# versions, there is a very clear base compiler that should be used,
# which is the previous FSF released version of GCC.

Note that that was in the context of a discussion of whether configure
should refuse to enable Ada if the "wrong" bootstrap compiler was
found.

More explicitly, <http://gcc.gnu.org/ml/gcc/2002-05/msg02458.html> -
which you wrote - says that

#> It would be nice if we could preserve bootstrap compatibility
#> farther back, but if there are major gains to maintainability from
#> raising the bar, fine.
#
# Well certainly we are not going to make incompatibilities for the
# sake of making incompatibilties. But there are always cases in every
# release where we preserve some kludge for maintainability.

and goes on to talk about how it'd be nice to use pragma Unreferenced,
but this breaks compatibility with the Ada compiler in GCC 3.[12].
And, grepping gcc/ada, I see that there are now many uses of pragma
Unreferenced - so building GNAT with GCC 3.(<3) has indeed been
deliberately broken.

Now, I say

>> There must be guaranteed bidirectional source compatibility between
>> all 3.x branches of GCC, such that it is possible to build any 3.x
>> version of GNAT with any other 3.x version of GNAT.

and I do still insist on that.  But that doesn't mean you can't use
pragma Unreferenced; it just has to be properly conditionalized so
that GCC 3.(<3) somehow sees pragma Warnings (Off) instead.

With regard to this statement

> Unfortunately there are occasionally cases where bugs cannot be
> fixed without breaking this requirement. It's relatively rare, and
> for some time now, GNAT has been able to be built with a pretty
> significant variety of starting compilers

I have some sympathy for a situation where version X of GNAT contained
invalid code which version Y (Y > X) correctly rejects; but when this
occurs while version X is a still-live release branch, patches should
go into version X to correct the bug.

When it's a case of version X contains a bug which causes it to
miscompile the code in version Y (again, Y > X) I have *no* sympathy.
We work around this kind of thing all the damn time in the parts of
the compiler that are written in C, and I see no reason why the Ada
parts should be any different.

I'd also add that personally, I consider my third requirement (patch
submission according to the same requirements binding on all other
contributors) to be much more important than the one you chose to
discuss.

zw


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