From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12661 invoked by alias); 14 Feb 2014 08:59:17 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 12648 invoked by uid 89); 14 Feb 2014 08:59:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: e06smtp10.uk.ibm.com Received: from e06smtp10.uk.ibm.com (HELO e06smtp10.uk.ibm.com) (195.75.94.106) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 14 Feb 2014 08:59:16 +0000 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Feb 2014 08:59:13 -0000 Received: from d06dlp01.portsmouth.uk.ibm.com (9.149.20.13) by e06smtp10.uk.ibm.com (192.168.101.140) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 14 Feb 2014 08:59:10 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 7307B17D805F for ; Fri, 14 Feb 2014 08:59:37 +0000 (GMT) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps4075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s1E8wv1O65994766 for ; Fri, 14 Feb 2014 08:58:57 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s1E8x91m003048 for ; Fri, 14 Feb 2014 01:59:09 -0700 Received: from bl3ahm9f.de.ibm.com (dyn-9-152-212-25.boeblingen.de.ibm.com [9.152.212.25]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s1E8x9qk003037 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Fri, 14 Feb 2014 01:59:09 -0700 Received: from dvogt by bl3ahm9f.de.ibm.com with local (Exim 4.76) (envelope-from ) id 1WEEc0-0001Nw-Ur for gcc@gcc.gnu.org; Fri, 14 Feb 2014 09:59:09 +0100 Date: Fri, 14 Feb 2014 08:59:00 -0000 From: Dominik Vogt To: gcc@gcc.gnu.org Subject: Need help: Is a VAR_DECL type builtin or not? Message-ID: <20140214085908.GA5228@linux.vnet.ibm.com> Reply-To: vogt@linux.vnet.ibm.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14021408-4966-0000-0000-000008675FE6 X-SW-Source: 2014-02/txt/msg00196.txt.bz2 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