On 6/22/20 1:25 PM, Martin Sebor wrote:
The attached fix parallels the one for the equivalent C bug 95580
where the pretty printers don't correctly handle MEM_REF arguments
with type void* or other pointers to an incomplete type.
The incorrect handling was exposed by the recent change to
-Wuninitialized which includes such expressions in diagnostics.
+ if (tree size = TYPE_SIZE_UNIT (TREE_TYPE (argtype)))
+ if (!integer_onep (size))
+ {
+ pp_cxx_left_paren (pp);
+ dump_type (pp, ptr_type_node, flags);
+ pp_cxx_right_paren (pp);
+ }
Don't we want to print the cast if the pointer target type is incomplete?
Jason