[Bug other/46803] libstdc++ build errors on invalid OpenBSD system header attributes
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Dec 5 11:43:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46803
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |*-openbsd*
Status|UNCONFIRMED |NEW
Last reconfirmed|2010-12-04 21:08:59 |2010.12.05 11:43:03
Component|libstdc++ |other
Summary|libstdc++ build errors on |libstdc++ build errors on
|unknown attributes |invalid OpenBSD system
| |header attributes
Ever Confirmed|0 |1
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-12-05 11:43:03 UTC ---
Seems to be from for example
size_t strftime(char *, size_t, const char *, const struct tm *)
__attribute__ ((__bounded__(__string__,1,2)));
the attribute is __bounded__ which is ignored, but arguments are regularly
parsed, so __string__ has to be available. I think this is a bug in
openbsd which doesn't conform to the function declaration attribute syntax.
A more proper way would have been to implement it as
__bounded__("__string__",1,2).
This can be fixed by fixincluding, I see that a fixincluded variant is
already used:
/home/jsg/src/obj/./gcc/include-fixed/time.h
but the above issue is not fixed. See fixinclude/inclhack.def.
Thus, it's not really a GCC/libstdc++ bug but a OpenBSD one. One that
can be worked around by means of fixincludes.
The OpenBSD port doesn't have a GCC maintainer listed though, so do not
hold your breath (but instead a patch for inclhack.def is welcome, please
send it to gcc-patches@gcc.gnu.org). Also please report this bug
upstream to OpenBSD - they shouldn't invent incompatible GCC extensions.
More information about the Gcc-bugs
mailing list