aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-05-04 14:56:14 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-05-04 14:56:14 +0000
commitc62c040f163cb557936e5b680dbb822d31c2e8e7 (patch)
tree01becb52afb237122f45f55265ad89d0694041de /gcc/c-family
parent1e3287d0e91ae7f1c19ecc3031fbb548f06db652 (diff)
downloadgcc-c62c040f163cb557936e5b680dbb822d31c2e8e7.zip
gcc-c62c040f163cb557936e5b680dbb822d31c2e8e7.tar.gz
gcc-c62c040f163cb557936e5b680dbb822d31c2e8e7.tar.bz2
c-decl.c (check_bitfield_type_and_width): Do not pass NULL to build_int_cst.
2011-05-04 Richard Guenther <rguenther@suse.de> * c-decl.c (check_bitfield_type_and_width): Do not pass NULL to build_int_cst. * c-typeck.c (really_start_incremental_init): Use bitsize_int for constructor indices. (push_init_level): Likewise. c-family/ * c-common.c (fix_string_type): Use size_int for index type bounds. (start_fname_decls): Do not pass NULL to build_int_cst. (c_init_attributes): Likewise. * c-lex.c (c_lex_with_flags): Likewise. From-SVN: r173378
Diffstat (limited to 'gcc/c-family')
-rw-r--r--gcc/c-family/ChangeLog7
-rw-r--r--gcc/c-family/c-common.c7
-rw-r--r--gcc/c-family/c-lex.c2
3 files changed, 12 insertions, 4 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 8864a32..8ad5f6e 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,10 @@
+2011-05-04 Richard Guenther <rguenther@suse.de>
+
+ * c-common.c (fix_string_type): Use size_int for index type bounds.
+ (start_fname_decls): Do not pass NULL to build_int_cst.
+ (c_init_attributes): Likewise.
+ * c-lex.c (c_lex_with_flags): Likewise.
+
2011-04-27 Jason Merrill <jason@redhat.com>
* c-common.c (make_tree_vector_from_list): New.
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 802040d..aaaa210 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -743,7 +743,8 @@ start_fname_decls (void)
if (decl)
{
- saved = tree_cons (decl, build_int_cst (NULL_TREE, ix), saved);
+ saved = tree_cons (decl, build_int_cst (integer_type_node, ix),
+ saved);
*fname_vars[ix].decl = NULL_TREE;
}
}
@@ -946,7 +947,7 @@ fix_string_type (tree value)
construct the matching unqualified array type first. The C front
end does not require this, but it does no harm, so we do it
unconditionally. */
- i_type = build_index_type (build_int_cst (NULL_TREE, nchars - 1));
+ i_type = build_index_type (size_int (nchars - 1));
a_type = build_array_type (e_type, i_type);
if (c_dialect_cxx() || warn_write_strings)
a_type = c_build_qualified_type (a_type, TYPE_QUAL_CONST);
@@ -5670,7 +5671,7 @@ c_init_attributes (void)
#define DEF_ATTR_NULL_TREE(ENUM) \
built_in_attributes[(int) ENUM] = NULL_TREE;
#define DEF_ATTR_INT(ENUM, VALUE) \
- built_in_attributes[(int) ENUM] = build_int_cst (NULL_TREE, VALUE);
+ built_in_attributes[(int) ENUM] = build_int_cst (integer_type_node, VALUE);
#define DEF_ATTR_IDENT(ENUM, STRING) \
built_in_attributes[(int) ENUM] = get_identifier (STRING);
#define DEF_ATTR_TREE_LIST(ENUM, PURPOSE, VALUE, CHAIN) \
diff --git a/gcc/c-family/c-lex.c b/gcc/c-family/c-lex.c
index 1ea57f1..e60dcc5 100644
--- a/gcc/c-family/c-lex.c
+++ b/gcc/c-family/c-lex.c
@@ -437,7 +437,7 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags,
break;
case CPP_PRAGMA:
- *value = build_int_cst (NULL, tok->val.pragma);
+ *value = build_int_cst (integer_type_node, tok->val.pragma);
break;
/* These tokens should not be visible outside cpplib. */