Re: [PATCH] Explicitly document that the "counted_by" attribute is only supported in C

2024-08-05 Thread Qing Zhao
On Aug 5, 2024, at 13:54, Jakub Jelinek wrote: On Mon, Aug 05, 2024 at 01:48:25PM -0400, Jason Merrill wrote: On 8/5/24 9:53 AM, Jakub Jelinek wrote: On Mon, Aug 05, 2024 at 01:33:01PM +, Qing Zhao wrote: As discussed in PR116016:https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016#c48 We s

Re: [PATCH] Explicitly document that the "counted_by" attribute is only supported in C

2024-08-05 Thread Jakub Jelinek
On Mon, Aug 05, 2024 at 01:48:25PM -0400, Jason Merrill wrote: > On 8/5/24 9:53 AM, Jakub Jelinek wrote: > > On Mon, Aug 05, 2024 at 01:33:01PM +, Qing Zhao wrote: > > > As discussed in > > > PR116016:https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016#c48 > > > > > > We should explicitly doc

Re: [PATCH] Explicitly document that the "counted_by" attribute is only supported in C

2024-08-05 Thread Jason Merrill
On 8/5/24 9:53 AM, Jakub Jelinek wrote: On Mon, Aug 05, 2024 at 01:33:01PM +, Qing Zhao wrote: As discussed in PR116016:https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016#c48 We should explicitly document this limitation and issue error messages for C++. The "counted_by" attribute current

Re: [PATCH] Explicitly document that the "counted_by" attribute is only supported in C

2024-08-05 Thread Qing Zhao
> On Aug 5, 2024, at 12:51, Jakub Jelinek wrote: > > On Mon, Aug 05, 2024 at 04:46:09PM +, Qing Zhao wrote: >> So, you want me to add counted_by test-suite for C23? (Which should be >> supported) >> Okay, but I will do it in another separate patch since this patch is for C++. >>> The C++11

Re: [PATCH] Explicitly document that the "counted_by" attribute is only supported in C

2024-08-05 Thread Jakub Jelinek
On Mon, Aug 05, 2024 at 04:46:09PM +, Qing Zhao wrote: > So, you want me to add counted_by test-suite for C23? (Which should be > supported) > Okay, but I will do it in another separate patch since this patch is for C++. > > The C++11/C23 standard attributes are more strict on where they can

Re: [PATCH] Explicitly document that the "counted_by" attribute is only supported in C

2024-08-05 Thread Qing Zhao
> On Aug 5, 2024, at 09:53, Jakub Jelinek wrote: > > On Mon, Aug 05, 2024 at 01:33:01PM +, Qing Zhao wrote: >> As discussed in >> PR116016:https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016#c48 >> >> We should explicitly document this limitation and issue error messages for >> C++. >>

Re: [PATCH] Explicitly document that the "counted_by" attribute is only supported in C

2024-08-05 Thread Jakub Jelinek
On Mon, Aug 05, 2024 at 01:33:01PM +, Qing Zhao wrote: > As discussed in > PR116016:https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016#c48 > > We should explicitly document this limitation and issue error messages for > C++. > > The "counted_by" attribute currently is only supported in C,

[PATCH] Explicitly document that the "counted_by" attribute is only supported in C

2024-08-05 Thread Qing Zhao
As discussed in PR116016:https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116016#c48 We should explicitly document this limitation and issue error messages for C++. The "counted_by" attribute currently is only supported in C, mention this explicitly in documentation and also issue error when see "cou