aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPer Bothner <bothner@gcc.gnu.org>1999-01-16 01:59:11 -0800
committerPer Bothner <bothner@gcc.gnu.org>1999-01-16 01:59:11 -0800
commit3217b0f3caee12632765d415b37649929281891a (patch)
tree664e3d8c3264a77476263a6d86dd545c7c63aeb4 /gcc
parent19e1d311ee7e25be77996a1f15682b10c5596c5c (diff)
downloadgcc-3217b0f3caee12632765d415b37649929281891a.zip
gcc-3217b0f3caee12632765d415b37649929281891a.tar.gz
gcc-3217b0f3caee12632765d415b37649929281891a.tar.bz2
gjavah.c (generate_access): Translate Java package private or protected access to C++ public...
0 * gjavah.c (generate_access): Translate Java package private or protected access to C++ public, but with a comment. From-SVN: r24695
Diffstat (limited to 'gcc')
-rw-r--r--gcc/java/gjavah.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c
index 2f538e1..0745a1e 100644
--- a/gcc/java/gjavah.c
+++ b/gcc/java/gjavah.c
@@ -250,19 +250,15 @@ generate_access (stream, flags)
FILE *stream;
JCF_u2 flags;
{
- /* FIXME: Java's "protected" and "no access specifier" modes don't
- actually map to C++ "protected". That's how we map them for now,
- though. */
-
- if (! (flags & ACC_VISIBILITY))
- flags = ACC_PROTECTED;
-
if ((flags & ACC_VISIBILITY) == last_access)
return;
last_access = (flags & ACC_VISIBILITY);
switch (last_access)
{
+ case 0:
+ fputs ("public: // actually package-private\n", stream);
+ break;
case ACC_PUBLIC:
fputs ("public:\n", stream);
break;
@@ -270,7 +266,7 @@ generate_access (stream, flags)
fputs ("private:\n", stream);
break;
case ACC_PROTECTED:
- fputs ("protected:\n", stream);
+ fputs ("public: // actually protected\n", stream);
break;
default:
found_error = 1;
@@ -840,7 +836,7 @@ DEFUN(process_file, (jcf, out),
current_jcf = main_jcf = jcf;
- last_access = 0;
+ last_access = -1;
if (jcf_parse_preamble (jcf) != 0)
{