Click here to Skip to main content
15,888,461 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: what about x = x++; ? Pin
Joaquín M López Muñoz16-Sep-05 5:00
Joaquín M López Muñoz16-Sep-05 5:00 
GeneralRe: what about x = x++; ? Pin
bugDanny16-Sep-05 6:45
bugDanny16-Sep-05 6:45 
GeneralRe: what about x = x++; ? Pin
Joaquín M López Muñoz16-Sep-05 7:05
Joaquín M López Muñoz16-Sep-05 7:05 
GeneralRe: what about x = x++; ? Pin
bugDanny16-Sep-05 7:41
bugDanny16-Sep-05 7:41 
AnswerRe: what about x = x++; ? Pin
Anonymous15-Sep-05 8:30
Anonymous15-Sep-05 8:30 
GeneralRe: what about x = x++; ? Pin
Anonymous15-Sep-05 8:38
Anonymous15-Sep-05 8:38 
GeneralRe: what about x = x++; ? Pin
bugDanny15-Sep-05 8:57
bugDanny15-Sep-05 8:57 
GeneralRe: what about x = x++; ? Pin
Chris Losinger15-Sep-05 8:59
professionalChris Losinger15-Sep-05 8:59 
Anonymous wrote:
my question has not been understood

i read this whole post and didn't see a single question mark. what's your question ?

yes, the post-increment operator can generate code that leads to undefined compiler behavior - that's well-known and well understood. but, in those cases, the code can generally be re-written in a way that avoids the situation. simply chopping the complex operation into sub-operations will eliminate the ambiguity from the compiler's point of view, as well as making life easier for any unfortunate maintenance programmer who has to look at your code in the future.




Cleek | Image Toolkits | Thumbnail maker

GeneralRe: what about x = x++; ? Pin
bugDanny15-Sep-05 9:05
bugDanny15-Sep-05 9:05 
GeneralRe: what about x = x++; ? Pin
David Crow15-Sep-05 9:32
David Crow15-Sep-05 9:32 
GeneralRe: what about x = x++; ? Pin
pesho293215-Sep-05 21:02
pesho293215-Sep-05 21:02 
GeneralRe: what about x = x++; ? Pin
David Crow16-Sep-05 2:15
David Crow16-Sep-05 2:15 
GeneralRe: what about x = x++; ? Pin
bugDanny16-Sep-05 3:15
bugDanny16-Sep-05 3:15 
GeneralRe: what about x = x++; ? Pin
pesho293216-Sep-05 3:36
pesho293216-Sep-05 3:36 
GeneralRe: what about x = x++; ? Pin
bugDanny16-Sep-05 4:19
bugDanny16-Sep-05 4:19 
GeneralRe: what about x = x++; ? Pin
pesho293218-Sep-05 21:48
pesho293218-Sep-05 21:48 
GeneralRe: what about x = x++; ? Pin
bugDanny19-Sep-05 3:02
bugDanny19-Sep-05 3:02 
GeneralRe: what about x = x++; ? Pin
pesho293219-Sep-05 5:38
pesho293219-Sep-05 5:38 
GeneralRe: what about x = x++; ? Pin
bugDanny19-Sep-05 7:43
bugDanny19-Sep-05 7:43 
GeneralRe: what about x = x++; ? Pin
pesho293219-Sep-05 21:14
pesho293219-Sep-05 21:14 
GeneralRe: what about x = x++; ? Pin
bugDanny20-Sep-05 3:16
bugDanny20-Sep-05 3:16 
GeneralRe: what about x = x++; ? Pin
pesho293220-Sep-05 4:52
pesho293220-Sep-05 4:52 
GeneralRe: what about x = x++; ? [Modified 2005-09-19] Pin
Maxwell Chen15-Sep-05 21:17
Maxwell Chen15-Sep-05 21:17 
GeneralRe: what about x = x++; ? Pin
bugDanny16-Sep-05 3:21
bugDanny16-Sep-05 3:21 
QuestionVC++6.0 - Finding users privileges Pin
Rainos15-Sep-05 4:48
Rainos15-Sep-05 4:48 

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.