This is the mail archive of the gcc-bugs@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]

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


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

--- Comment #2 from xur at google dot com ---
Do you mean the result of 0 in g++ is intentional?

But I'm not quite understand the relation with _FORTIFY_SOURCE=2. This
macro does not seem to be check in tree-objsz pass.
In other words, if I unset _FORTIFY_SOURCE or set it 1, I still get the
same result.

Could you give me some pointer of the reference that I can check?

Thanks,

Rong

On Thu, Apr 9, 2015 at 2:05 PM, jakub at gcc dot gnu.org <
gcc-bugzilla@gcc.gnu.org> wrote:

> 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.
>
> --
> You are receiving this mail because:
> You reported the bug.
>


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