IE For "List list" to work, there must be a thing named List available as a typedef.
For list = 0 to work, tlist must be a pointer or an int.
For list->data to work, list must be a pointer to a struct, and that struct must have a member named data.
for list->data = val to work, the member named data must be compatible with a double.
It simply generates all of the constraints like this on the program, and then solves the constraint set, which produces a valid program (hopefully. it is possible it may not have enough data in some cases, given how C is parsed)
typedef int bool;
I am not sure if I want that in my header.
I've seen this in the wild, including the top answer on a StackOverflow question:
#define bool int
Besides, if you want correct code, don't ask a tool to guess it! This tool is for patching up fragments enough to get them through the compiler front end analysis.
The actual boolean type is called _Bool, but <stdbool.h> provides macros that let bool, true, and false work.