This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug objc/11661] New: [objc-improvements-branch] function pointers as ivars
- From: "d dot ayers at inode dot at" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jul 2003 13:58:23 -0000
- Subject: [Bug objc/11661] New: [objc-improvements-branch] function pointers as ivars
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11661
Summary: [objc-improvements-branch] function pointers as ivars
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: objc
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: d dot ayers at inode dot at
CC: gcc-bugs at gcc dot gnu dot org,zlaski at apple dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
Declaring function pointers as instance variables causes an ICE (independent of
the runtime).
The example (I'll try to attach it as a file...):
#include <objc/Object.h>
@interface MyObject : Object
{
BOOL (*ivar)(id, SEL, id);
}
@end
@implementation MyObject
@end
int main ()
{
return(0);
}
compiled with:
gccObjCI -fnext-runtime -lobjc fncptrivar.m
will fail, (independent of -fgnu-runtime or -fnext-runtime). The compiler reports:
fncptrivar.m:5: internal compiler error: tree check: expected identifier_node,
have indirect_ref in add_instance_variable, at objc/objc-act.c:6601
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs
Konfiguriert mit: ../gcc/configure --enable-shared --enable-threads=posix
--enable-languages=objc --enable-version-specific-runtime-libs
--program-suffix=ObjCI
Thread model: posix
gcc-Version 3.4 20030722 (experimental)