Missing default for INT64_MIN in include/llvm/Support/DataTypes.h.in

Here is a patch -- on a side note I see that a patch checking _MSC_VER has gone in which defines a lot of limits that should really come from <limits.h> ... Anyone care to comment on this?

m.

diff.txt (618 Bytes)

Here is a patch -- on a side note I see that a patch checking _MSC_VER
has gone in which defines a lot of limits that should really come from
<limits.h> ... Anyone care to comment on this?

[snip]

RCS file: /var/cvs/llvm/llvm/include/llvm/Support/DataTypes.h.in,v
+#if !defined(INT64_MIN)
+# define INT64_MIN -9223372036854775808LL
+#endif

What I gathered from my discussion on #gcc, that is not a valid int64_t
because the tokenizer will treat those as two tokens: - and NUMBER, and
since NUMBER > INT64_MAX, it's not a valid integer. As a result, this
file will not compile with GCC.

The solution is to define INT64_MIN as (-INT64_MAX-1) .