On 13/05/15 16:43, Matt Turner wrote:
> On Wed, May 13, 2015 at 10:37 AM, Emil Velikov <emil.l.veli...@gmail.com> 
> wrote:
>> As we evaluate sizeof() at compile time, having the run-time assert()
>> does not provide any benefits. Move to the compile-time version
>> STATIC_ASSERT() which will kindly prompt us when this go wrong.
>>
>> Cc: Matt Turner <matts...@gmail.com>
>> Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com>
>> ---
> 
> Oh, good idea. Presumably you confirmed that the STATIC_ASSERT
> triggers at compile-time when you pass an unsupported type to the
> macro? If so,
> 
With some hacking[1] it did trigger. Just in case, Vinson - can you try
this patch [2] on a Windows/SolarisOS VM please ?

> Reviewed-by: Matt Turner <matts...@gmail.com>
> 
Thanks !


-Emil

[1] The asserts are only for the Windows/Solaris code, so I copied the
logic to the Linux/GCC build, and dropped on the "sizeof(*v) ==
sizeof(uint64_t)" case.

[2] http://patchwork.freedesktop.org/patch/49235/
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to