gdb: Remove some C compiler support leftovers

Remove some __cplusplus checks, inline EXPORTED_CONST, and update some comments.

gdb/ChangeLog:
2016-10-06  Pedro Alves  <palves@redhat.com>

	* cp-valprint.c (vtbl_ptr_name): Write "extern const" instead of
	EXPORTED_CONST.
	* stub-termcap.c: Remove __cplusplus checks.
	* common/common-defs.h [!__cplusplus] (EXTERN_C, EXTERN_C_PUSH,
	EXTERN_C_POP): Delete.
	* common/common-exceptions.h (GDB_XCPT_SJMP): Update comments.
	(GDB_XCPT) [!__cplusplus]: Delete.
	(throw_exception, throw_exception_sjlj): Update comments.
	* guile/guile-internal.h (as_a_scm_t_subr) [!__cplusplus]: Delete.
	* guile/guile.c (extension_language_guile): Write "extern const"
	instead of EXPORTED_CONST.
	* features/feature_to_c.sh: Don't emit !__cplusplus code.  Write
	"extern const" instead of EXPORTED_CONST.
This commit is contained in:
Pedro Alves
2016-10-06 19:23:37 +01:00
parent 33fa2c6e1b
commit ddb6d63387
8 changed files with 30 additions and 44 deletions

View File

@@ -50,8 +50,6 @@ typedef struct
#define END_VARIABLES { NULL, SCM_BOOL_F, NULL }
#ifdef __cplusplus
/* Although scm_t_subr is meant to hold a function pointer, at least
in some versions of guile, it is actually a typedef to "void *".
That means that in C++, an explicit cast is necessary to convert
@@ -88,12 +86,6 @@ as_a_scm_t_subr (SCM (*func) (SCM, SCM, SCM))
return (scm_t_subr) func;
}
#else
/* In C, just do an implicit conversion. */
#define as_a_scm_t_subr(func) func
#endif
/* Scheme functions to define during initialization. */
typedef struct

View File

@@ -77,7 +77,7 @@ extern const struct extension_language_ops guile_extension_ops;
/* The main struct describing GDB's interface to the Guile
extension language. */
EXPORTED_CONST struct extension_language_defn extension_language_guile =
extern const struct extension_language_defn extension_language_guile =
{
EXT_LANG_GUILE,
"guile",