This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [objc-improvements-branch]: FYI: Yet another round of ObjC++ work committed
- From: Ziemowit Laski <zlaski at apple dot com>
- To: David Ayers <d dot ayers at inode dot at>, "gcc-patches at gcc dot gnu dot org Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 24 Jun 2004 11:19:39 -0700
- Subject: Re: [objc-improvements-branch]: FYI: Yet another round of ObjC++ work committed
- References: <66570F5C-C54E-11D8-BFDF-000393673036@apple.com> <40DAF66D.50703@inode.at>
Hey David,
Thanks for your patch. I'm currently fixing ObjC++ on
i686-pc-linux-gnu, and after that I'll take a look at what you have.
But my next patch will remove the keyword and replace the:
OBJECTNAME protocolrefs
with
TYPENAME protocolrefs
and therefor I will reintroduce some of the removed diagnostics about
type mismatch when applicable. Do you see a problem with that
approach?
No, I don't; this is the right thing to do. In general, the ObjC
grammar should see 'TYPENAME protocolrefs' wherever the corresponding C
grammar sees just 'TYPENAME' (perhaps you can invent a new nonterminal
for this purpose), e.g.,
type_name:
%ifc
TYPENAME
%end_ifc
%ifobjc
TYPENAME protocolrefs
{
if (objc_is_id($1) || objc_is_class_name (TYPE_NAME($1))
$$ == objc_get_protocol_qualified_type ($1, $2);
else if ($2)
error ("protocol qualifiers specified for non-ObjC type");
}
%end_ifobjc
;
Something along those lines, analogously to what I did in cp/parser.c;
you get the idea. :-)
--Zem
--------------------------------------------------------------
Ziemowit Laski 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group Cupertino, CA USA 95014-2083
Apple Computer, Inc. +1.408.974.6229 Fax .5477