This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Don't allow weak variables in COMMON
- From: "David S. Miller" <davem at redhat dot com>
- To: mark at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 24 May 2002 00:23:35 -0700 (PDT)
- Subject: Re: PATCH: Don't allow weak variables in COMMON
- References: <200205231805.g4NI5dH29591@gandalf.codesourcery.com>
From: Mark Mitchell <mark@codesourcery.com>
Date: Thu, 23 May 2002 11:05:39 -0700
If you tried something like:
__attribute__((weak) int i;
you got an assembler error telling you that you can't have weak
symbols in common.
What about similar situations using __attribute__(section("foo"))?
Should we un-common the thing in those cases too?
I personally think it is a bug to mark something implicitly BSS then
tell the compiler "oh sorry, I didn't want it to be BSS actually".
Just un-BSS it by initializing it to zero if that is what you want.