fprintf_filtered (stream, " ");
}
+static void
+c_type_print_modifier_before (struct type *type, struct ui_file *stream)
+{
+ if (current_language->la_language != language_cplus)
+ c_type_print_modifier (type, stream, 0, 1);
+}
-
+static void
+c_type_print_modifier_after (struct type *type, struct ui_file *stream)
+{
+ if (current_language->la_language == language_cplus)
+ c_type_print_modifier (type, stream, 1, 0);
+}
static void
c_type_print_args (struct type *type, struct ui_file *stream)
if (show <= 0
&& TYPE_NAME (type) != NULL)
{
- c_type_print_modifier (type, stream, 0, 1);
+ c_type_print_modifier_before (type, stream);
fputs_filtered (TYPE_NAME (type), stream);
+ c_type_print_modifier_after (type, stream);
return;
}
break;
case TYPE_CODE_STRUCT:
- c_type_print_modifier (type, stream, 0, 1);
+ c_type_print_modifier_before (type, stream);
/* Note TYPE_CODE_STRUCT and TYPE_CODE_CLASS have the same value,
* so we use another means for distinguishing them.
*/
goto struct_union;
case TYPE_CODE_UNION:
- c_type_print_modifier (type, stream, 0, 1);
+ c_type_print_modifier_before (type, stream);
fprintf_filtered (stream, "union ");
struct_union:
/* If we just printed a tag name, no need to print anything else. */
if (TYPE_TAG_NAME (type) == NULL)
fprintf_filtered (stream, "{...}");
+ c_type_print_modifier_after (type, stream);
}
else if (show > 0 || TYPE_TAG_NAME (type) == NULL)
{
fprintfi_filtered (level, stream, "}");
+ c_type_print_modifier_after (type, stream);
+
if (TYPE_LOCALTYPE_PTR (type) && show >= 0)
fprintfi_filtered (level, stream, " (Local at %s:%d)\n",
TYPE_LOCALTYPE_FILE (type),
break;
case TYPE_CODE_ENUM:
- c_type_print_modifier (type, stream, 0, 1);
+ c_type_print_modifier_before (type, stream);
/* HP C supports sized enums */
if (hp_som_som_object_present)
switch (TYPE_LENGTH (type))
template <class T1, class T2> class "
and then merges with the struct/union/class code to
print the rest of the definition. */
- c_type_print_modifier (type, stream, 0, 1);
+ c_type_print_modifier_before (type, stream);
fprintf_filtered (stream, "template <");
for (i = 0; i < TYPE_NTEMPLATE_ARGS (type); i++)
{
is no type name, then complain. */
if (TYPE_NAME (type) != NULL)
{
- c_type_print_modifier (type, stream, 0, 1);
+ c_type_print_modifier_before (type, stream);
fputs_filtered (TYPE_NAME (type), stream);
+ c_type_print_modifier_after (type, stream);
}
else
{