[lkml]   [2018]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] scsi: aic7xxx: Fix unintended sign extension issue
On Thu, 2018-10-25 at 16:13 +0100, Colin King wrote:
> From: Colin Ian King <>
> In the expression "ahc_inb(ahc, port+3) << 24", the initial value is
> a u8, but is promoted to a signed int, then sign-extended to
> uint64_t.

Why is this, that's highly non intuitive? The compiler is supposed to
promote to the biggest type, which is uint64_t and then do the


 \ /
  Last update: 2018-10-25 17:33    [W:0.052 / U:2.920 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site