if (TREE_CODE (arg) == SSA_NAME
-         && TREE_CODE (type) == INTEGER_TYPE)
+         && TREE_CODE (argtype) == INTEGER_TYPE

I think you want
          && INTEGRAL_TYPE_P (argtype)
here instead of that last line, the middle-end considers conversions between
integral types useless (except for bool vs. non-bool conversions if the
other type has precision != 1), so if one does:
enum E { E0 = -__INT_MAX__ - 1, E1 = 1, E2 = 2, E3 = 3, E4 = __INT_MAX__ };
  enum E e = ...;
  snprintf (... "...%.*s...", ..., e, ...);
then you could very well have there ENUMERAL_TYPE etc.

That's right.  I keep forgetting about this.  Thanks.


Ok for trunk with that change.

I committed r246846 with an additional change to make enums work
correctly.

Martin

Reply via email to