How do I inhibit "note C6311" in Microsoft C compiler?
- by piCookie
In this maximally clipped source example, the manifest constant FOOBAR is being redefined. This is deliberate, and there is extra code in the live case to make use of each definition.
The pragma was added to get rid of a warning message, but then a note appeared, and I don't seem to find a way to get rid of the note.
I've been able to modify this particular source to #undef between the #define, but I would like to know if there's a way to inhibit the note without requiring #undef, since there are multiple constants being handled the same way.
#pragma warning( disable : 4005 ) // 'identifier' : macro redefinition
#define FOOBAR FOO
#define FOOBAR BAR
The compiler banner and output are as follows
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
message.c
message.c(3) : note C6311: message.c(2) : see previous definition of 'FOOBAR'