Re: What exactly is the compiler thinking?
From: Doug Harrison [MVP] (dsh_at_mvps.org)
Date: 07/16/04
- Next message: William DePalo [MVP VC++]: "Re: RBN_AUTOBREAK help request"
- Previous message: Kaye: "RBN_AUTOBREAK help request"
- In reply to: Vinayak Raghuvamshi: "Re: What exactly is the compiler thinking?"
- Next in thread: Nishant S: "Re: What exactly is the compiler thinking?"
- Reply: Nishant S: "Re: What exactly is the compiler thinking?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 16 Jul 2004 17:17:47 -0500
Vinayak Raghuvamshi wrote:
>"Doug Harrison [MVP]" <dsh@mvps.org> wrote in message news:<an8df0hpafjd13d266e3t4nq4045tj08p6@4ax.com>...
>> Vinayak Raghuvamshi wrote:
>>
>> >Visual Studio .Net 2003 Enterprise Architect. (VC++ code)
>> >
>> >a developer in our team made a typo and his code looks like this
>> >
>> >if (sendMessage == NULL)
>> > m_ErrorCode = 0 ERR_MESSAGE_EMPTY;
>> >
>> >But the compiler did not crib at all ! everything built fine....
>> > .....
>> >-Vinayak
>>
>> What's the definition of ERR_MESSAGE_EMPTY? If it's a macro, you can compile
>> with /P and view the .i file that is produced to see the result of
>> preprocessing.
>
>Sorry, My Bad. ERR_MESSAGE_EMPTY was defined as -17 :-(
To fix the problem and avoid it in the future, you can enclose it in
parentheses or change it from a macro to a const int.
-- Doug Harrison Microsoft MVP - Visual C++
- Next message: William DePalo [MVP VC++]: "Re: RBN_AUTOBREAK help request"
- Previous message: Kaye: "RBN_AUTOBREAK help request"
- In reply to: Vinayak Raghuvamshi: "Re: What exactly is the compiler thinking?"
- Next in thread: Nishant S: "Re: What exactly is the compiler thinking?"
- Reply: Nishant S: "Re: What exactly is the compiler thinking?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|