[cfe-dev] [LLVMdev] SPIR Portability Discussion
eli.friedman at gmail.com
Wed Sep 12 15:22:28 PDT 2012
On Wed, Sep 12, 2012 at 2:58 PM, Villmow, Micah <Micah.Villmow at amd.com> wrote:
> Another factor to consider, with size_t etc as defined in SPIR, is the usual
> arithmetic conversions. For instance (assuming a 64-bit long long),
> sizeof(int) + 1LL would be signed if size_t is 32 bits wide, and would be
> unsigned if size_t is 64 bits wide. How is this handled?
> [Villmow, Micah] OpenCL C defines ‘int’ to be 32bits irrespective of the
> host/device bitness. So this would follow the normal integer promotion
I think you're misunderstanding the issue: the point is, is
"sizeof(int) + -8LL < 0" true or false?
More information about the cfe-dev