gcj/211: gcjh doesn't handle method names that are reserved C++ keywords
osk@hem.passagen.se
osk@hem.passagen.se
Tue Apr 18 03:50:00 GMT 2000
>Number: 211
>Category: gcj
>Synopsis: gcjh doesn't handle method names that are reserved C++ keywords
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apbianco
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Apr 18 03:50:00 PDT 2000
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:
More information about the Java-prs
mailing list