From: Bernd Petrovitsch <bernd@sysprog.at>
To: linux-sparse@vger.kernel.org
Subject: modifier_string() inconsistency with modifiers
Date: Fri, 20 Aug 2010 12:33:48 +0200 [thread overview]
Message-ID: <1282300429.10440.230.camel@thorin> (raw)
Hi all!
To dump/print the modifiers, I just found the
modifier_string() function (in show-parse.c).
To the best of my understanding
---- snip ----
const char *res,**ptr, *names[] = {
"auto", "register", "static", "extern",
"const", "volatile", "[signed]", "[unsigned]",
"[char]", "[short]", "[long]", "[long long]",
"[typdef]", "[structof]", "[unionof]", "[enum]",
"[typeof]", "[attribute]", "inline", "[addressable]",
"[nocast]", "[noderef]", "[accessed]", "[toplevel]",
"[label]", "[assigned]", "[type]", "[safe]",
"[usertype]", "[force]", "[explicitly-signed]",
NULL
};
---- snip ----
lists printable strings for the modifiers. The modifiers are bits
defined in symbol.h.
---- snip ----
/* Modifiers */
#define MOD_AUTO 0x0001
#define MOD_REGISTER 0x0002
#define MOD_STATIC 0x0004
#define MOD_EXTERN 0x0008
#define MOD_CONST 0x0010
#define MOD_VOLATILE 0x0020
#define MOD_SIGNED 0x0040
#define MOD_UNSIGNED 0x0080
#define MOD_CHAR 0x0100
#define MOD_SHORT 0x0200
#define MOD_LONG 0x0400
#define MOD_LONGLONG 0x0800
#define MOD_TYPEDEF 0x1000
#define MOD_WEAK 0x2000
#define MOD_INLINE 0x40000
#define MOD_ADDRESSABLE 0x80000
#define MOD_NOCAST 0x100000
#define MOD_NODEREF 0x200000
#define MOD_ACCESSED 0x400000
#define MOD_TOPLEVEL 0x800000 // scoping..
#define MOD_LABEL 0x1000000
#define MOD_ASSIGNED 0x2000000
#define MOD_TYPE 0x4000000
#define MOD_SAFE 0x8000000 // non-null/non-trapping pointer
#define MOD_USERTYPE 0x10000000
#define MOD_FORCE 0x20000000
#define MOD_EXPLICITLY_SIGNED 0x40000000
#define MOD_BITWISE 0x80000000
---- snip ----
Well, the equivalent for "MOD_WEAK" is "[structof]" - which seems wrong
to me.
And the parts for "inline" also doesn't fit AFAICS.
What did I actually miss?
Bernd
--
mobile: +43 664 4416156 http://www.sysprog.at/
Linux Software Development, Consulting and Services
next reply other threads:[~2010-08-20 10:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-20 10:33 Bernd Petrovitsch [this message]
2010-08-20 23:03 ` modifier_string() inconsistency with modifiers Christopher Li
2010-08-22 8:42 ` Bernd Petrovitsch
2010-08-22 17:25 ` Christopher Li
2010-08-23 14:42 ` [PATCH] Fixup and cleanup of the modifier_string() function (was Re: modifier_string() inconsistency with modifiers) Bernd Petrovitsch
2010-09-03 9:13 ` Christopher Li
2010-09-14 14:37 ` [PATCH] Fixup and cleanup of the modifier_string() function Bernd Petrovitsch
2010-09-15 22:52 ` Christopher Li
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=1282300429.10440.230.camel@thorin \
--to=bernd@sysprog.at \
--cc=linux-sparse@vger.kernel.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 NNTP newsgroup(s).