aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPer Bothner <bothner@gcc.gnu.org>1999-05-13 08:42:53 -0700
committerPer Bothner <bothner@gcc.gnu.org>1999-05-13 08:42:53 -0700
commite229f2cdda26941375b5cdf433199ddfb8fab022 (patch)
tree29d3dcca24f263137049e5d6b419341d788a2781
parentce6e914727336e47ee2d336d13b1fc787342215d (diff)
downloadgcc-e229f2cdda26941375b5cdf433199ddfb8fab022.zip
gcc-e229f2cdda26941375b5cdf433199ddfb8fab022.tar.gz
gcc-e229f2cdda26941375b5cdf433199ddfb8fab022.tar.bz2
class.c (push_lang_context): Turn off DECL_IGNORED_P for primitive Java types, if we actually see `extern "C"'.
h * class.c (push_lang_context): Turn off DECL_IGNORED_P for primitive Java types, if we actually see `extern "C"'. From-SVN: r26927
-rw-r--r--gcc/cp/class.c19
-rw-r--r--gcc/cp/decl.c5
2 files changed, 23 insertions, 1 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index b546f57..1466e94 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -4618,11 +4618,28 @@ push_lang_context (name)
current_lang_stacksize += 10;
}
- if (name == lang_name_cplusplus || name == lang_name_java)
+ if (name == lang_name_cplusplus)
{
strict_prototype = strict_prototypes_lang_cplusplus;
current_lang_name = name;
}
+ else if (name == lang_name_java)
+ {
+ strict_prototype = strict_prototypes_lang_cplusplus;
+ current_lang_name = name;
+ /* DECL_IGNORED_P is initially set for these types, to avoid clutter.
+ (See record_builtin_java_type in decl.c.) However, that causes
+ incorrect debug entries if these types are actually used.
+ So we re-enable debug output after extern "Java". */
+ DECL_IGNORED_P (java_byte_type_node) = 0;
+ DECL_IGNORED_P (java_short_type_node) = 0;
+ DECL_IGNORED_P (java_int_type_node) = 0;
+ DECL_IGNORED_P (java_long_type_node) = 0;
+ DECL_IGNORED_P (java_float_type_node) = 0;
+ DECL_IGNORED_P (java_double_type_node) = 0;
+ DECL_IGNORED_P (java_char_type_node) = 0;
+ DECL_IGNORED_P (java_boolean_type_node) = 0;
+ }
else if (name == lang_name_c)
{
strict_prototype = strict_prototypes_lang_c;
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 921fd83..74d7343 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -6136,7 +6136,12 @@ record_builtin_java_type (name, size)
}
record_builtin_type (RID_MAX, name, type);
decl = TYPE_NAME (type);
+
+ /* Suppress generate debug symbol entries for these types,
+ since for normal C++ they are just clutter.
+ However, push_lang_context undoes this if extern "Java" is seen. */
DECL_IGNORED_P (decl) = 1;
+
TYPE_FOR_JAVA (type) = 1;
return type;
}