Re: [PATCH v2 2/2] Avoid clang warnings on casts with stricter alignment requirements

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

 



> On 24 May 2017, at 10:46, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote:
> 
> On Tue, May 23, 2017 at 07:05:18PM +0200, Christophe de Dinechin wrote:
>>> , another alternative would be to have a --enable-alignment-debug,
>> 
>> I tried that, but the problem is to keep that consistent between
>> spice-common and spice-gdk (they may have different configuration). Do
>> you have a similar case? If so, how do you deal with that?
> 
> Why would they have different configuration? AC_CONFIG_SUBDIRS is going
> to pass the command line args to spice-common configure script, which
> will set (or not set) a SPICE_CHECK_ALIGNMENT #define. There might be a
> small added difficulty of making sure #include <mem.h> pick up that
> #define both when one from files in spice-common/ and in spice-gtk/, but
> that should be workable?
> Or am I missing something?

In practice, I ran into unsatisfied symbols when switching between configurations with the flag set or not. They went away when I did a clean build, but I found this annoying. Maybe there is just some missing dependency between mem.c and config.h? Let me try again, I may have mis-interpreted what was happening.


> 
>> 
>> (I could for example always leave the runtime routines in
>> spice-common, even if checks are disabled there, so that you don’t get
>> unsatisfied symbols. But that seems a bit ugly).
>> 
>> 
>>> or something like glib (SPICE_XXX_DEBUG=alignment:foo:bar)
>> 
>> Sorry, I did not really understand that. Do you mean a run-time flag
>> check? If so, since Frediano was objecting a one-instruction runtime
>> check, I think a runtime flag check would not convince him either.
> 
> Ah, if runtime checks are out, forget this ;)
> 
> Christophe

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]