aaron.ballman added a comment.

The changes need some test coverage and a release note.



================
Comment at: clang/lib/Headers/limits.h:55
 #define UCHAR_MAX (__SCHAR_MAX__*2  +1)
-#define USHRT_MAX (__SHRT_MAX__ *2  +1)
+#define USHRT_MAX (__SHRT_MAX__ * 2U + 1U)
 #define UINT_MAX  (__INT_MAX__  *2U +1U)
----------------
It's worth double-checking that this still gives the correct type for the macro:

C2x 5.2.4.2.1p2: For all unsigned integer types for which <limits.h> or 
<stdint.h> define a macro with suffix _WIDTH holding its width N, there is a 
macro with suffix _MAX holding the maximal value 2N − 1 that is representable 
by the type and that has the same type as would an expression that is an object 
of the corresponding type converted according to the integer promotions. ...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144218/new/

https://reviews.llvm.org/D144218

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to