summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorzlaski <zlaski@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-24 23:15:33 +0000
committerzlaski <zlaski@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-24 23:15:33 +0000
commit4b6a1df9432575e23e8b5854cd66fa9502b8e101 (patch)
tree95d6a6e67d8925d87785d71cf473d02f830fb1fa /gcc
parentb739144fe5dbf6f59dfdcaecb6944ef02d2e62b4 (diff)
downloadgcc-4b6a1df9432575e23e8b5854cd66fa9502b8e101.tar.gz
[gcc/objc/ChangeLog]
2004-09-24 Ziemowit Laski <zlaski@apple.com> * objc-act.c (init_objc_symtab, init_module_descriptor, build_shared_structure_initializer): When initializing 'long' fields, ensure that the initializer value is also 'long'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88079 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/objc/ChangeLog6
-rw-r--r--gcc/objc/objc-act.c18
2 files changed, 18 insertions, 6 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog
index a7c2c65e281..082a38cbf12 100644
--- a/gcc/objc/ChangeLog
+++ b/gcc/objc/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-24 Ziemowit Laski <zlaski@apple.com>
+
+ * objc-act.c (init_objc_symtab, init_module_descriptor,
+ build_shared_structure_initializer): When initializing 'long'
+ fields, ensure that the initializer value is also 'long'.
+
2004-09-24 Zack Weinberg <zack@codesourcery.com>
* objc-act.c: Change annotate_with_locus to SET_EXPR_LOCATION
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 2743688c641..e09e7a3e8cd 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -1870,7 +1870,8 @@ init_objc_symtab (tree type)
/* sel_ref_cnt = { ..., 5, ... } */
- initlist = build_tree_list (NULL_TREE, build_int_cst (NULL_TREE, 0));
+ initlist = build_tree_list (NULL_TREE,
+ build_int_cst (long_integer_type_node, 0));
/* refs = { ..., _OBJC_SELECTOR_TABLE, ... } */
@@ -1969,12 +1970,13 @@ init_module_descriptor (tree type)
/* version = { 1, ... } */
- expr = build_int_cst (NULL_TREE, OBJC_VERSION);
+ expr = build_int_cst (long_integer_type_node, OBJC_VERSION);
initlist = build_tree_list (NULL_TREE, expr);
/* size = { ..., sizeof (struct _objc_module), ... } */
- expr = size_in_bytes (objc_module_template);
+ expr = convert (long_integer_type_node,
+ size_in_bytes (objc_module_template));
initlist = tree_cons (NULL_TREE, expr, initlist);
/* name = { ..., "foo.m", ... } */
@@ -4850,13 +4852,17 @@ build_shared_structure_initializer (tree type, tree isa, tree super,
initlist = tree_cons (NULL_TREE, default_conversion (name), initlist);
/* version = */
- initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0), initlist);
+ initlist = tree_cons (NULL_TREE, build_int_cst (long_integer_type_node, 0),
+ initlist);
/* info = */
- initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, status), initlist);
+ initlist = tree_cons (NULL_TREE,
+ build_int_cst (long_integer_type_node, status),
+ initlist);
/* instance_size = */
- initlist = tree_cons (NULL_TREE, size, initlist);
+ initlist = tree_cons (NULL_TREE, convert (long_integer_type_node, size),
+ initlist);
/* objc_ivar_list = */
if (!ivar_list)