[Mesa-dev] [PATCH 19/23] intel/eu: Fix up various type conversions in brw_eu.c that are illegal C++.
Kenneth Graunke
kenneth at whitecape.org
Thu Jun 21 22:45:32 UTC 2018
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180621/cff1df51/attachment.sig>
More information about the mesa-dev
mailing list