[Bug libstdc++/78483] Error: reference to 'on_exit' is ambiguous

2024-07-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78483 --- Comment #7 from Andrew Pinski --- (In reply to Jonathan Wakely from comment #6) > I don't know the origin of this function, it doesn't seem to be in BSD or > SVR4. https://man7.org/linux/man-pages/man3/on_exit.3.html mentions SunOS 4 (but re

[Bug libstdc++/78483] Error: reference to 'on_exit' is ambiguous

2024-07-26 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78483 --- Comment #6 from Jonathan Wakely --- FWIW Glibc defines this with _DEFAULT_SOURCE and _GNU_SOURCE: #ifdef __USE_MISC /* Register a function to be called with the status given to `exit' and the given argument. */ extern int on_exit (void

[Bug libstdc++/78483] Error: reference to 'on_exit' is ambiguous

2016-11-23 Thread krzysztof at jusiak dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78483 --- Comment #5 from Kris --- Fair do's. But then, IMHO, 'on_exit' shouldn't pollute the global namespace either. Hence, it should be prefixed with '__'?

[Bug libstdc++/78483] Error: reference to 'on_exit' is ambiguous

2016-11-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78483 --- Comment #4 from Jonathan Wakely --- Right, on_exit is not part of the C++ standard, so it's correct that it is not in namespace std.

[Bug libstdc++/78483] Error: reference to 'on_exit' is ambiguous

2016-11-22 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78483 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug libstdc++/78483] Error: reference to 'on_exit' is ambiguous

2016-11-22 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78483 --- Comment #2 from Andrew Pinski --- Also on_exit is not part of the C++ standard at all.

[Bug libstdc++/78483] Error: reference to 'on_exit' is ambiguous

2016-11-22 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78483 --- Comment #1 from Andrew Pinski --- This is most likely because _GNU_SOURCE is defined when compiling with C++ code in GNU C++ mode.