Re: [PATCH v2 3/5] C: Implement musttail attribute for returns

2024-01-26 Thread Joseph Myers
On Fri, 26 Jan 2024, Andi Kleen wrote: > > > I don't have tests for that but since it's not new behavior I suppose > > > that's sufficient. > > > > Each attribute should have tests that invalid uses are appropriately > > diagnosed. See gcc.dg/c23-attr-fallthrough-2.c for examples of such tests

Re: [PATCH v2 3/5] C: Implement musttail attribute for returns

2024-01-26 Thread Andi Kleen
> > I don't have tests for that but since it's not new behavior I suppose > > that's sufficient. > > Each attribute should have tests that invalid uses are appropriately > diagnosed. See gcc.dg/c23-attr-fallthrough-2.c for examples of such tests > in the case of the [[fallthrough]] attribute.

Re: [PATCH v2 3/5] C: Implement musttail attribute for returns

2024-01-26 Thread Joseph Myers
On Thu, 25 Jan 2024, Andi Kleen wrote: > On Thu, Jan 25, 2024 at 08:08:23PM +, Joseph Myers wrote: > > On Wed, 24 Jan 2024, Andi Kleen wrote: > > > > > Implement a C23 clang compatible musttail attribute similar to the earlier > > > C++ implementation in the C parser. > > > > I'd expect diag

Re: [PATCH v2 3/5] C: Implement musttail attribute for returns

2024-01-25 Thread Andi Kleen
On Thu, Jan 25, 2024 at 08:08:23PM +, Joseph Myers wrote: > On Wed, 24 Jan 2024, Andi Kleen wrote: > > > Implement a C23 clang compatible musttail attribute similar to the earlier > > C++ implementation in the C parser. > > I'd expect diagnostics, and associated tests of those diagnostics, fo

Re: [PATCH v2 3/5] C: Implement musttail attribute for returns

2024-01-25 Thread Joseph Myers
On Wed, 24 Jan 2024, Andi Kleen wrote: > Implement a C23 clang compatible musttail attribute similar to the earlier > C++ implementation in the C parser. I'd expect diagnostics, and associated tests of those diagnostics, for: * musttail attribute used with any arguments, even empty [[gnu::mustt