[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC, PATCH] shrink struct vectorlike_header #2

From: Stefan Monnier
Subject: Re: [RFC, PATCH] shrink struct vectorlike_header #2
Date: Wed, 07 Nov 2012 22:08:47 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> I agree that your code looks better, but it causes 'dereferencing
> type-punned pointer will break strict-aliasing rules' warning
> (and so error if --enable-gcc-warnings, gcc 4.7.2).

I doubt (*(struct Lisp_Vector **)((char *) v + header_size))
is any better.  I guess it just defeats gcc's detection of the problem.
Maybe someone like Paul might have an idea how to solve this "cleanly"?
In the mean time, feel free to use your code, but please add my code in
comment with a note about why we don't use it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]