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: [PATCH] C undefined behavior fix


On Jan  7, 2002, Linus Torvalds <torvalds@transmeta.com> wrote:

> On 7 Jan 2002, Alexandre Oliva wrote:
>> On Jan  7, 2002, Linus Torvalds <torvalds@transmeta.com> wrote:
>> 
>> > Which choice do you think is the _intelligent_ one?
>> 
>> I'd surely go with the implementation that makes code with defined
>> behavior work correctly and as fast as possible.

> But _both_ do that for the constant case. And have you ever seen the
> non-constant case?

I had got the impression that RELOC would add an offset that was not
known at compile time, because the built-in strcpy will not be
optimized to memcpy if the constant offset is outside the bounds of
the string in the current CVS version of GCC, so there isn't any
problem in this case.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


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