Re: [PATCH v10 2/3] C: Implement musttail attribute for returns

2024-07-19 Thread Marek Polacek
On Thu, Jul 18, 2024 at 04:18:56PM -0700, Andi Kleen wrote: > > > > > + set_musttail_on_return (retval, xloc, musttail_p); > > > > > + > > > > >if (retval) > > > > > { > > > > >tree semantic_type = NULL_TREE; > > > > > > > > Is it deliberate that set_musttail_on_return is called

Re: [PATCH v10 2/3] C: Implement musttail attribute for returns

2024-07-18 Thread Andi Kleen
> > > > + set_musttail_on_return (retval, xloc, musttail_p); > > > > + > > > >if (retval) > > > > { > > > >tree semantic_type = NULL_TREE; > > > > > > Is it deliberate that set_musttail_on_return is called outside the > > > if (retval) block? If it can be moved into it, set_must

Re: [PATCH v10 2/3] C: Implement musttail attribute for returns

2024-07-18 Thread Marek Polacek
On Thu, Jul 18, 2024 at 03:11:56PM -0700, Andi Kleen wrote: > On Thu, Jul 18, 2024 at 02:19:21PM -0400, Marek Polacek wrote: > > On Wed, Jul 17, 2024 at 09:30:00PM -0700, Andi Kleen wrote: > > > Implement a C23 clang compatible musttail attribute similar to the earlier > > > C++ implementation in t

Re: [PATCH v10 2/3] C: Implement musttail attribute for returns

2024-07-18 Thread Andi Kleen
On Thu, Jul 18, 2024 at 02:19:21PM -0400, Marek Polacek wrote: > On Wed, Jul 17, 2024 at 09:30:00PM -0700, Andi Kleen wrote: > > Implement a C23 clang compatible musttail attribute similar to the earlier > > C++ implementation in the C parser. > > > > gcc/c/ChangeLog: > > > > PR c/83324 > >

Re: [PATCH v10 2/3] C: Implement musttail attribute for returns

2024-07-18 Thread Marek Polacek
On Wed, Jul 17, 2024 at 09:30:00PM -0700, Andi Kleen wrote: > Implement a C23 clang compatible musttail attribute similar to the earlier > C++ implementation in the C parser. > > gcc/c/ChangeLog: > > PR c/83324 > * c-parser.cc (struct attr_state): Define with musttail_p. > (c_pa

[PATCH v10 2/3] C: Implement musttail attribute for returns

2024-07-17 Thread Andi Kleen
Implement a C23 clang compatible musttail attribute similar to the earlier C++ implementation in the C parser. gcc/c/ChangeLog: PR c/83324 * c-parser.cc (struct attr_state): Define with musttail_p. (c_parser_statement_after_labels): Handle [[musttail]]. (c_parser_s