Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: Bernhard Heckel <bernhard.heckel@intel.com>
Cc: Yao Qi <qiyaoltc@gmail.com>,
	 brobecker@adacore.com,  gdb-patches@sourceware.org
Subject: Re: [PATCH V4 3/6] Typeprint: Resolve any dynamic target type of a pointer.
Date: Thu, 13 Oct 2016 13:41:00 -0000	[thread overview]
Message-ID: <86shs08iz3.fsf@gmail.com> (raw)
In-Reply-To: <57F4DE0E.2030505@intel.com> (Bernhard Heckel's message of "Wed,	5 Oct 2016 13:03:42 +0200")

Bernhard Heckel <bernhard.heckel@intel.com> writes:

>>> +extern "C" {
>>> +#include <stddef.h>
>>> +}
>>> +
>> Why do you include stddef.h?
> definition of NULL
> +  typeof (vla) *ptr = NULL;
>

It is c++, so we can include <cstddef> for NULL.

>>> diff --git a/gdb/typeprint.c b/gdb/typeprint.c
>>> index e77513e..e3d84c7 100644
>>> --- a/gdb/typeprint.c
>>> +++ b/gdb/typeprint.c
>>> @@ -485,6 +485,25 @@ whatis_exp (char *exp, int show)
>>>         printf_filtered (" */\n");
>>>       }
>>>   +  /* Resolve any dynamic target type, as we might print
>>> +     additional information about the target.
>>> +     For example, in Fortran and C we are printing the dimension of the
>>> +     dynamic array the pointer is pointing to.  */
>>> +  if (TYPE_CODE (type) == TYPE_CODE_PTR
>>> +      && is_dynamic_type (type) == 1)
>> is_dynamic_type returns bool-like value, so don't check it with 1.
>> Looks we need to check is_dynamic_type (TYPE_TARGET_TYPE (type)), no?
> is_dynamic_type takes care of target types for pointer and reference types.
> So, we can keep it.

OK, no problem.

-- 
Yao (齐尧)


  reply	other threads:[~2016-10-13 13:41 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07  6:38 [PATCH V4 0/6] Fortran: Resolve target types of pointers Bernhard Heckel
2016-09-07  6:38 ` [PATCH V4 5/6] Resolve dynamic " Bernhard Heckel
2016-09-07 14:24   ` Eli Zaretskii
2016-10-13 14:07   ` Yao Qi
2016-10-13 14:57     ` Bernhard Heckel
2016-10-17 10:32       ` Yao Qi
2016-10-17 11:25         ` Bernhard Heckel
2016-10-17 12:18           ` Bernhard Heckel
2016-10-20 11:52             ` Bernhard Heckel
2016-10-20 15:33             ` Yao Qi
2016-11-08  7:07               ` Bernhard Heckel
2016-11-08 11:26                 ` Yao Qi
2016-11-08 12:27                   ` Bernhard Heckel
2016-11-16 12:16                   ` Bernhard Heckel
2016-11-21 15:03                     ` Bernhard Heckel
2016-09-07  6:38 ` [PATCH V4 4/6] Fortran: Typeprint, fix dangling types Bernhard Heckel
2016-10-13 13:53   ` Yao Qi
2016-09-07  6:38 ` [PATCH V4 3/6] Typeprint: Resolve any dynamic target type of a pointer Bernhard Heckel
     [not found]   ` <861szvayzg.fsf@gmail.com>
2016-10-05 11:03     ` Bernhard Heckel
2016-10-13 13:41       ` Yao Qi [this message]
2016-09-07  6:38 ` [PATCH V4 6/6] Fortran: Testsuite, add cyclic pointers Bernhard Heckel
2016-10-13 14:08   ` Yao Qi
2016-09-07  6:38 ` [PATCH V4 2/6] Fortran: Resolve dynamic properties of pointer types Bernhard Heckel
2016-10-05  8:44   ` Yao Qi
2016-10-05  9:36     ` Yao Qi
2016-10-05 10:07       ` Bernhard Heckel
2016-09-07  6:38 ` [PATCH V4 1/6] Fortran: Testsuite, fix differences in type naming Bernhard Heckel
2016-09-21 15:57   ` Yao Qi
2016-09-14 12:55 ` [PING][PATCH V4 0/6] Fortran: Resolve target types of pointers Bernhard Heckel
2016-09-28 12:45   ` Bernhard Heckel
2016-10-05  6:03     ` [ping 2][PATCH " Bernhard Heckel
2016-09-21  9:49 ` [ping 2] [PATCH " Bernhard Heckel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86shs08iz3.fsf@gmail.com \
    --to=qiyaoltc@gmail.com \
    --cc=bernhard.heckel@intel.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox