struct ui_file *stream, int recurse,
const struct value_print_options *options)
{
+ if (!options->format
+ && TYPE_TARGET_TYPE (value_type (val))->code () == TYPE_CODE_INT
+ && TYPE_LENGTH (TYPE_TARGET_TYPE (value_type (val))) == 0)
+ {
+ fputs_filtered ("null", stream);
+ return;
+ }
+
common_val_print (val, stream, recurse, options, language_def (language_c));
struct type *type = ada_check_typedef (value_type (val));
struct type *type = ada_check_typedef (value_type (val));
struct value_print_options opts;
- /* If it is a pointer, indicate what it points to. */
- if (type->code () == TYPE_CODE_PTR)
+ /* If it is a pointer, indicate what it points to; but not for
+ "void *" pointers. */
+ if (type->code () == TYPE_CODE_PTR
+ && !(TYPE_TARGET_TYPE (type)->code () == TYPE_CODE_INT
+ && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) == 0))
{
/* Hack: don't print (char *) for char strings. Their
type is indicated by the quoted string anyway. */