This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

a problem with weak and alias attributes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]