From: Shuai Wang <wangshuai901@gmail.com>
To: GCC Development <gcc@gcc.gnu.org>
Subject: How to decide the what type is currently being used in tree_node?
Date: Fri, 19 Feb 2021 13:01:01 +0800 [thread overview]
Message-ID: <CAEQMQomk6rGC=+XyAnLnY4hQ_AAA+nzAPFSfAFfVQbAeqzJqKQ@mail.gmail.com> (raw)
Hello,
I noticed that tree_node is implemented as a union (
https://code.woboq.org/gcc/gcc/tree-core.h.html#tree_node). However, I
cannot find a way of checking whether the current tree_node is really a
base or type.
For instance, currently when I am using:
is_gimple_constant(v)
Given `v` as a tree type but NOT base type, the above statement would
crash. I am thinking there should be a method like:
is_tree_base(v) == false
or something like this; however, I couldn't find one. Can anyone shed some
lights on this? Thank you very much!
best,
Shuai
next reply other threads:[~2021-02-19 5:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-19 5:01 Shuai Wang [this message]
2021-02-19 8:54 ` Prathamesh Kulkarni
2021-02-19 14:54 ` Shuai Wang
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='CAEQMQomk6rGC=+XyAnLnY4hQ_AAA+nzAPFSfAFfVQbAeqzJqKQ@mail.gmail.com' \
--to=wangshuai901@gmail.com \
--cc=gcc@gcc.gnu.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).