*** d-builtins2.cc.orig Sat Jan 8 19:40:20 2005 --- d-builtins2.cc Sun Feb 20 21:10:22 2005 *************** *** 62,67 **** --- 62,72 ---- Type *d; switch (TREE_CODE(t)) { case POINTER_TYPE: + // Check for strings first. There are currently no 'char' arguments + // for built-in functions, so this is all that needs to be done for + // chars/string. + if (TYPE_MAIN_VARIANT(TREE_TYPE(t)) == char_type_node) + return Type::tchar->pointerTo(); d = gcc_type_to_d_type(TREE_TYPE(t)); if (d) { d = d->pointerTo(); *************** *** 81,94 **** break; case INTEGER_TYPE: { - // DMD integer types come before char and bit... unsigned sz = tree_low_cst( TYPE_SIZE_UNIT( t ), 1 ); bool unsgn = TREE_UNSIGNED( t ); ! // Make sure we get char instead of byte. Otherwise, printf and ! // the like won't be able to take char* arguments ! if (sz == 1 && ! unsgn) ! return Type::tchar; for (int i = 0; i < (int) TMAX; i++) { d = Type::basic[i]; if (d && d->isintegral() && d->size() == sz && --- 86,95 ---- break; case INTEGER_TYPE: { unsigned sz = tree_low_cst( TYPE_SIZE_UNIT( t ), 1 ); bool unsgn = TREE_UNSIGNED( t ); ! // This search assumes that integer types come before char and bit... for (int i = 0; i < (int) TMAX; i++) { d = Type::basic[i]; if (d && d->isintegral() && d->size() == sz &&