Click here to Skip to main content
15,440,014 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionConverting a string to a double Pin
Richard Andrew x6426-Sep-14 20:53
professionalRichard Andrew x6426-Sep-14 20:53 
AnswerRe: Converting a string to a double Pin
Richard MacCutchan26-Sep-14 21:35
mveRichard MacCutchan26-Sep-14 21:35 
AnswerRe: Converting a string to a double Pin
Jochen Arndt26-Sep-14 21:41
professionalJochen Arndt26-Sep-14 21:41 
QuestionSigned integers considered harmful? Pin
harold aptroot26-Sep-14 8:38
Memberharold aptroot26-Sep-14 8:38 
AnswerRe: Signed integers considered harmful? Pin
Chris Losinger26-Sep-14 8:46
professionalChris Losinger26-Sep-14 8:46 
GeneralRe: Signed integers considered harmful? Pin
PIEBALDconsult26-Sep-14 9:02
professionalPIEBALDconsult26-Sep-14 9:02 
AnswerRe: Signed integers considered harmful? Pin
Richard Andrew x6426-Sep-14 9:02
professionalRichard Andrew x6426-Sep-14 9:02 
GeneralRe: Signed integers considered harmful? Pin
harold aptroot26-Sep-14 10:15
Memberharold aptroot26-Sep-14 10:15 
Not of Death Stars exploding (sadly?).

But there's a well-known (and infamous) optimization that GCC does where if on some code path a signed integer would overflow, it deduces that therefore that code path must be dead. In practice this often means that overflow tests that are done after the overflow has already occurred (such as maybe you calculate something, then don't use the result if the calculation overflowed) are deleted, so your program looks correct (after all, you tested for overflows, right?) but isn't.
AnswerRe: Signed integers considered harmful? Pin
jeron126-Sep-14 9:17
Memberjeron126-Sep-14 9:17 
GeneralRe: Signed integers considered harmful? Pin
Chris Losinger26-Sep-14 9:22
professionalChris Losinger26-Sep-14 9:22 
GeneralRe: Signed integers considered harmful? Pin
jeron126-Sep-14 9:25
Memberjeron126-Sep-14 9:25 
GeneralRe: Signed integers considered harmful? Pin
Richard Andrew x6426-Sep-14 9:34
professionalRichard Andrew x6426-Sep-14 9:34 
GeneralRe: Signed integers considered harmful? Pin
PIEBALDconsult26-Sep-14 9:45
professionalPIEBALDconsult26-Sep-14 9:45 
GeneralRe: Signed integers considered harmful? Pin
harold aptroot26-Sep-14 10:05
Memberharold aptroot26-Sep-14 10:05 
AnswerRe: Signed integers considered harmful? Pin
Richard MacCutchan26-Sep-14 10:14
mveRichard MacCutchan26-Sep-14 10:14 
GeneralRe: Signed integers considered harmful? Pin
harold aptroot26-Sep-14 10:19
Memberharold aptroot26-Sep-14 10:19 
AnswerRe: Signed integers considered harmful? Pin
CubbiMew29-Sep-14 16:44
MemberCubbiMew29-Sep-14 16:44 
QuestionVector index to iterator Pin
elelont225-Sep-14 23:45
Memberelelont225-Sep-14 23:45 
AnswerRe: Vector index to iterator Pin
«_Superman_»26-Sep-14 0:07
professional«_Superman_»26-Sep-14 0:07 
GeneralRe: Vector index to iterator Pin
elelont226-Sep-14 0:29
Memberelelont226-Sep-14 0:29 
GeneralRe: Vector index to iterator Pin
CPallini26-Sep-14 1:31
mveCPallini26-Sep-14 1:31 
QuestionConverting char* to double Pin
elelont225-Sep-14 21:37
Memberelelont225-Sep-14 21:37 
AnswerRe: Converting char* to double Pin
«_Superman_»25-Sep-14 22:43
professional«_Superman_»25-Sep-14 22:43 
GeneralRe: Converting char* to double Pin
elelont225-Sep-14 23:54
Memberelelont225-Sep-14 23:54 
GeneralRe: Converting char* to double Pin
Jochen Arndt26-Sep-14 2:04
professionalJochen Arndt26-Sep-14 2:04 

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.