This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/40790] plugin-api.h unconditionally includes stdint.h
- From: "ro at techfak dot uni-bielefeld dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Oct 2009 13:21:43 -0000
- Subject: [Bug lto/40790] plugin-api.h unconditionally includes stdint.h
- References: <bug-40790-279@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #13 from ro at techfak dot uni-bielefeld dot de 2009-10-09 13:21 -------
Subject: Re: plugin-api.h unconditionally includes stdint.h
> ------- Comment #11 from espindola at google dot com 2009-10-09 12:58 -------
> > Why all those contortions if there seems to be an easy way out: just use
> > the GCC_HEADER_STDINT macro from config/m4 and include the resulting (e.g.)
> > gstdint.h instead of stdint.h?
>
> Interesting. One problem is that this header is also used on gold. Maybe we
> could do
>
> #ifdef HAVE_STDINT_H
> #include <stdint.h>
> #elif HAVE_INTTYPES_H
> #include <inttypes.h>
> #else
> #include "gstdint.h"
> #endif
>
> That way gcc would build on anything thanks to GCC_HEADER_STDINT and gold would
> require something with stdint.h or inttypes.h.
Why the complications? Just use GCC_HEADER_STDINT in both gcc and gold and
be done with it. If the intention is for gold to support platforms beyond
GNU/Linux with ELF, it will run into the need sooner or later anyway.
Rainer
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40790