[Mesa-dev] Mesa (master): mesa: Add channel-wise copy propagation to ir_to_mesa.

Ian Romanick idr at freedesktop.org
Fri Jan 14 15:44:01 PST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/14/2011 03:22 PM, Brian Paul wrote:
> On 01/14/2011 02:58 PM, Eric Anholt wrote:
>> +void
>> +ir_to_mesa_visitor::copy_propagate(void)
>> +{
>> +   ir_to_mesa_instruction *acp[this->next_temp * 4];
> 
> This does not compile with MSVC:
> 
> src\mesa\program\ir_to_mesa.cpp(2644) : error C2466: cannot allocate an
> array of constant size 0
> src\mesa\program\ir_to_mesa.cpp(2644) : error C2133: 'acp' : unknown size
> src\mesa\program\ir_to_mesa.cpp(2646) : error C2070:
> 'ir_to_mesa_instruction *[]': illegal sizeof operand
> src\mesa\program\ir_to_mesa.cpp(2709) : error C2070:
> 'ir_to_mesa_instruction *[]': illegal sizeof operand
> src\mesa\program\ir_to_mesa.cpp(2718) : error C2070:
> 'ir_to_mesa_instruction *[]': illegal sizeof operand

Right.  C89 and unextended C++ require that the size of an array be a
compile-time constant.  GCC, G++, C99, C++0x (I'm pretty sure), and
clang relax this requirement.  sigh...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk0w374ACgkQX1gOwKyEAw/klgCfTGVqvxMvNHf5SBRJ92hMH1Df
VsIAoJAM/m8mg5EXqnYBbzJLgMEabwU4
=LmIv
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list