On Tue, 28 Oct 2025, Qing Zhao wrote:

> > counted_by itself is an extension, so I don't think it makes any sense for 
> > flag_iso to affect what cases are accepted, or to produce pedwarns for 
> > certain cases.  Rather, just do a warning, not a pedwarn, with 
> > OPT_Wpointer_arith (since it does make sense for -Wpointer-arith to affect 
> > whether this is diagnosed, just not for it to be an error or pedwarn).
> 
> Yeah, I think you are correct. The “counted_by” attribute is an GNU extension 
> itself already. 
> 
> So, you are suggesting to support “counted_by” for VOID pointer by default, 
> but
> Issue warnings when -Wpointer-arith is presenting? 

Yes, exactly.

-- 
Joseph S. Myers
[email protected]

Reply via email to