This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] [PATCH] Implement -ffortify for C/C++
- From: Dirk Mueller <dmueller at suse dot de>
- To: Ulrich Drepper <drepper at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 21 Feb 2007 18:11:34 +0100
- Subject: Re: [RFC] [PATCH] Implement -ffortify for C/C++
- References: <45DC7A59.2000202@redhat.com>
On Wednesday, 21. February 2007 17:59, Ulrich Drepper wrote:
> This is the wrong approach for a simple set of reasons:
It is the first out of a set of patches.
> - gcc will not be able to handle all functions which need to be
> protected:
Thats correct. thats why I have a __attribute__((fortify)) patch in testing
which will allow glibc headers to annotate POSIX and other non-standard
functions.
> - but once you have such support in the compiler there is no reason to
> add any bloat to gcc by making the built-ins more complicated,
They're not more complicated.
> and with at least
> the same functionality in the system library headers
Unless I missed something, gcc still has to understand what an operator new
is, which is necessary for object sizes being properly propagated. This is an
essential part of the patch series.
> I.e., adding this new option does not solve the problem and the real
> solution makes this patch unnecessary.
The real solution will not rewrite string related functions into their _chk
variants.
Greetings,
Dirk