[vox-tech] is this a glibc bug?

Dave Peticolas vox-tech@lists.lugod.org
09 Jan 2003 14:36:28 -0800


--=-06GmyOO7WGMHssQru55K
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Thu, 2003-01-09 at 14:17, Peter Jay Salzman wrote:
> hola,
>=20
>=20
> #include <stdio.h>
> #include <math.h>
>=20
> int main(void)
> {
>    int y1 =3D 9;
>    printf("%d\n", y1);
>    return 0;
> }
>=20
> p@satan% gcc -Wshadow blah.c  -lm
> blah.c: In function `main':
> blah.c:6: warning: declaration of `y1' shadows global declaration
>=20
>=20
> the problem is that there's a global variable named "y1" in
> /usr/include/bits/mathcalls.h which gets included by math.h.
>=20
> so GNU glibc has ruined the variable name "y1".
>=20
> would this be considered a glibc bug?   if they're going to ruin a
> variable name, they should at least document it like errno, _ and __
> type variables.

Although its a rather poor choice for a name, it's not a bug
strictly speaking, since it's declared publicly. Also, I believe
it's actually a function -- see 'man y1'.

dave


--=-06GmyOO7WGMHssQru55K
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQA+Hfls5effKKCmfpIRAsznAJ9lCG/RT0zLsurNHnQWT439oQxT2gCfXylM
PcJQMeCBwfgd96wZ45vF6Ow=
=TGGn
-----END PGP SIGNATURE-----

--=-06GmyOO7WGMHssQru55K--