Kenneth Graunke <kenn...@whitecape.org> writes:

> On Monday, June 11, 2018 7:26:11 PM PDT Francisco Jerez wrote:
>> diff --git a/src/intel/compiler/brw_eu.c b/src/intel/compiler/brw_eu.c
>> index 6ef0a6a577c..80f05240b42 100644
>> --- a/src/intel/compiler/brw_eu.c
>> +++ b/src/intel/compiler/brw_eu.c
>> @@ -356,14 +356,14 @@ brw_disassemble(const struct gen_device_info *devinfo,
>>     bool dump_hex = (INTEL_DEBUG & DEBUG_HEX) != 0;
>>  
>>     for (int offset = start; offset < end;) {
>> -      const brw_inst *insn = assembly + offset;
>> +      const brw_inst *insn = (const brw_inst *)((char *)assembly + offset);
>
> This isn't standard C either, but void * math is a pretty common
> compiler extension that's been around forever.  Personally, I'd
> prefer that we keep using it, as it's much more readable.

*Shrug*, using void pointer arithmetic here will cause GCC to emit a
warning "pointer of type ‘void *’ used in arithmetic".

Attachment: signature.asc
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to