------- Additional Comments From david at gibson dot dropbear dot id dot au 2005-07-28 12:37 ------- This is arguably a real functionality bug, not just a poor diagnostic.
The compiler will refuse to allow such a truncated address as an initializer, even when the assembler can generate the necessary relocations. For example compare attachment 9378, which will not compile (on powerpc64) to attachment 9379 which assembles and works as intended. In a more complex example, if x is a (64-bit) symbol and OFFSET a constant, the assembler will allow: y = x - OFFSET .long y Whereas the compiler will not allow the equivalent initalizer: uint32_t x = (uint32_t)((uint64_t)&y - OFFSET); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22020