This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Extension compatibility policy
Eric Botcazou wrote:
Generally speaking, this occurs as follows: a patch happens to break an
extension because GCC has (had?) so many extensions that it is nearly
impossible to foresee all the side-effects a patch will have on them. Then
somebody notices the breakage and complains about it, and sometimes even
writes a patch to undo the breakage (typically an Apple employee, because
Apple is legitimately concerned about backwards compatibility). Then the
patch is knocked down by the language lawyers who are floating around
because, see, if the extension was broken, it probably deserved it as it was
under-specified and, consequently, cannot be anything else than an
abomination.
SOurce compatibility is definitely a very important criterion in new
releases. In the GNAT world, we have a few times run into cases of
constructs which were accepted by GNAT, but which on more careful
examination of the standard, turned out should have been rejected.
Even in such cases, where there is from a language lawyer point of
view a clear bug, we are reluctant to introduce source incompatibilities
if there is no obvious work around which applies in all cases. Sometimes
we have made errors warnings for one release to ease the transition,
or provided a debug switch to get the old (wrong) behavior.