casting question - i64 = *((__int64*)&d);

G

Guest

...
This code is broken and will or will not work depending on the
compiler and its settings, e.g. it won't work with gcc -O2. ...

How can a piece of code with no observable behaviour "not work"?

Dietmar
 
M

muntyan

How can a piece of code with no observable behaviour "not work"?

How can a piece of code work at all? Simple - wrap it into
a function (e.g. main()), add some printf() to see the result,
stuff like that.

Yevgen
 
G

Guest

How can a piece of code work at all? Simple - wrap it into
a function (e.g. main()), add some printf() to see the result,
stuff like that.

What is the "result" of the given code? See, you stated "it won't work
with gcc -O2." In order to understand your statement one needs to know
what you regard as the result and what stuff you added to see it.

Dietmar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top