Hi Jakub,

On Wed, May 21, 2025 at 11:47:30PM +0200, Jakub Jelinek wrote:
> >     @@ -1747,6 +1737,8 @@ static struct c_expr c_parser_binary_expression 
> > (c_parser *, struct c_expr *,
> >                                                      tree);
> >      static struct c_expr c_parser_cast_expression (c_parser *, struct 
> > c_expr *);
> >      static struct c_expr c_parser_unary_expression (c_parser *);
> >     +static inline struct c_expr c_parser_sizeof_expression (c_parser *);
> >     +static inline struct c_expr c_parser_countof_expression (c_parser *);
> 
> I don't see the point of the above (unless they are defined after first
> use,

They are indeed defined after first use.

> but then it would be better to define them before the first use).

Moving them before the first use would separate them from
c_parser_sizeof_or_countof_expression(), which is their closest
relative.  I find them more organized this way.  Please confirm what I
should do.


Cheers,
Alex

> 
> >      static struct c_expr c_parser_sizeof_or_countof_expression (c_parser *,
> >                                                                 enum rid);
> >      static struct c_expr c_parser_alignof_expression (c_parser *);
> >     @@ -10627,6 +10619,22 @@ c_parser_unary_expression (c_parser *parser)
> >      
> >      /* Parse a sizeof expression.  */
> >      
> >     +static inline struct c_expr
> >     +c_parser_sizeof_expression (c_parser *parser)
> >     +{
> >     +  return c_parser_sizeof_or_countof_expression (parser, RID_SIZEOF);
> >     +}
> >     +
> >     +/* Parse a _Countof expression.  */
> >     +
> >     +static inline struct c_expr
> >     +c_parser_countof_expression (c_parser *parser)
> >     +{
> >     +  return c_parser_sizeof_or_countof_expression (parser, RID_COUNTOF);
> >     +}
> >     +
> >     +/* Parse a sizeof or _Countof expression.  */
> >     +
> 
> This looks good to me (but Joseph or Marek should have the final say in C
> FE).
> 
>       Jakub
> 

-- 
<https://www.alejandro-colomar.es/>

Attachment: signature.asc
Description: PGP signature

Reply via email to