http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57691
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Paolo Carlini from comment #4) > ... by the way, I'm *very* surprised that nobody noticed this over the > years: the freestanding atexit is declared like this in <cstdlib> in 4.0.0!?! It only matters on some less-well-tested targets, because NO_IMPLICIT_EXTERN_C is defined for sane targets. It might also not matter if the system headers declare: int atexit(void (*)(void)); as GNU Libc does, because then the function is declared portably for both C and C++. Presumably the eCos headers either don't declare atexit or declare it without an abominable (void) parameter list.