Click here to Skip to main content
15,909,199 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Thread Pin
Rajesh R Subramanian12-Aug-09 2:45
professionalRajesh R Subramanian12-Aug-09 2:45 
GeneralRe: Thread Pin
CPallini12-Aug-09 3:28
mveCPallini12-Aug-09 3:28 
QuestionCWebBrowser - OnWindowClosingBrowser Method.. Pin
Member 383463011-Aug-09 23:44
Member 383463011-Aug-09 23:44 
AnswerRe: CWebBrowser - OnWindowClosingBrowser Method.. Pin
Bacon Ultimate Cheeseburger12-Aug-09 20:10
Bacon Ultimate Cheeseburger12-Aug-09 20:10 
GeneralRe: CWebBrowser - OnWindowClosingBrowser Method.. Pin
Member 383463012-Aug-09 22:29
Member 383463012-Aug-09 22:29 
GeneralRe: CWebBrowser - OnWindowClosingBrowser Method.. Pin
Bacon Ultimate Cheeseburger12-Aug-09 23:03
Bacon Ultimate Cheeseburger12-Aug-09 23:03 
QuestionQuestion on strict-aliasing Pin
Hing11-Aug-09 23:40
Hing11-Aug-09 23:40 
AnswerRe: Question on strict-aliasing Pin
Stuart Dootson12-Aug-09 6:14
professionalStuart Dootson12-Aug-09 6:14 
You're misunderstanding what -fno-strict-aliasing does. GCC does strict aliasing analysis in order to optimise code, not to avoid type-punning. What it does is assume that variable references with different types can't be aliased. So, in the first case (unsigned long a; unsigned short* b;), GCC looks at the types of a and b and assumes that assignments to *b cannot affect a. So, it presumes that a is invariant across main(), so can optimise the code and inject the (presumed) constant value of a into the code generated for the printf statement. So, a never exists in memory. With -fno-strict-aliasing, you're tellng GCC it can't make that assumption, so that optimisation isn't done.

I believe the reason that -fno-strict-aliasing doesn't affect the second example is that GCC only implements the strict aliasing optimisation for variables of scalar types such as int, char, short, float etc.

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: Question on strict-aliasing [modified] Pin
Hing12-Aug-09 16:02
Hing12-Aug-09 16:02 
QuestionExamining a Message Queue Pin
ForNow11-Aug-09 22:53
ForNow11-Aug-09 22:53 
AnswerRe: Examining a Message Queue Pin
Stuart Dootson11-Aug-09 23:26
professionalStuart Dootson11-Aug-09 23:26 
QuestionVirtual Serial Port Question Pin
Programm3r11-Aug-09 22:24
Programm3r11-Aug-09 22:24 
AnswerRe: Virtual Serial Port Question Pin
Cedric Moonen11-Aug-09 23:01
Cedric Moonen11-Aug-09 23:01 
QuestionRe: Virtual Serial Port Question Pin
Programm3r11-Aug-09 23:27
Programm3r11-Aug-09 23:27 
AnswerRe: Virtual Serial Port Question Pin
Randor 12-Aug-09 9:31
professional Randor 12-Aug-09 9:31 
GeneralRe: Virtual Serial Port Question Pin
Programm3r12-Aug-09 20:01
Programm3r12-Aug-09 20:01 
Questionhow to display the IplImage into Picture control box. Pin
DevelopmentNoob11-Aug-09 22:13
DevelopmentNoob11-Aug-09 22:13 
AnswerRe: how to display the IplImage into Picture control box. Pin
zhu_lin11-Aug-09 22:59
zhu_lin11-Aug-09 22:59 
QuestionMaximum option to find a string/substring ,or compare option. Pin
Le@rner11-Aug-09 21:01
Le@rner11-Aug-09 21:01 
AnswerRe: Maximum option to find a string/substring ,or compare option. [modified] Pin
Adam Roderick J11-Aug-09 22:45
Adam Roderick J11-Aug-09 22:45 
AnswerRe: Maximum option to find a string/substring ,or compare option. Pin
zhu_lin11-Aug-09 23:10
zhu_lin11-Aug-09 23:10 
Questionload mp3 and seek by samples Pin
javad_200511-Aug-09 20:08
javad_200511-Aug-09 20:08 
AnswerRe: load mp3 and seek by samples Pin
zhu_lin11-Aug-09 23:12
zhu_lin11-Aug-09 23:12 
GeneralRe: load mp3 and seek by samples Pin
javad_200512-Aug-09 1:37
javad_200512-Aug-09 1:37 
GeneralRe: load mp3 and seek by samples Pin
zhu_lin12-Aug-09 2:55
zhu_lin12-Aug-09 2:55 

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.