This is the mail archive of the gcc-patches@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: don't assume pointer cast to unsigned long is a valid initializer


On Feb 28, 2003, Geoff Keating <geoffk at geoffk dot org> wrote:

> The most fundamental reason is that Alexandre's patch changes this testcase.
> Changing testcases without changing their name is strongly discouraged.

I disagree with your reasoning.  You're basically saying automated
regression testers are more important than the time of the
developers and than tracking the history of fixes in a testcase that
was previously broken.

> Other reasons are that Alexandre's patch makes the testcase an exact
> duplicate of 20011114-1.c; and that we've had almost this exact patch
> proposed before, committed, and reverted by me for the first reason above.

Your reason is also incompatible with:

> + <p>If a testcase itself is incorrect, but there's a possibility that an
> + improved testcase might fail on some platform where the incorrect
> + testcase passed,

This is not the case of the change I made.  For one, because
__SIZE_TYPE__ is unsigned long or something of the same mode on most
platforms, and the test would pass.  On those in which it is not, it
would have failed, and there is no possible fix except by giving the
compiler knowledge about the existence of wider (or narrower)
relocations in the assembler and about policies on sign- or
zero-extending pointers by the linker and the dynamic linker when
applying such relocations.  I don't think the compiler has any
business worrying about this.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist                Professional serial bug killer


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