Web lists-archives.com

Re: Strict aliasing, yes or no?




On Wed, 19 Apr 2017 22:12:24 +0100
Chris Vine <chris@xxxxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, 19 Apr 2017 12:21:06 +0100
> That (GArray to GRealArray) does break the strict aliasing rules,
> unless done through a union (OK with unions in C99 with Technical
> Corrigendum 3 and in C11, implementation defined only in C89, but
> fine with gcc and clang).

Perhaps I should add that is also valid C89/99/11 if you cast pointer
values with memcpy(), which will be optimized out with any decent
compiler (such as gcc and clang).
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-devel-list