+/*
+ * This file is part of cparser.
+ * Copyright (C) 2007-2008 Matthias Braun <matze@braunis.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
#include <wctype.h>
+#include "format_check.h"
+#include "symbol_t.h"
#include "ast_t.h"
#include "diagnostic.h"
-#include "format_check.h"
#include "types.h"
#include "type_t.h"
#include "warning.h"
warningf(pos, "missing argument for '*' field width in conversion specification");
return;
}
- const type_t *const arg_type = arg->expression->base.datatype;
+ const type_t *const arg_type = arg->expression->base.type;
if (arg_type != type_int) {
warningf(pos, "argument for '*' field width in conversion specification is not an 'int', but an '%T'", arg_type);
}
warningf(pos, "missing argument for '*' precision in conversion specification");
return;
}
- const type_t *const arg_type = arg->expression->base.datatype;
+ const type_t *const arg_type = arg->expression->base.type;
if (arg_type != type_int) {
warningf(pos, "argument for '*' precision in conversion specification is not an 'int', but an '%T'", arg_type);
}
case 's':
switch (fmt_mod) {
- case FMT_MOD_NONE: expected_type = type_string; break;
+ case FMT_MOD_NONE: expected_type = type_char_ptr; break;
case FMT_MOD_l: expected_type = type_wchar_t_ptr; break;
default:
}
{ /* create a scope here to prevent warning about the jump to next_arg */
- type_t *const arg_type = arg->expression->base.datatype;
+ type_t *const arg_type = arg->expression->base.type;
if (is_type_pointer(expected_type)) {
type_t *const arg_skip = skip_typeref(arg_type);
if (is_type_pointer(arg_skip)) {