aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
diff options
authorOleg Nesterov <oleg@redhat.com>2020-02-27 16:21:15 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-03-02 13:22:08 +0100
commit094d5a948d8c3d8c36f26f14c03cccae66e053a1 (patch)
treea1ae925575e55cef55d46f93666bf60d31ec39e7 /Makefile
parente078774555c66004ab404097bfd58523c2e78f86 (diff)
downloadsparse-dev-094d5a948d8c3d8c36f26f14c03cccae66e053a1.tar.gz
dissect: enforce toplevel() if SYM_STRUCT was not defined
A separate change for documentation purposes. Test-case: void func(void) { struct UNDEFINED x; x.member = 0; } output: 1:6 def f func void ( ... ) 3:26 func def . v x struct UNDEFINED 4:9 func -w- . v x struct UNDEFINED 4:10 func -w- . m UNDEFINED.member bad type but in this case is_sym_local(UNDEFINED) = F makes more sense, most probably this struct was defined somewhere else but __sparse() didn't see its definition. Change lookup_member() to set type->scope = file_scope if !symbol_list. This is not 100% correct, but struct_union_enum_specifier() does the same check with the following comment: // The following test is actually wrong for empty // structs, but (1) they are not C99, (2) gcc does // the same thing, and (3) it's easier. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions