'specifier' : storage-class or type specifier(s) unexpected here; ignored
For example, the following storage-class specifier locations are invalid and when compiled will cause C4518:
__declspec(dllexport) extern "C" void foo(); // Here
class C {
int * virtual vfunc(); // And here
};
The following macro will not give the expected results and will result in a C4518:
extern "C" DLLEXPORT STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv);
This macro should be written as:
STDAPI DLLEXPORT DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv);