From mboxrd@z Thu Jan 1 00:00:00 1970 From: osk@hem.passagen.se To: java-gnats@sourceware.cygnus.com Subject: java/1184: gcjh doesn't handle method names that are reserved C++ keywords Date: Wed, 20 Dec 2000 12:21:00 -0000 Message-id: <20000418104622.4817.qmail@sourceware.cygnus.com> X-SW-Source: 2000-q4/msg00979.html List-Id: >Number: 1184 >Category: java >Synopsis: gcjh doesn't handle method names that are reserved C++ keywords >Confidential: no >Severity: non-critical >Priority: medium >Responsible: tromey >State: closed >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Dec 20 12:17:13 PST 2000 >Closed-Date: Mon Jun 05 23:16:58 PDT 2000 >Last-Modified: Mon Jun 5 23:20:01 PDT 2000 >Originator: Oskar Liljeblad >Release: 2.96 20000313 >Organization: >Environment: Linux libc 2.1.3 >Description: There are a few keywords reserved in C++ which are not reserved in C++. Examples are 'struct' and 'union'. Using gcjh to generate a .h file on a class like this: class Demo { public void union() { } public void struct() { } } will generate method declarations like this: virtual void union () { } virtual void struct () { } which will cause problems when compiling. I presume there are other such problematic keywords. >How-To-Repeat: >Fix: Maybe append '__' to problematic method names in C++? >Release-Note: >Audit-Trail: Formerly PR gcj/211 From: Tom Tromey To: osk@hem.passagen.se Cc: java-gnats@sourceware.cygnus.com Subject: Re: gcj/211: gcjh doesn't handle method names that are reserved C++ keywords Date: Tue, 18 Apr 2000 07:26:27 -0700 (PDT) We partially handle this already. If you have a full list of C++ keywords handy, I can fix this today. If not, then it will have to wait until I hvae the time to dig up the full list. T Responsible-Changed-From-To: apbianco->tromey Responsible-Changed-By: tromey Responsible-Changed-When: Tue Apr 18 09:13:46 2000 Responsible-Changed-Why: This is mine. State-Changed-From-To: open->feedback State-Changed-By: tromey State-Changed-When: Tue Apr 18 09:13:46 2000 State-Changed-Why: I've checked in a patch for this. Can you try it? If not, tell me and I will close the PR -- the patch works for me on your example. From: tromey@cygnus.com To: apbianco@cygnus.com, java-gnats@sourceware.cygnus.com, osk@hem.passagen.se, tromey@cygnus.com Cc: Subject: Re: gcj/211 Date: 18 Apr 2000 16:13:46 -0000 Synopsis: gcjh doesn't handle method names that are reserved C++ keywords Responsible-Changed-From-To: apbianco->tromey Responsible-Changed-By: tromey Responsible-Changed-When: Tue Apr 18 09:13:46 2000 Responsible-Changed-Why: This is mine. State-Changed-From-To: open->feedback State-Changed-By: tromey State-Changed-When: Tue Apr 18 09:13:46 2000 State-Changed-Why: I've checked in a patch for this. Can you try it? If not, tell me and I will close the PR -- the patch works for me on your example. http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=211&database=java State-Changed-From-To: feedback->closed State-Changed-By: bryce State-Changed-When: Mon Jun 5 23:16:58 2000 State-Changed-Why: The fix works fine. From: bryce@albatross.co.nz To: java-gnats@sourceware.cygnus.com, osk@hem.passagen.se, tromey@cygnus.com Cc: Subject: Re: gcj/211 Date: 6 Jun 2000 06:16:58 -0000 Synopsis: gcjh doesn't handle method names that are reserved C++ keywords State-Changed-From-To: feedback->closed State-Changed-By: bryce State-Changed-When: Mon Jun 5 23:16:58 2000 State-Changed-Why: The fix works fine. http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=211&database=java >Unformatted: