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
This commit is contained in:
Per Bothner 1999-05-13 08:42:53 -07:00
parent ce6e914727
commit e229f2cdda
2 changed files with 23 additions and 1 deletions

View File

@ -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;

View File

@ -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;
}