5 ms·
On error report: I wrote some programs in C that heavily reply on huge macros to mimic template in C++. The gcc error report is completely useless as it points
by attractivechaos 14y ago
On error report: I wrote some programs in C that heavily reply on huge macros to mimic template in C++. The gcc error report is completely useless as it points to the line with the entire function expanded to a single line. Clang is much more clever.
- raverbashing 14y agoYes I'm not sure how it works in Clang, but of course, GCC doesn't "see" macros, this is seen by the CPP (C pre processor) and GCC operates in C code only There's a flag (-E) that makes GCC output the preprocessed code and stop
- attractivechaos 14y agoI do not know how clang achieves that, either. BTW, with gcc, I usually do something like this: "gcc -E prog.c | grep -v ^# | indent > prog-fmt.c" This is quite clumsy, though.