Combining and Converting to HEX to Floating point

I don't understand the question. It's not a problem on an 8-bit processor and could be a problem on a 32-bit processor. That makes it hardware-specific. Which is exactly what I said:

No. It's about what is allowed by the language standard and what decisions the compiler is allowed to make while following that standard. If you break your promise to the compiler that you'll follow the rules, then you can't expect the compiler to produce correct object code. That's the meaning of Undefined Behavior.

ok, that's what you mean by hardware. i was thinking DSP, hardward architecture, network processor, ???

i'm trying to understand the reason for the language restrictions

sounds like the reason is alignment and i provide a case that demonstrates it

No. The reason is the second part of that sentence:

The reason for the rule in the standard is irrelevant. It is what it is.

but i'm asking for the reason.

it's relevant to me for the sake of understanding

A fair question, but of course, this question has been asked before.

https://www.reddit.com/r/cpp/comments/5yvbsg/what_is_the_rationale_in_the_standard_for_not/

And, the Arduino Forum is probably not the place to get such an answer. You can probably find a forum more suitable for the discussion of such esoterica.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.