On 5/16/20 6:32 PM, Marek Polacek wrote:
+ const int q1 = cp_type_quals (pointee1); + const int q2 = cp_type_quals (pointee2); + const int quals = q1 | q2; result_type = cp_build_qualified_type (result_type, - (cp_type_quals (pointee1) - | cp_type_quals (pointee2))); + (quals | (*add_const + ? TYPE_QUAL_CONST + : TYPE_UNQUALIFIED)));
Since you're splitting out some of the arithmetic into local variables, why not handle *add_const there as well?
OK either way. Jason