Temporary header file '/tmp/6qY_z4JKNO/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 #define getaddrinfo_a(a,b,c,d) // add includes #include "/usr/include/loadpng.h" The GCC parameters: gcc -fdump-lang-raw -fkeep-inline-functions -c -x c++ -fpermissive -w "/tmp/6qY_z4JKNO/dump1.h" In file included from /tmp/6qY_z4JKNO/dump1.h:12: /usr/include/loadpng.h:58:11: error: ‘BITMAP’ does not name a type 58 | APNG_FUNC(BITMAP *, load_png, (AL_CONST char *filename, RGB *pal)); | ^~~~~~ /usr/include/loadpng.h:25:48: note: in definition of macro ‘APNG_FUNC’ 25 | #define APNG_FUNC(type, name, args) extern type name args | ^~~~ /usr/include/loadpng.h:61:11: error: ‘BITMAP’ does not name a type 61 | APNG_FUNC(BITMAP *, load_png_pf, (PACKFILE *fp, RGB *pal)); | ^~~~~~ /usr/include/loadpng.h:25:48: note: in definition of macro ‘APNG_FUNC’ 25 | #define APNG_FUNC(type, name, args) extern type name args | ^~~~ /usr/include/loadpng.h:64:11: error: ‘BITMAP’ does not name a type 64 | APNG_FUNC(BITMAP *, load_memory_png, (AL_CONST void *buffer, int buffer_size, RGB *pal)); | ^~~~~~ /usr/include/loadpng.h:25:48: note: in definition of macro ‘APNG_FUNC’ 25 | #define APNG_FUNC(type, name, args) extern type name args | ^~~~ /usr/include/loadpng.h:67:27: error: ‘AL_CONST’ was not declared in this scope 67 | APNG_FUNC(int, save_png, (AL_CONST char *filename, BITMAP *bmp, AL_CONST RGB *pal)); | ^~~~~~~~ /usr/include/loadpng.h:25:58: note: in definition of macro ‘APNG_FUNC’ 25 | #define APNG_FUNC(type, name, args) extern type name args | ^~~~ /usr/include/loadpng.h:67:52: error: ‘BITMAP’ was not declared in this scope 67 | APNG_FUNC(int, save_png, (AL_CONST char *filename, BITMAP *bmp, AL_CONST RGB *pal)); | ^~~~~~ /usr/include/loadpng.h:25:58: note: in definition of macro ‘APNG_FUNC’ 25 | #define APNG_FUNC(type, name, args) extern type name args | ^~~~ /usr/include/loadpng.h:67:60: error: ‘bmp’ was not declared in this scope 67 | APNG_FUNC(int, save_png, (AL_CONST char *filename, BITMAP *bmp, AL_CONST RGB *pal)); | ^~~ /usr/include/loadpng.h:25:58: note: in definition of macro ‘APNG_FUNC’ 25 | #define APNG_FUNC(type, name, args) extern type name args | ^~~~ /usr/include/loadpng.h:67:65: error: ‘AL_CONST’ was not declared in this scope 67 | APNG_FUNC(int, save_png, (AL_CONST char *filename, BITMAP *bmp, AL_CONST RGB *pal)); | ^~~~~~~~ /usr/include/loadpng.h:25:58: note: in definition of macro ‘APNG_FUNC’ 25 | #define APNG_FUNC(type, name, args) extern type name args | ^~~~