This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug objc++/32052] [4.3 Regression] encode-2.mm, encode-3.mm fail on at least powerpc-darwin



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]