From: Per Bothner Date: Thu, 13 May 1999 15:42:53 +0000 (-0700) Subject: class.c (push_lang_context): Turn off DECL_IGNORED_P for primitive Java types, if... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e229f2cdda26941375b5cdf433199ddfb8fab022;p=gcc.git 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 --- diff --git a/gcc/cp/class.c b/gcc/cp/class.c index b546f577716..1466e949771 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 921fd8322ee..74d734383b4 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; }