[Bug tree-optimization/65724] __builtin_object_size difference for C and C++

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 9 21:05:00 GMT 2015


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Well, C has flexible array members, while C++ does not have those, so there is
a significant difference in between the two.  And when you embed a [0] array
into another structure, it is intentional that _FORTIFY_SOURCE=2 (i.e. the more
restrictive mode, beyond the standards) only allows to fill the fields and not
cross to outside of that.



More information about the Gcc-bugs mailing list