Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Timers are as threads? (newbie) Pin
Steen Krogsgaard1-Mar-02 3:34
Steen Krogsgaard1-Mar-02 3:34 
GeneralRe: Timers are as threads? (newbie) Pin
Joan M1-Mar-02 4:54
professionalJoan M1-Mar-02 4:54 
GeneralRe: Timers are as threads? (newbie) Pin
Bill Wilson1-Mar-02 6:09
Bill Wilson1-Mar-02 6:09 
GeneralRe: Timers are as threads? (newbie) Pin
Steen Krogsgaard3-Mar-02 21:30
Steen Krogsgaard3-Mar-02 21:30 
QuestionHow to access network shared resource from a service? Pin
28-Feb-02 21:21
suss28-Feb-02 21:21 
AnswerRe: How to access network shared resource from a service? Pin
Bill Wilson1-Mar-02 6:20
Bill Wilson1-Mar-02 6:20 
GeneralStandard Conversions about char Pin
28-Feb-02 19:38
suss28-Feb-02 19:38 
GeneralRe: Standard Conversions about char Pin
Joaquín M López Muñoz28-Feb-02 20:12
Joaquín M López Muñoz28-Feb-02 20:12 
(First of all, I guess there's a typo in your post and you meant -16 instead of -15.)

This is most surprising! According to the standard, the behavior you're describing is compliant: you're trying to convert a value outside (signed) char range (namely 0xf0=240), and the standard marks this as undefined behavior. 1) 2) are equivalent, about 3) I'm not sure what's the expected behavior, and as for 4) the expected value of x is 240, not 0 (Could you check 4) again?)
What strikes me is that, despite the undefined behavior, the simplest solution, in terms of resulting code, would be that x was set to -16 (no overflow checking, direct bit pattern reinterpretation). Moreover, it is highly unlikely that MS decides to change the way its compiler behaves in such a delicate subject, thus breaking backward compatibility to gain esentially nothing. Could it be that this is a debug mode feature, and in release mode x is -16 like in the old days? Could you check that?

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Standard Conversions about char Pin
Bill Wilson1-Mar-02 8:43
Bill Wilson1-Mar-02 8:43 
GeneralRe: Standard Conversions about char Pin
Tim Smith1-Mar-02 5:27
Tim Smith1-Mar-02 5:27 
GeneralPreventing a Non-resizable form from maximizing when run from a shortcut Pin
outlaw-torn28-Feb-02 19:05
outlaw-torn28-Feb-02 19:05 
GeneralRe: Preventing a Non-resizable form from maximizing when run from a shortcut Pin
Paul M Watt28-Feb-02 19:07
mentorPaul M Watt28-Feb-02 19:07 
GeneralRe: Preventing a Non-resizable form from maximizing when run from a shortcut Pin
Steen Krogsgaard1-Mar-02 3:37
Steen Krogsgaard1-Mar-02 3:37 
GeneralCustom message handling Pin
alex.barylski28-Feb-02 18:40
alex.barylski28-Feb-02 18:40 
GeneralRe: Custom message handling Pin
Mazdak28-Feb-02 18:47
Mazdak28-Feb-02 18:47 
GeneralRe: Custom message handling Pin
Nish Nishant28-Feb-02 19:25
sitebuilderNish Nishant28-Feb-02 19:25 
GeneralRe: Custom message handling Pin
alex.barylski28-Feb-02 19:55
alex.barylski28-Feb-02 19:55 
GeneralRe: Custom message handling Pin
Michael Dunn28-Feb-02 20:52
sitebuilderMichael Dunn28-Feb-02 20:52 
GeneralRe: Custom message handling Pin
alex.barylski1-Mar-02 6:02
alex.barylski1-Mar-02 6:02 
GeneralRe: Custom message handling Pin
alex.barylski1-Mar-02 6:15
alex.barylski1-Mar-02 6:15 
GeneralRe: Custom message handling Pin
Nish Nishant28-Feb-02 21:25
sitebuilderNish Nishant28-Feb-02 21:25 
GeneralRe: Custom message handling Pin
alex.barylski1-Mar-02 6:12
alex.barylski1-Mar-02 6:12 
GeneralRe: Custom message handling Pin
Nish Nishant1-Mar-02 6:20
sitebuilderNish Nishant1-Mar-02 6:20 
GeneralRe: Custom message handling Pin
Steen Krogsgaard1-Mar-02 3:49
Steen Krogsgaard1-Mar-02 3:49 
GeneralRe: Custom message handling Pin
Anna-Jayne Metcalfe1-Mar-02 4:36
Anna-Jayne Metcalfe1-Mar-02 4:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.