The faulty code for the project is in
trunk - sscompiler - Project Hosting on Google Code
It includes a makefile.
if you run: ssCompiler.out and then type int main(int c){} it will give a segmentation fault.
If you try the following main, it will work correctly (see output).
The unexpected thing is that when the above project fails is in addFunction("int", NULL, "foo") (with the same hard-coded parameters).
Unfortunately the debugger couldn't help me with the yacc project, while in the main below, everything works!
Immensly grateful if someone could try out my claims, and point me out. I recall there where compiler advocates on board, hopefully yacc experts too.
Code:
int main(int argc, char** argv) {
/*
list* fList = newFunct("int",NULL, "foo");
*/
addFunction("int", NULL, "foo");
/*
addFunction("int", NULL, "bar");
*/
printFList(fList);
assert (findFunc(fList, "foo"));
/*
assert (findFunc(fList, "bar"));
*/
return (EXIT_SUCCESS);
}