This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR optimization/11980: Fix strcat builtin on x86_64.
- From: Roger Sayle <roger at eyesopen dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 3 Sep 2003 14:14:31 -0600 (MDT)
- Subject: Re: [PATCH] PR optimization/11980: Fix strcat builtin on x86_64.
On Wed, 3 Sep 2003, Richard Henderson wrote:
> On Wed, Sep 03, 2003 at 06:38:03AM -0600, Roger Sayle wrote:
> > However, there is the possibility that backends really do want to
> > specify a size_t that is smaller than the size of a pointer ...
>
> In general, I would consider such a port broken.
>
> > If for nothing else, to defend against such misconfigurations
> > in the future.
>
> I'd prefer we just abort. Possibly as early as construction
> of the size_type node.
Are you sure? I'm uncomfortable that the x86_64-freebsd5.1 port
is obviously quite functional, able to bootstrap the GCC compiler
and run the testsuite, yet the only place in the code that is
"fragile" to size_t being smaller than a pointer is the recently
added strcat built-in? Odd.
It would be unusual that strcat is correct and the rest of the
compiler wrong. Even if this is an inappropriate workaround,
perhaps builtins.c should be consistent with the rest of GCC?
Roger
--