classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch: remove C++ keywords


From: Mark Wielaard
Subject: Re: Patch: remove C++ keywords
Date: Sat, 01 May 2004 00:08:29 +0200

Hi,

On Thu, 2004-04-08 at 08:17, Ingo Prötel wrote:
> Tom Tromey wrote:
> >>>>>>"Ingo" == Ingo Prötel <address@hidden> writes:
> > 
> > 
> > Ingo> I would like to suggest removing all C++ keywords as names in
> > Ingo> the native implementations of GNU Classpath. We have a customer
> > Ingo> who insists on using C++ because of the more thorough code
> > Ingo> inspection.  To be able to compile with such a compiler we need
> > Ingo> to change all names that are C++ keywords.
> > 
> > I think this idea is fine.  It doesn't bother me anyway... though I'd
> > suggest waiting for a response from folks who hack on the JNI code
> > more than me :-)
> > 
> I guess I will wait a week or so. (Going on a long Easter weekend anyway ;-)

I saw this patch didn't go in yet. But it seems people like it.
Since lots of native code changed since then I didn't want to import it
now just before the release. But please commit next week after the
release has been made and rechecking the patch still applies cleanly.

> > My only comment or criticism is that, in the absence of regular
> > checking for this, we'll just see more code like it checked in.
> > That's been the experience with non-C89 constructs, I don't see why
> > this would be any different.  It's just too hard to remember to write
> > in some language subset without compiler-assisted checking.
> > 
> > We could declare all the JNI code to actually be C++, of course.  But
> > then we'd see real C++ usage slip in.
> No we should stay within C. But compiling was C++ code once in a while
> does give a little code review.

I would like to see the suggestion of Eric Blake implemented:

> To avoid regressions, would we want to use a common header file to
> #define the C++ keywords into something that will generate a
> compile-time error when compiling under C?  That is
> 
> #define this do not use C++ keywords, JNI must compile in C and C++

Otherwise it will be a pain to keep this feature up to date.

Cheers,

Mark

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]