Przemysław Czerpak wrote:
and I need to know if MSC supports:
#pragma off (unreferenced) /* to disable unused variable warnings */
#pragma on (unreferenced) /* to enable unused variable warnings */
or at least silently ignores them.
Can someone using MS[V]C check it?
With MSVC 2008:
#include "stdafx.h"
void warn()
{
int i;
}
void badpragma()
{
#pragma off (unreferenced)
int i;
#pragma on (unreferenced)
}
int main(int argc, char * argv[])
#pragma warning( push )
#pragma warning( disable : 4101 )
{
int i;
printf("Hello, pragma test");
return 0;
}
#pragma warning( pop )
results in:
c:\users\alex\documents\visual studio
2008\projects\pragmatest\pragmatest\pragmatest.cpp(5) : warning C4101: 'i' :
unreferenced local variable
c:\users\alex\documents\visual studio
2008\projects\pragmatest\pragmatest\pragmatest.cpp(10) : warning C4068: unknown
pragma
c:\users\alex\documents\visual studio
2008\projects\pragmatest\pragmatest\pragmatest.cpp(12) : warning C4068: unknown
pragma
c:\users\alex\documents\visual studio
2008\projects\pragmatest\pragmatest\pragmatest.cpp(11) : warning C4101: 'i' :
unreferenced local variable
Regards
Alex
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour