This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Bad macros in gcc
- To: "H . J . Lu" <hjl at lucon dot org>
- Subject: Re: Bad macros in gcc
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 12 Jul 2001 18:27:05 -0300
- Cc: gcc at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <20010711153325.A18044@lucon.org>
On Jul 11, 2001, "H . J . Lu" <hjl@lucon.org> wrote:
> gcc will build, but you will get random runtime errors. In glibc, we
> always do
> int __s;
> for (__s, ....) \
> Shouldn't gcc do something like that or turn FOO into a function?
No. glibc can use __s because __s is in the implementation
namespace. GCC code isn't, and using such names in user-level code is
bound to run into random macros defined by the library implementors.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me