Question: I'm working with HiTech PICC32 on the PIC32MX series of microprocessors, but I think this question is general enough for anyone knowledgable in C. (This is almost equivalent to C90, with sizeof(int) = sizeof(long) = sizeof(float) = 4.)

Let's say I read a 4-byte word of data that represents a `float`. I can quickly convert it to its actual float value with:

```
#define FLOAT_FROM_WORD(WORD_VALUE) (*((float*) &(WORD_VALUE)))

```

But this only works for lvalues. I can't, for example, use this on a function return value like:

```
FLOAT_FROM_WORD(eeprom_read_word(addr));

```

Is there a short and sweet way to do this inline, i.e. without a function call or temp variable? To be honest, there's no HUGE reason for me to avoid a function call or extra var, but it's bugging me. There must be a way I'm missing.

**Added:** I didn't realise that `WORD` was actually a common typedef. I've changed the name of the macro argument to avoid confusion.

Answer: 
you can take the address of a temporary value if you use a const reference:

```
FLOAT_FROM_WORD(w) (*(float*)&(const WORD &)(w))

```

but that won't work in c :(

(c doesn't have references right? works in visual c++)

as others have said, be it an inlined function or a temp in a define, the compiler will optimize it out.
It may not be possible in your exact situation, but upgrading to a C99 compiler would solve your problem too.

C99 has inline functions which, while acting like normal functions in parameters and return values, get improved efficiency in exactly this case with none of the drawbacks of macros.