(no title)
Safety1stClyde | 8 years ago
I don't think this is a particularly useful thing to do. Essentially it is somewhat like making a compiler which accepts broken inputs using heuristics to guess at what the programmer intended to write. That will not result in better programs being written, rather it will result in the programmer not only writing worse code but not even being aware of the flaws in their code.
make3|8 years ago
marvy|8 years ago
Safety1stClyde|8 years ago
It repeatedly says that the aim is to fix errors. Assuming, however, that it is intended to give better error messages, here is the output of Clang on the input C program given as an example:
It identifies the problematic line of the program code better than gcc. The function declaration within main is not legal. I tried this with the gcc compiler and did not get the error above. Running "indent" on the code would have revealed the problems:$ indent < gupta.c
/INDENT Error@18: Stuff missing from end of file */
A simple count of braces, { and }, would also have revealed the problem.
shriphani|8 years ago
userbinator|8 years ago