* Please make "no member" error more informative
@ 2007-05-31 5:30 Pavel Roskin
0 siblings, 0 replies; only message in thread
From: Pavel Roskin @ 2007-05-31 5:30 UTC (permalink / raw)
To: linux-sparse
Hello!
sparse reports the same error for two different situations. Suppose
file test.c is:
struct ctl_table {
int foo;
};
void test(struct ctl_table *sc)
{
sc->ctl_name = 0;
}
$ sparse -Wall test.c
test.c:7:4: error: no member 'ctl_name' in struct ctl_table
Rename the first ctl_table to ctl_table1, and the error will be the
same.
In the first case, the structure is known and lacks the requested
member. In the second case, the structure is unknown.
I'll appreciate if somebody makes the messages different. The message
is printed in evaluate_member_dereference() in evaluate.c.
Please test the case when only a forward declaration is available. This
should be reported like the undeclared case. Another test case is a
structure with no members. It should be treated as declared.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-05-31 5:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-31 5:30 Please make "no member" error more informative Pavel Roskin
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).