Re: Need help: Is a VAR_DECL type builtin or not?

2014-02-17 Thread Ian Lance Taylor
On Mon, Feb 17, 2014 at 5:28 AM, Richard Biener wrote: > On Mon, Feb 17, 2014 at 1:15 PM, Dominik Vogt wrote: >> On Fri, Feb 14, 2014 at 02:40:44PM +0100, Richard Biener wrote: >>> On Fri, Feb 14, 2014 at 9:59 AM, Dominik Vogt >>> wrote: >>> > Given a specific VAR_DECL tree node, I need to find

Re: Need help: Is a VAR_DECL type builtin or not?

2014-02-17 Thread Richard Biener
On Mon, Feb 17, 2014 at 1:15 PM, Dominik Vogt wrote: > On Fri, Feb 14, 2014 at 02:40:44PM +0100, Richard Biener wrote: >> On Fri, Feb 14, 2014 at 9:59 AM, Dominik Vogt >> wrote: >> > Given a specific VAR_DECL tree node, I need to find out whether >> > its type is built in or not. Up to now I ha

Re: Need help: Is a VAR_DECL type builtin or not?

2014-02-17 Thread Dominik Vogt
On Fri, Feb 14, 2014 at 02:40:44PM +0100, Richard Biener wrote: > On Fri, Feb 14, 2014 at 9:59 AM, Dominik Vogt wrote: > > 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)); > >

Re: Need help: Is a VAR_DECL type builtin or not?

2014-02-14 Thread Richard Biener
On Fri, Feb 14, 2014 at 9:59 AM, Dominik Vogt wrote: > 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)) >

Need help: Is a VAR_DECL type builtin or not?

2014-02-14 Thread Dominik Vogt
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;