public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* a problem with weak and alias attributes
@ 2003-03-31  9:23 Ramana Radhakrishnan
  0 siblings, 0 replies; only message in thread
From: Ramana Radhakrishnan @ 2003-03-31  9:23 UTC (permalink / raw)
  To: gcc; +Cc: ramana.radhakrishnan, sampanna, saurabh.verma


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@cs.unipune.ernet.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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-31  7:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-31  9:23 a problem with weak and alias attributes Ramana Radhakrishnan

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).