public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c/6799: #pragma weak no longer works<synopsis of the problem (one line)>
@ 2002-05-24 5:56 j.w.c.a. lokin
0 siblings, 0 replies; only message in thread
From: j.w.c.a. lokin @ 2002-05-24 5:56 UTC (permalink / raw)
To: gcc-gnats
>Number: 6799
>Category: c
>Synopsis: #pragma weak no longer works
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Fri May 24 05:56:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Jan Willem Lokin
>Release: 3.1
>Organization:
Thales Nederland BV
>Environment:
System: SunOS sunc1185 5.6 Generic_105181-16 sun4u sparc SUNW,Ultra-60
Architecture: sun4
host: sparc-sun-solaris2.6
build: sparc-sun-solaris2.6
target: sparc-sun-solaris2.6
configured with: ../configure --prefix=/home/db693/tstgnu
>Description:
Prior versions of gcc used to generate the appropriate weak
symbol `main' for the following code snippet:
>How-To-Repeat:
in a file weak.c:
static int spliced_main (int argc, char **argv)
{
return 1;
}
#pragma weak main = sp_spliced_main
int sp_spliced_main (int argc, char **argv)
{
return spliced_main (argc, argv);
}
EOF
compile with:
gcc weak.c -o weak
Undefined first referenced
symbol in file
main /home/db693/tstgnu/lib/gcc-lib/sparc-sun-solaris2.6/3.1/crt1.o
ld: fatal: Symbol referencing errors. No output written to weak
collect2: ld returned 1 exit status
>Fix:
Probably could use `weak' attribute?
(this email must mandatorily contain the word Unclassified)
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-05-24 12:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-24 5:56 c/6799: #pragma weak no longer works<synopsis of the problem (one line)> j.w.c.a. lokin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).