c/7464: weak symbols alias definitions are broken in 3.1.1 (weak alias regression from 2.95)

Wolfgang Bangerth bangerth@ticam.utexas.edu
Fri Oct 25 07:46:00 GMT 2002


The following reply was made to PR c/7464; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: Andreas Jaeger <aj@suse.de>
Cc: gcc@gcc.gnu.org, <gcc-gnats@gcc.gnu.org>
Subject: Re: c/7464: weak symbols alias definitions are broken in 3.1.1 (weak
 alias regression from 2.95)
Date: Fri, 25 Oct 2002 09:39:13 -0500 (CDT)

 > > --------------------------------------------------
 > > extern int i __attribute__ ((alias ("__i")));
 > > extern int i __attribute__ ((weak, alias ("__i")));
 > > --------------------------------------------------
 > >
 > > The messages I get are:
 > > from C:
 > >     x.c:2: error: weak declaration of `i' must precede definition
 > > from C++:
 > >     x.cc:2: error: redefinition of `int i'
 > >     x.cc:1: error: `int i' previously declared here
 > 
 > But that doesn't make it right here.  The warning is correct.
 
 OK, then we should close the report, right?
 
 Regards
   Wolfgang
 
 PS: I still find the messages confusing -- both C and C++ talk about 
 "definitions", but there are none in this case...
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth              email:           bangerth@ticam.utexas.edu
                                www: http://www.ticam.utexas.edu/~bangerth
 
 



More information about the Gcc-prs mailing list