GCC's <assert.h> and C99

Zack Weinberg zack@rabi.columbia.edu
Thu Sep 21 19:17:00 GMT 2000


You were told, months ago, that the proper way to fix the __eprintf problem
- yes, we accept that it is a problem - is to submit a two line patch for
the target Makefile fragment for the systems you care about (e.g. t-svr4):

+# Use the system <assert.h>.
+INSTALL_ASSERT_H =

Alternatively, you could write a clever autoconf test which determines if
the target has a C89 compliant <assert.h> and disables installation of our
header if it does.  That would fix the problem for everyone, but would be
substantially harder.

Why have you not done either of these things?

...
As to the issue of C99 requiring the appearance of the function name in the
string printed by a failed assertion - I submit that this is a library issue
and we should not worry about it.  Note that assert.h is not required to be
provided by a freestanding implementation of C in either C89 or C99.  (And
that argues that we should not provide it on any system, even if it's
pre-C89...)

zw


More information about the Gcc mailing list