I'm teaching a course in which students get their first experience programming in C. We're using gcc on Linux and (for beginning students) the user experience is terrible. I'm looking for a C front end that will do one or more of the following:
If it cannot find a .h file, announce the fact and shut up. Don't spray screenfuls of garbage so that the information about the missing .h file is lost.
If an known name appears in a type-like position, it should trigger a sane, sensible error message. For example, the source code
typedef struct Queue { Array_T elements; int first, last, length; } Queue;
Should trigger a message like
Line 2: I saw `Array_T` used as a type, but it has never been declared as a type.
In this same situation, or especially in function prototypes, gcc produces incomprehensible gobbledegook.
In an ideal world, the tool would also detect attempts to link libraries out of dependency order. After all, we know how to do topological sort now.
There is no requirement that the tool be able to compile any code. I am looking only for a way to get better error messages. The only hard constraint is that it has to be able to run on 64-bit Red Hat Enterprise Linux, because that's our teaching platform. Also, it has to understand C99.
I'm aware of research front ends like CIL and an older effort at AT&T, but I don't know how they are on error messages. Similar comments on the EDG front end, which is free for educational use. I'm also aware that Gimpel Software may have some commercial offerings that might fit the bill. I don't know what budget we have, but I'm willing to go to my department head and ask for money.
I ask the collective wisdom of StackOverflow: what C99 front ends are available which issue error messages that beginners can understand?