public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Need help: Is a VAR_DECL type builtin or not?
@ 2014-02-14  8:59 Dominik Vogt
  2014-02-14 13:40 ` Richard Biener
  0 siblings, 1 reply; 5+ messages in thread
From: Dominik Vogt @ 2014-02-14  8:59 UTC (permalink / raw)
  To: gcc

Given a specific VAR_DECL tree node, I need to find out whether
its type is built in or not.  Up to now I have

  tree tn = TYPE_NAME (TREE_TYPE (var_decl));
  if (tn != NULL_TREE && TREE_CODE (tn) == TYPE_DECL && DECL_NAME (tn))
    {
      ...
    }

This if-condition is true for both,

  int x;
  const int x;
  ...

and

  typedef int i_t;
  i_t x;
  const i_t x;
  ...

I need to weed out the class of VAR_DECLs that directly use built
in types.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt
IBM Germany

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-02-17 17:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-14  8:59 Need help: Is a VAR_DECL type builtin or not? Dominik Vogt
2014-02-14 13:40 ` Richard Biener
2014-02-17 12:15   ` Dominik Vogt
2014-02-17 13:28     ` Richard Biener
2014-02-17 17:33       ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).