Re: [PATCH rdma-rc v1] overflow: Fix -Wtype-limits compilation warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2019-03-06 at 16:44 +-0000, Jason Gunthorpe wrote:
+AD4 On Wed, Mar 06, 2019 at 02:37:17PM +-0200, Leon Romanovsky wrote:
+AD4 +AD4 diff --git a/include/linux/overflow.h b/include/linux/overflow.h
+AD4 +AD4 index 40b48e2133cb..a47fb6046c0a 100644
+AD4 +AD4 +-+-+- b/include/linux/overflow.h
+AD4 +AD4 +AEAAQA -227,10 +-227,10 +AEAAQA
+AD4 +AD4  	typeof(d) +AF8-d +AD0 d+ADs						+AFw
+AD4 +AD4  	u64 +AF8-a+AF8-full +AD0 +AF8-a+ADs						+AFw
+AD4 +AD4  	unsigned int +AF8-to+AF8-shift +AD0					+AFw
+AD4 +AD4 -		+AF8-s +AD4APQ 0 +ACYAJg +AF8-s +ADw 8 +ACo sizeof(+ACo-d) ? +AF8-s : 0+ADs		+AFw
+AD4 +AD4 +-		(+AF8-s +AD0APQ 0 +AHwAfA +AF8-s +AD4 0) +ACYAJg +AF8-s +ADw 8 +ACo sizeof(+ACo-d) ? +AF8-s : 0+ADs	+AFw
+AD4 
+AD4 I think this is just trading a tautological compare gcc happens to
+AD4 know about today (+AF8-s +AD4APQ 0) with one it currently doesn't (+AF8-s +AD0APQ 0 +AHwAfA
+AD4 +AF8-s +AD4 0)

Since it is uncommon to write (+AF8-s +AD4APQ 0) as (+AF8-s +AD0APQ 0 +AHwAfA +AF8-s +AD4 0) my hope is
that the gcc maintainers won't consider it interesting to make gcc report
a warning about the latter expression.

Bart.



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux