[Bug libstdc++/70722] include_next in cmath skips user-defined wrapper

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Apr 19 10:37:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70722

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
As discussed when I introduced #include_next into <cmath>, if Firefox wants to
play games redefining system headers (which is explicitly undefined behaviour
according to the C++ standard) then it is Firefox's problem to make it work,
not ours.

This is documented at https://gcc.gnu.org/gcc-6/porting_to.html

  Programs which provide their own wrappers for <stdlib.h> or other standard
  headers are operating outside the standard and so are responsible for
ensuring
  their headers work correctly with the headers in the C++ standard library.


More information about the Gcc-bugs mailing list