* c-typeprint.c (c_type_print_varspec_suffix): If a function type
[binutils-gdb.git] / gdb / c-typeprint.c
index e2a99451df33eafad780d51eaa689ce1db2cdfdb..0c460e9dd5f77b998f2d3a13ac0c8b2d7c3715eb 100644 (file)
@@ -576,7 +576,9 @@ c_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
        {
          int i, len = TYPE_NFIELDS (type);
          fprintf_filtered (stream, "(");
-         if ((len == 0) && (current_language->la_language == language_cplus))
+         if (len == 0
+              && (TYPE_PROTOTYPED (type)
+                  || current_language->la_language == language_cplus))
            {
              fprintf_filtered (stream, "void");
            }