[Nouveau] [Bug 80266] Undefined operation in tgsi_ureg.c left shift of 1 by 31 places cannot be represented in type 'int'

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jun 19 22:48:55 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=80266

--- Comment #1 from Ilia Mirkin <imirkin at alum.mit.edu> ---
(In reply to comment #0)
> In tgsi_ureg.c:1498
> "if (ureg->vs_inputs[i/32] & (1 << (i%32))) {"
> when i==31 then 1 << 31 may be computed.
> With gcc option -std=c99 this is wrong because the result cannot be int.
> 
> Perhaps the right instruction is
> "if (ureg->vs_inputs[i/32] & ((unsigned) 1 << (i%32))) {"

Where is -std=c99 coming from? Also I'd guess the better thing is 1U instead of
(unsigned)1 :)

Feel free to send a patch btw.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20140620/0e4f37be/attachment.html>


More information about the Nouveau mailing list