This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
a problem with weak and alias attributes
- From: "Ramana Radhakrishnan" <vr_ramana at lycos dot com>
- To: gcc at gnu dot org
- Cc: ramana dot radhakrishnan at codito dot com, sampanna at codito dot com, saurabh dot verma at codito dot com
- Date: Mon, 31 Mar 2003 12:20:39 +0500
- Subject: a problem with weak and alias attributes
- Organization: Lycos Mail (http://www.mail.lycos.com:80)
- Reply-to: vr_ramana at lycos dot com
hi,
This is with respect to a problem i am facing with gcc 3.2 3.2 build 20020903.
extern int getcx(int);
/* IMPLEMENTATION */
int __getcx(int i) {return 1;}
int getcx(int)
__attribute__((weak))
__attribute__((alias("__getcx")));
If i try to compile this using gcc for i386 on RH Linux 8.0 it seems
to work properly since from the object file i check the value of
the symbol getcx which is exactly the same as the function __getcx.
However if I compile this using g++ (the same build ) , I get an error stating
int getcx(int) defined both normally and as an int. which is strange.
I wanted to know if there exists any patch for the same.
TIA
regards
Ramana
---
Ramana Radhakrishnan
Department of Computer Science
University Of Pune
GaneshKhind
Pune-411007
can reach me at
u99127 at cs dot unipune dot ernet dot in
_____________________________________________________________
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus