From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: rms@gnu.org Cc: mark@codesourcery.com, jbuck@synopsys.COM, gcc@gcc.gnu.org Subject: Re: type based aliasing again Date: Thu, 30 Sep 1999 18:02:00 -0000 Message-ID: <2304.937209305@upchuck.cygnus.com> References: <199909100634.CAA01812@psilocin.gnu.org> X-SW-Source: 1999-09n/msg00601.html Message-ID: <19990930180200.EATVNvDPZ-2yhGKs6TT5Z5T17ThHsxlxJh-amZL1cgE@z> In message < 199909100634.CAA01812@psilocin.gnu.org >you write: > However, I have a rather serious objection: it means that users cannot > tell whether their code is valid, even according to the GCC rules, > without knowing the internals of the compiler. > > This has always been true. It is true in the current version of GCC > with regard to aliasing, even when -fstrict-aliasing is used. It is > part of the nature of C. > > The goal of trying to avoid it is unrealistic and misguided; it can't > be done. So this cannot be a valid reason to reject a change. Agreed. However, unlike many other decisions we make in the compiler this change is explicitly detecting invalid code and working around it. Like it or not, people will come to depend on this feature, especially if we do not thoroughly document it, which in turn will lead to more complaints later if GCC fails to work around some broken code that it fixed before. Thus, I think it is an absolute requirement that we document this behavior. Anything else is just asking for more problems in the long run. jeff