Q:

Compile error for QT 5.2.1; expected unqualified-id before 'delete'

I'm trying to compile QT 5.2.1 for an older Linux distro (Suse Linux Enterprise 11) and after a while I receive the error below:
In file included from qxcbxsettings.cpp:46:0:  
/usr/include/X11/extensions/XIproto.h:1825:17: 
    error: expected unqualified-id before 'delete'  
BOOL        delete;

I'm more or less confident this is caused by the fact that "delete" is a reserved word for C++. If this header would be my own, I would simply rename delete to something else, but of course it is not an option in case of an X11 header file.
Any ideas how can I force gcc to compile as plain C for this header? All I found is a configure option -no-c++11 for qt's configure script, but that did not make a difference.   

A:

delete is a reserved keyword in C++, There is bug reported related to X11/extensions/XIproto.h file here
They also provided patch for same 
So you need to apply patch for compiling further patch is like
+#if defined(__cplusplus) || defined(c_plusplus)
+    BOOL        c_delete;
+#else
     BOOL        delete;
+#endif 

