[Bug tree-optimization/105043] Documentation for __builtin_object_size and other Object Size checking builtin functions should mention - D_FORTIFY_SOURCE

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Dec 7 04:21:06 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105043

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|MOVED                       |---
            Summary|Please document             |Documentation for
                   |-D_FORTIFY_SOURCE           |__builtin_object_size and
                   |                            |other Object Size checking
                   |                            |builtin functions should
                   |                            |mention - D_FORTIFY_SOURCE
           Severity|normal                      |enhancement
             Status|RESOLVED                    |NEW

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I do think we should mention in the section about __builtin_object_size that
this used in connection with the -D_FORTIFY_SOURCE feature of some libc's.

That is on this page:
https://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html#Object-Size-Checking

Mention that the libc feature -D_FORTIFY_SOURCE uses these builtins.
I am not 100% sure on the exact wording but that should give a hint to the user
of GCC to look into glibc/libc documentation for -D_FORTIFY_SOURCE.


More information about the Gcc-bugs mailing list