c/7464: weak symbols alias definitions are broken in 3.1.1 (weak alias regression from 2.95)
Richard Henderson
rth@redhat.com
Fri Oct 25 11:26:00 GMT 2002
The following reply was made to PR c/7464; it has been noted by GNATS.
From: Richard Henderson <rth@redhat.com>
To: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
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 11:24:00 -0700
On Fri, Oct 25, 2002 at 09:08:25AM -0500, Wolfgang Bangerth wrote:
> This is one more regression from 2.95 with respect to weak and alias
> attributes:
> --------------------------------------------------
> extern int i __attribute__ ((alias ("__i")));
> extern int i __attribute__ ((weak, alias ("__i")));
> --------------------------------------------------
This test case is broken. Despite the use of "extern",
the use of "alias" means that this is a definition.
So having two of them violates the ODR, and is indeed an error.
r~
More information about the Gcc-prs
mailing list