> On Dec 10, 2025, at 17:51, Joseph Myers <[email protected]> wrote:
> 
> On Tue, 9 Dec 2025, Qing Zhao wrote:
> 
>> I have the following questions need your help:
>> 
>> 1.  I cannot come up with a valid testing case for “c_parser_enum_specifier” 
>> when calling “finish_declspecs”, 
>>    I am wondering whether such testing cases existing? 
>>    Shall I skip checking counted_by after “finish_declspecs” inside 
>> “c_parser_enum_specifer”?
> 
> The case of c_parser_enum_specifier is only valid with an integer type, so 
> indeed it's not possible to have a valid example with a struct or union 
> definition there.
> 
>> 2. In the above C. Parameter declaration, I got warnings:
>> warning: anonymous struct declared inside parameter list will not be visible 
>> outside of this definition or declaration
>>   My question, is such usage valid in GNU C?
> 
> It's valid, just probably not what the user intended (but such 
> questionable code is common in testcases).

Okay, will keep it. 
> 
>> 3. Do you think that the above testing case is enough for this purpose?
> 
> Maybe also test function *definitions*

I cannot come up with such valid testing cases about function *definitions*, 
could you please help on this?

> and definitions of typedef names.

Such as:

typedef struct {
  int c;
  char *d __attribute__ ((counted_by (c)));
} mys;

typedef struct {
  char *d1 __attribute__ ((counted_by (c1)));
} mys1;

??

Thanks.

Qing



> 
> -- 
> Joseph S. Myers
> [email protected]


Reply via email to