| Age | Commit message (Collapse) | Author | Files | Lines |
|
The test-inspect tool uses GTK to visualize symbol nodes. It turns
out that gtk_init() implicitly sets the locale to the system locale,
and since Sparse uses strtod()/strtold() for parsing floating-point
numbers in expressions, parsing becomes locale-dependent.
Since the system's locale may be different from "C", test-inspect
may be unable to parse float numbers.
Steps to reproduce:
$ echo "int main(void){3.14;}" > test.c
$ LC_ALL="fr_FR.UTF-8" test-inspect test.c
Output:
test.c:1:16: error: constant 3.14 is not a valid number
Fix this by resetting the locale right after gtk_init().
Signed-off-by: Davidson Francis <davidsondfgl@gmail.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
Now that FOR_EACH_PTR() doesn't strip the tag anymore, there
is no more needs for FOR_EACH_PTR_NOTAG() as both do the same.
So convert the few uses to FOR_EACH_PTR() and remove its definition.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
|
|
The test program will launch a gtk treeview windows to
display the symbol node in the AST.
Signed-Off-By: Christopher Li <sparse@chrisli.org>
|