Re: [AD] 2 errors encountered in current CVS |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> Javier González wrote:
> > In MSVC, compiling this program using the maximun warning level
> [code snipped]
> > I didn't get the typical gcc warning
>
> Strange, with msvc 5 and warning level 4 I get:
>
> warning C4505: 'clear' : unreferenced local function has been removed
>
> Maybe they changed that to keep the incompatibility between versions :-)
probably =)
could you try this out?
// save the warning state
#pragma warning(push)
#pragma warning(disable : 4505)
static void clear1(void) {
printf("clear1\n");
}
// restore warning state
#pragma warning(pop)
static void clear2(void) {
printf("clear2\n");
}
int main(void) {
printf("hi\n");
}
hopefully, clear1 shouldnt give a warning whereas clear2 will...