https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83100

--- Comment #7 from James Clarke <jrtc27 at jrtc27 dot com> ---
(In reply to Jakub Jelinek from comment #4)
> That change looks wrong to me.
> Previously the variable was common and thus if you e.g. mixed it with some
> other TU that has const int a = 5; then you could link the two together and
> the value of the variable would be 5.  But with the changes, that is no
> longer the case (if it doesn't ICE), the variable is put into .rodata
> section.

Yes, and in fact I saw this behaviour and got pointed at that commit about a
week ago, as I was seeing duplicate symbol errors when linking another piece of
software. As it happens, the declaration in the header in that case should have
been extern, but the change in GCC's behaviour still made me uneasy.

Reply via email to