This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/11669] [3.4 regression] Calling of static functions does not work (build of glibc broken)
- From: "pinskia at physics dot uc dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jul 2003 14:50:10 -0000
- Subject: [Bug other/11669] [3.4 regression] Calling of static functions does not work (build of glibc broken)
- References: <20030725091122.11669.aj@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11669
pinskia at physics dot uc dot edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-25 14:50 -------
But you should never assume the name of static variable then so the code is still wrong.
The way to fix it is to use asm to make sure the name will be the same as the asm name.
#if USE_DECLARATION
/* Removing the prototype makes this work. */
static int fixup (int i)__asm__("fixup") __attribute__ ((used));
#endif
static int __attribute__ ((__used__))
fixup (int i)
{
return i+1;
}
int
call_fixup (void)
{
asm ("call fixup\n\t");
return 0;
}