[cfe-commits] r89343 - /cfe/trunk/lib/Headers/stdint.h
Chris Lattner
clattner at apple.com
Thu Nov 19 08:26:25 PST 2009
This is great work Ken! Are the ptrdiff types ever actually different
from the intptr types?
-Chris
On Nov 19, 2009, at 2:33 PM, Ken Dyck <ken.dyck at onsemi.com> wrote:
> Author: kjdyck
> Date: Thu Nov 19 06:33:01 2009
> New Revision: 89343
>
> URL: http://llvm.org/viewvc/llvm-project?rev=89343&view=rev
> Log:
> Construct the macro body of PTRDIFF_MAX and PTRDIFF_MIN from
> __PTRDIFF_WIDTH__.
>
>
> Modified:
> cfe/trunk/lib/Headers/stdint.h
>
> Modified: cfe/trunk/lib/Headers/stdint.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/stdint.h?rev=89343&r1=89342&r2=89343&view=diff
>
> ===
> ===
> ===
> =====================================================================
> --- cfe/trunk/lib/Headers/stdint.h (original)
> +++ cfe/trunk/lib/Headers/stdint.h Thu Nov 19 06:33:01 2009
> @@ -606,23 +606,19 @@
> #define INTPTR_MIN __stdint_exjoin3( INT, __INTPTR_WIDTH__, _MIN)
> #define INTPTR_MAX __stdint_exjoin3( INT, __INTPTR_WIDTH__, _MAX)
> #define UINTPTR_MAX __stdint_exjoin3(UINT, __INTPTR_WIDTH__, _MAX)
> +#define PTRDIFF_MIN __stdint_exjoin3( INT, __PTRDIFF_WIDTH__, _MIN)
> +#define PTRDIFF_MAX __stdint_exjoin3( INT, __PTRDIFF_WIDTH__, _MAX)
>
> #if __POINTER_WIDTH__ == 64
>
> -#define PTRDIFF_MIN INT64_MIN
> -#define PTRDIFF_MAX INT64_MAX
> #define SIZE_MAX UINT64_MAX
>
> #elif __POINTER_WIDTH__ == 32
>
> -#define PTRDIFF_MIN INT32_MIN
> -#define PTRDIFF_MAX INT32_MAX
> #define SIZE_MAX UINT32_MAX
>
> #elif __POINTER_WIDTH__ == 16
>
> -#define PTRDIFF_MIN INT16_MIN
> -#define PTRDIFF_MAX INT16_MAX
> #define SIZE_MAX UINT16_MAX
>
> #else
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list