summaryrefslogtreecommitdiff
path: root/gdb/c-typeprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/c-typeprint.c')
-rw-r--r--gdb/c-typeprint.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index 3347050b5c1..689988d2c80 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -135,14 +135,16 @@ c_print_type (type, varstring, stream, show, level)
fputs_filtered (" ", stream);
c_type_print_varspec_prefix (type, stream, show, 0);
- fputs_filtered (varstring, stream);
-
- /* For demangled function names, we have the arglist as part of the name,
- so don't print an additional pair of ()'s */
+ if (varstring != NULL)
+ {
+ fputs_filtered (varstring, stream);
- demangled_args = strchr(varstring, '(') != NULL;
- c_type_print_varspec_suffix (type, stream, show, 0, demangled_args);
+ /* For demangled function names, we have the arglist as part of the name,
+ so don't print an additional pair of ()'s */
+ demangled_args = strchr(varstring, '(') != NULL;
+ c_type_print_varspec_suffix (type, stream, show, 0, demangled_args);
+ }
}
/* If TYPE is a derived type, then print out derivation information.