+tarval *tarval_int_from_str (const char *s, size_t len, int base, ir_mode *m) {
+ long val;
+ char *eptr;
+ char *buf;
+
+ assert (mode_is_int(m));
+ assert (!BUILDING);
+
+ buf = alloca (len+1);
+ stripcpy (buf, s, len);
+
+ errno = 0;
+ val = strtol(buf, &eptr, base); /* strtoll */
+ assert (eptr == buf+strlen(buf));
+ if ((errno == ERANGE) &&
+ ((m == mode_l) || (m == mode_L)) ) {
+ printf("WARNING: Constant %s not representable. Continuing with %ld.\n",
+ s, val);
+ }
+
+ return tarval_from_long(m, val);
+}