This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug objc/24868] New: objc-act.c builds non-type-safe structure
- From: "sabre at nondot dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Nov 2005 00:20:53 -0000
- Subject: [Bug objc/24868] New: objc-act.c builds non-type-safe structure
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The init_objc_symtab builds a structure with two short data members, but passes
NULL_TREE into build_int_cst. These:
---
/* cls_def_cnt = { ..., 5, ... } */
initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, imp_count),
initlist);
/* cat_def_cnt = { ..., 5, ... } */
initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, cat_count),
initlist);
---
Should be changed to pass short_integer_type_node to build_int_cst instead of
NULL_TREE. Passing NULL_TREE results in a 32-bit int. This appears to not
cause a problem with the current code generator, but seems like a nasty latent
bug.
-Chris
--
Summary: objc-act.c builds non-type-safe structure
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: objc
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sabre at nondot dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24868