This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug objc++/32052] [4.3 Regression] encode-2.mm, encode-3.mm fail on at least powerpc-darwin
- From: "matz at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 May 2007 08:36:42 -0000
- Subject: [Bug objc++/32052] [4.3 Regression] encode-2.mm, encode-3.mm fail on at least powerpc-darwin
- References: <bug-32052-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from matz at gcc dot gnu dot org 2007-05-23 09:36 -------
The ObjC frontend seems to use IDENTIFIER_POINTER directly to produce
this encoding. This doesn't contain template arguments anymore. And from
quick reading of obj-act.c it's also not clear if it was really expecting
funny characters like '<' in those identifiers. It happily uses these
names to construct other identifiers. This works fine in C, but in C++,
when they still contained template args the new identifiers would contain "<"
and ",", surely not something you expect from normal identifiers.
I would suggest auditing objc-act.c carefully, if using IDENTIFIER_POINTER
is really correct everywhere.
Additionally, someone knowledgable in Obj-C++ should define once and for
all what the encoding of such types should be. If it is supposed to
include template args, then you need to use a different mean than
accessing IDENTIFIER_POINTER. One way would be
decl_as_string (t, TFF_DECL_SPECIFIERS | TFF_UNQUALIFIED_NAME);
(Or leaving out TFF_UNQUALIFIED_NAME if you also need toplevel namespaces
in there).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32052