Click here to Skip to main content
15,914,066 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
General[Solved?] Constructor help – getting data from CListView to dialog. Pin
Vaclav_22-Jan-08 12:06
Vaclav_22-Jan-08 12:06 
GeneralRe: [Solved?] Constructor help – getting data from CListView to dialog. Pin
Mike Danberg23-Jan-08 19:17
Mike Danberg23-Jan-08 19:17 
GeneralCalling a function Pin
newkid21-Jan-08 4:05
newkid21-Jan-08 4:05 
GeneralWrong forum Pin
CPallini21-Jan-08 4:21
mveCPallini21-Jan-08 4:21 
GeneralError in Release build (Shift Operator) Pin
Sumanta Rout21-Jan-08 3:14
Sumanta Rout21-Jan-08 3:14 
GeneralRe: Error in Release build (Shift Operator) Pin
David Crow21-Jan-08 3:36
David Crow21-Jan-08 3:36 
GeneralRe: Error in Release build (Shift Operator) Pin
Alexander M.,21-Jan-08 3:42
Alexander M.,21-Jan-08 3:42 
GeneralRe: Error in Release build (Shift Operator): is it actually a C++ compiler bug? Pin
CPallini21-Jan-08 4:04
mveCPallini21-Jan-08 4:04 
Actually (at least IMHO) only the release build is working properly.
To keep things easy, let's ignore sign: if you shift a long (i.e. a 4-bytes, 32-bits integer) 32 times then you must obtain zero.
I've seen the disassembly, both of the debug build and of the release build and I suppose that in the latter one code optimization hides a compiler bug (if you turn OFF optimization then the release build behave exactly like the debug one).
In the debug build the compiler translates the right shift operation into SAR assembly instruction. SAR instruction executes the right shift ignoring all but the four least significative ones of the second operand, i.e. does nothing in your particular case. I don't think that standard C or C++ language allows this behaviour.
I think you hit a subtle compiler bug, though I'm not sure about (I'll post the question on the general discussion forum).


Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

[my articles]


modified on Monday, January 21, 2008 10:29:21 AM

GeneralRe: Error in Release build (Shift Operator) Pin
CPallini21-Jan-08 5:04
mveCPallini21-Jan-08 5:04 
GeneralAnti keylogger Pin
Eikthrynir21-Jan-08 3:05
Eikthrynir21-Jan-08 3:05 
GeneralRe: Anti keylogger Pin
Alexander M.,21-Jan-08 3:39
Alexander M.,21-Jan-08 3:39 
GeneralRe: Anti keylogger [modified] Pin
Eikthrynir21-Jan-08 3:45
Eikthrynir21-Jan-08 3:45 
QuestionCPropertySheet PressButton does not work Pin
linton samuel dawson21-Jan-08 2:12
linton samuel dawson21-Jan-08 2:12 
QuestionRe: CPropertySheet PressButton does not work Pin
David Crow21-Jan-08 3:04
David Crow21-Jan-08 3:04 
AnswerRe: CPropertySheet PressButton does not work Pin
linton samuel dawson21-Jan-08 3:08
linton samuel dawson21-Jan-08 3:08 
QuestionRe: CPropertySheet PressButton does not work Pin
David Crow21-Jan-08 3:47
David Crow21-Jan-08 3:47 
AnswerRe: CPropertySheet PressButton does not work Pin
linton samuel dawson21-Jan-08 4:08
linton samuel dawson21-Jan-08 4:08 
GeneralRe: CPropertySheet PressButton does not work Pin
linton samuel dawson21-Jan-08 4:53
linton samuel dawson21-Jan-08 4:53 
GeneralRe: CPropertySheet PressButton does not work Pin
KarstenK21-Jan-08 3:59
mveKarstenK21-Jan-08 3:59 
AnswerRe: CPropertySheet PressButton does not work Pin
linton samuel dawson21-Jan-08 4:01
linton samuel dawson21-Jan-08 4:01 
GeneralDos windows invisible Pin
tom groezer21-Jan-08 1:30
tom groezer21-Jan-08 1:30 
GeneralRe: Dos windows invisible Pin
JudyL_MD21-Jan-08 2:01
JudyL_MD21-Jan-08 2:01 
GeneralRe: Dos windows invisible Pin
tom groezer21-Jan-08 16:08
tom groezer21-Jan-08 16:08 
GeneralRe: Dos windows invisible Pin
JudyL_MD22-Jan-08 2:36
JudyL_MD22-Jan-08 2:36 
GeneralRe: Dos windows invisible Pin
Rajesh R Subramanian21-Jan-08 21:29
professionalRajesh R Subramanian21-Jan-08 21:29 

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.