> On Oct 29, 2025, at 01:08, Yeoul Na <[email protected]> wrote: > > Is the reasoning that since it’s not a standard feature, a pedantic warning > doesn’t make sense? And it’s still a warning with -Wpointer-arith.
Yeah, “counted_by” itself is not a standard feature already. > > If so, yes, it makes sense to me too. Okay, then I will make the following change as Joseph suggested: support “counted_by” for VOID pointer by default, but issue warnings when -Wpointer-arith is presenting. thanks. Qing > > Best, > Yeoul > >> On Oct 28, 2025, at 7:02 PM, Kees Cook <[email protected]> wrote: >> >> >> >> On October 28, 2025 2:11:55 PM PDT, Qing Zhao <[email protected]> wrote: >>> >>> >>>> On Oct 28, 2025, at 16:45, Joseph Myers <[email protected]> wrote: >>>> >>>> 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. >>> >>> Okay. thanks. I think this is reasonable. >>> >>> Kees and Yeoul, is such behavior fine with you? >> >> I'm fine with this, yes, thanks! >> >> -Kees >> >> -- >> Kees Cook > >
