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: [RFC] [PATCH] Implement -ffortify for C/C++


And let me add one more thing:

Ulrich Drepper wrote:
> This is the wrong approach for a simple set of reasons:
> 
> - gcc will not be able to handle all functions which need to be
>   protected:
> 
>   - POSIX functions not in ISO C/C++
>   - non-standard functions
> 
> - hence gcc will have to be extended to include support to write
>   wrappers outside of gcc to protect the functions for C++ as well
> 
> - 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, the
>   same thing could be implemented more transparently and with at least
>   the same functionality in the system library headers

What do you do with new, additional fortification levels?  I indeed have
plans to extend on the current state and cover even more cases.  That
additional functionality definitely does not fit at all into gcc and
even if it would, having to duplicate the effort in two places, runtime
and gcc, over and over again is just plain wrong.


There is an easy enough method to handle C++ in the runtime headers
without resorting to macros.  It requires one generic compiler
change/extension which then can be used for all wrapper functions and
other functionality as well.  Jakub might illustrate this soon, I hope.

-- 
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â

Attachment: signature.asc
Description: OpenPGP digital signature


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