This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
GCC's <assert.h> and C99
- To: gcc at gcc dot gnu dot org
- Subject: GCC's <assert.h> and C99
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Sat, 16 Sep 2000 10:19:24 +0100 (BST)
- cc: martin at xemacs dot org
C99 requires assertion failure messages from <assert.h> to include the
name of the current function as well as the file name and line number.
GCC's <assert.h> doesn't do this. Would it be appropriate to fix this by
adding a new __eprintf2 function that takes this information and adjusting
assert.h accordingly? Or, it was suggested by Martin Buchholz
<martin@xemacs.org> that GCC should be using a SysV ABI function __assert
instead of __eprintf, but this function does not allow for inclusion of
the function name, so given C99 it would seem a bad idea to move to
__assert now. Is there a corresponding replacement for __assert in the
ABI which does support C99? If so, it would be appropriate to use that.
--
Joseph S. Myers
jsm28@cam.ac.uk