I have legacy code that has conditional preprocessing, for example. #ifdefand #elsewhere I found using a macro __attribute__. I did a quick research and found out that it is specific to GNU compilers. I have to use the old code in Visual Studio 2010 using MSVC10 compiler and, apparently, he complains everywhere, he sees the attribute ((unused)), although it is protected #ifndefand #ifdefs. Example:
#ifdef __tone_z__
static const char *mcr_inf
#else
static char *mcr_inf
#endif
#ifndef _WINDOWS
__attribute__(( unused )) % this is causing all the problem!!
#endif
= "@(#) bla bla copyright bla";
#ifdef __tone_z__
static const char *mcr_info_2a353_id[2]
#else
static char *mcr_info_2a353_id[2]
#endif
__attribute__(( unused )) = { "my long copyright info!" } ;
, , . __attribute__()? C2061 ( /). , , , GNU ( !!).
, , ; , windows.... argh.... UNIX end-of-line Windows EOL, .... _WINDOWS thingy, EOL.
!
.