Skip to content

Instantly share code, notes, and snippets.

@loreb
Created October 28, 2013 17:26
Show Gist options
  • Save loreb/7200966 to your computer and use it in GitHub Desktop.
Save loreb/7200966 to your computer and use it in GitHub Desktop.
If this gets accepted it will be my first time reporting a compiler bug XD (edit: and **if** it can be submitted without a bugzilla account or whatever)
/* Digital Mars bug */
/* From stdint.h:
#define UINTMAX_MAX 18446744073709551615
... except that "number is not representable":
the compiler rejects integer literals bigger than ULONG_MAX,
which is 32 bits on windows XD
*/
#include <stdint.h>
#include <limits.h>
int main()
{
uintmax_t m64 = UINT64_C(UINTMAX_MAX);
uintmax_t m = UINTMAX_MAX;
(void)m64;
return m ? 0 : 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment