[warning control patch] simple cases

Gabriel Dos Reis gdr@integrable-solutions.net
Thu May 19 03:24:00 GMT 2005


DJ Delorie <dj@redhat.com> writes:

| > and proper extern "C" declarations.
| 
| Are these cases where we should be using more autoconf tests and
| conditional inclusions?

Yes.  These are:
  (1) getenv() -- getopt.c
  (2) malloc(), calloc(), realloc(), sbrk() -- xmalloc.c

The extern global variables should alos be put in extern C" block --
even though typical C++ compilers do nto mangle global variable names.

| We should be using more of the HAVE_DECL_* tests for internal use for
| those types of things, me thinks.

Yes, absolutely.

-- Gaby



More information about the Gcc-patches mailing list