Re: [PATCH 2/4] typeof: fix up comment in examine_pointer_type()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 09/11/2019 13:35, Luc Van Oostenryck wrote:
> The comment was added in commit c72032ad3 ("Add comment on what ...")
> and explain why the size is set before recursing into the object
> pointed to. But since commit 017034ed4 ("Fix up type examination.")
> the object is nore examined.

s/nore/now/?

ATB,
Ramsay Jones

> 
> Adjust the comment to remove posible confusion.
> 
> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
> ---
>  symbol.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/symbol.c b/symbol.c
> index 72ea2e4e7..334f9df29 100644
> --- a/symbol.c
> +++ b/symbol.c
> @@ -436,10 +436,11 @@ static struct symbol *examine_enum_type(struct symbol *sym)
>  static struct symbol *examine_pointer_type(struct symbol *sym)
>  {
>  	/*
> -	 * We need to set the pointer size first, and
> -	 * examine the thing we point to only afterwards.
> -	 * That's because this pointer type may end up
> -	 * being needed for the base type size evaluation.
> +	 * Since pointers to incomplete types can be used,
> +	 * for example in a struct-declaration-list,
> +	 * the base type must *not* be examined here.
> +	 * It thus means that it needs to be done later,
> +	 * when the base type of the pointer is looked at.
>  	 */
>  	if (!sym->bit_size)
>  		sym->bit_size = bits_in_pointer;
> 



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux