https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61386
--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Akim Demaille from comment #2) > Well, I never hacked in GCC. I can try, time permitting... Never too late to try. This one should be easy if you know how to use a debugger. Just add a breakpoint in c_cpp_error, then go up in the backtrace until you find a place where the correct location is known (in libcpp, location_t is called source_location but they are the same thing), pass that location to c_cpp_error. You can use expand_location(location) to see what locations point to. No hurries. You have all the time in the world :)