But.. you don't need that union or to use a pointer to use the 12 bits ADC from PIC18x:
Make sure ADCCON0.FM bit is set.Code:uint32_t value = (ADCRESH << 8) | ADCRESL; double flt = (double)value / ((1 << 12) - 1);
(Assuming 'double' has 53 bits of precision here).