Temporary header file '/tmp/EtHcP2yos0/dump1.h' with the following content will be compiled to create GCC translation unit dump: // add defines #define __STDC_VERSION__ 201710L #define _GXX_NULLPTR_T #define CLUTTER_ENABLE_COMPOSITOR_API 1 #define _REGEX_NELTS(n) #define _Atomic #define PACKED // add includes #include "/usr/include/lua5.1/lua-rrd.h" #include "/usr/include/lua5.2/lua-rrd.h" #include "/usr/include/lua5.3/lua-rrd.h" The GCC parameters: gcc -fdump-lang-raw -fkeep-inline-functions -c -x c++ -fpermissive -w "/tmp/EtHcP2yos0/dump1.h" In file included from /tmp/EtHcP2yos0/dump1.h:11: /usr/include/lua5.1/lua-rrd.h:3:24: error: ‘lua_State’ was not declared in this scope 3 | extern int luaopen_rrd(lua_State*); | ^~~~~~~~~ /usr/include/lua5.1/lua-rrd.h:3:34: error: expected primary-expression before ‘)’ token 3 | extern int luaopen_rrd(lua_State*); | ^ In file included from /tmp/EtHcP2yos0/dump1.h:12: /usr/include/lua5.2/lua-rrd.h:3:12: error: redefinition of ‘int luaopen_rrd’ 3 | extern int luaopen_rrd(lua_State*); | ^~~~~~~~~~~ /usr/include/lua5.1/lua-rrd.h:3:12: note: ‘int luaopen_rrd’ previously defined here 3 | extern int luaopen_rrd(lua_State*); | ^~~~~~~~~~~ /usr/include/lua5.2/lua-rrd.h:3:24: error: ‘lua_State’ was not declared in this scope 3 | extern int luaopen_rrd(lua_State*); | ^~~~~~~~~ /usr/include/lua5.2/lua-rrd.h:3:34: error: expected primary-expression before ‘)’ token 3 | extern int luaopen_rrd(lua_State*); | ^ In file included from /tmp/EtHcP2yos0/dump1.h:13: /usr/include/lua5.3/lua-rrd.h:3:12: error: redefinition of ‘int luaopen_rrd’ 3 | extern int luaopen_rrd(lua_State*); | ^~~~~~~~~~~ /usr/include/lua5.1/lua-rrd.h:3:12: note: ‘int luaopen_rrd’ previously defined here 3 | extern int luaopen_rrd(lua_State*); | ^~~~~~~~~~~ /usr/include/lua5.3/lua-rrd.h:3:24: error: ‘lua_State’ was not declared in this scope 3 | extern int luaopen_rrd(lua_State*); | ^~~~~~~~~ /usr/include/lua5.3/lua-rrd.h:3:34: error: expected primary-expression before ‘)’ token 3 | extern int luaopen_rrd(lua_State*); | ^