getting the list of input files of a gcc command line

Vincent Lefevre vincent+gcc@vinc17.org
Wed Dec 5 16:44:00 GMT 2018


I would like to write a gcc wrapper and get the list of input files
of the gcc command line before executing gcc. As a heuristic, I could
get all the arguments with some extension like .c and .h, but is
there a more reliable way?

The goal is to get a warning if I try to execute gcc while some input
file has not been saved in Emacs (Emacs provides the way to do this,
e.g. by creating a symbolic link .#tst.c when tst.c has not been
saved).

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



More information about the Gcc-help mailing list