This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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]

Re: Add rules for ObjC files


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


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