Use a parameter -Hfor GCC that will display the header files to be included (along with an indication of nesting so you can see which file includes the header).
-H , , backward_warning.h.
, hash_map, :
mikeb@ubuntu:~$ g++ -H -c test.cpp
. /usr/include/c++/4.4/backward/hash_map
.. /usr/include/c++/4.4/backward/backward_warning.h
In file included from /usr/include/c++/4.4/backward/hash_map:60,
from test.cpp:3:
/usr/include/c++/4.4/backward/backward_warning.h:28: warning:
includes at least one deprecated or antiquated header which may be removed without
further notice at a future date. Please use a non-deprecated interface with equivalent
functionality instead. For a listing of replacement headers and interfaces, consult
the file backward_warning.h. To disable this warning use -Wno-deprecated.
... a bunch of snipped output ...
, /showIncludes MSVC.