This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Add rules for ObjC files
- From: Michael Snyder <msnyder at redhat dot com>
- To: Klee Dienes <klee at mit dot edu>
- Cc: Stan Shebs <shebs at apple dot com>, Adam Fedor <fedor at doc dot com>, gdb-patches at sources dot redhat dot com
- Date: Fri, 04 Oct 2002 14:47:59 -0700
- Subject: Re: Add rules for ObjC files
- Organization: Red Hat, Inc.
- References: <C2321243-D7D6-11D6-866A-00039396EEB8@mit.edu>
Klee Dienes wrote:
>
> I definitely agree there's no need to conditionalize them long-term. I
> just mean there's no way that I know of to check them in with an #ifdef
> WITH_OBJC for the period where the other changes that they depend on
> are still being submitted. The objc-lang.y approach has the advantage
> that the file can be submitted, and optionally enabled or disabled in
> the Makefile (as I believe Adam was planning to do).
I agree that ObjC is to C as C++ is to C, and therefore its grammar
can legitimately go into c-exp.y. If cxx-like behavior is not disabled
when debugging C, then objc-like behavior shouldn't need to be either
(unles there's a conflict).
But, just to get over the initial hurdle, it might be easier to
check the grammar in as if it was a whole new language (and thus
can't break C debugging) -- then merge them later.
Michael
>
> On Friday, October 4, 2002, at 12:48 PM, Stan Shebs 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).