Re: [PATCH 2/4] Fortran, typeprint: Take level of details into account when printing elements of a structure.

Yao Qi
2016-05-12T12:06:30Z

Bernhard Heckel <bernhard.heckel@intel.com> writes:

> - f_type_print_base (TYPE_FIELD_TYPE (type, index), stream, show,
> - level + 4);
> - fputs_filtered (" :: ", stream);
> - fputs_filtered (TYPE_FIELD_NAME (type, index), stream);
> - f_type_print_varspec_suffix (TYPE_FIELD_TYPE (type, index),
> - stream, 0, 0, 0, 0);
> fputs_filtered ("\n", stream);
> - }
> - fprintfi_filtered (level, stream, "End Type ");
> - fputs_filtered (TYPE_TAG_NAME (type), stream);
> + for (index = 0; index < TYPE_NFIELDS (type); index++)
> + {
> + f_type_print_base (TYPE_FIELD_TYPE (type, index), stream, show - 1,
> + level + 4);

I read this patch again, and happen to see that we pass "show - 1" to
f_type_print_base instead of "show". I think the change is correct, but
it shouldn't fall in this patch, right?

--
Yao (齐尧)