From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12620 invoked by alias); 21 Oct 2002 22:40:23 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12613 invoked from network); 21 Oct 2002 22:40:22 -0000 Received: from unknown (63.119.183.65) by sources.redhat.com with QMTP; 21 Oct 2002 22:40:22 -0000 Received: (qmail 16279 invoked from network); 21 Oct 2002 22:35:40 -0000 Received: from cpe-24-221-209-215.co.sprintbbd.net (HELO doc.com) (24.221.209.215) by external1 with SMTP; 21 Oct 2002 22:35:40 -0000 Message-ID: <3DB4826D.8050606@doc.com> Date: Mon, 21 Oct 2002 15:40:00 -0000 From: Adam Fedor Organization: Digital Optics Corp. User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.0.0) Gecko/20020610 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Cagney CC: Klee Dienes , gdb-patches@sources.redhat.com Subject: Re: Add rules for ObjC files References: <3239ADC4-D77B-11D6-A34B-00039396EEB8@mit.edu> <3DB42CB9.50601@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-10/txt/msg00362.txt.bz2 Andrew Cagney wrote: >> Klee Dienes wrote: >> ObjC is supposed to be a strict superset of C, so at least in theory, >> extensions don't need to be conditionalized at all, or they can be >> disallowed after parsing, if you wanted to have a "strict C mode" >> (although I note that the little array@45 extension is always available, >> even though it's not valid C). > > > (time passes) > > (array@45 is documented as a GDB CLI extension). > > Keeping the objective C .y separate from the C .y, I think, is a better > long term strategy. While it will mean that someone needs to keep the > two files in sync, it also means that the objective C, C and C++ parsers > are guarenteed to not stomp on each others toes. > But aren't the C and C++ parsers combined? It would probably be good to keep the Objective-C parser separate for a while until people get used to the idea. However, eventually, gcc will support mixing Objective-C and C++ (Objective-C++) and it will be very contrived to have separate parsers for each language. The languages are quite compatible. The only syntax Objective-C adds is the message call syntax: [MyObject myMethod: arg1 here: arg2] and @something (where 'something' can be a string or one of a few keywords defined in Objective-C) which looks almost nothing like what you would encounter in C or C++. -- Adam Fedor, Digital Optics Corp. | I'm glad I hate spinach, because http://www.doc.com | if I didn't, I'd eat it, and you | know how I hate the stuff.