Subject: bug#7366: incompatible implicit declaration of built-in function 'alloca'

From: "Dr. David Kirkby" <[email-masked]>
Date: Wed, 10 Nov 2010 15:40:35 +0000

When building on Solaris 10 SPARC, I see several messages like this:

/rootpool2/local/kirkby/emacs-23.2/lib-src/emacsclient.c:1290:17: warning: 
incompatible implicit declaration of built-in function 'alloca'

Note the man page for Solaris says its defined in <alloca.h>

Here's part of the man page

kirkby@t2:64 ~$ man alloca

Standard C Library Functions                           malloc(3C)

NAME
      malloc, calloc, free, memalign, realloc,  valloc,  alloca  -
      memory allocator

SYNOPSIS
      #include <stdlib.h>

      void *malloc(size_t size);

      void *calloc(size_t nelem, size_t elsize);

      void free(void *ptr);

      void *memalign(size_t alignment, size_t size);

      void *realloc(void *ptr, size_t size);

      void *valloc(size_t size);

      #include <alloca.h>

      void *alloca(size_t size);

DESCRIPTION
      The  malloc()  and  free()  functions  provide   a   simple,
      general-purpose  memory  allocation  package.  The  malloc()
      function returns a pointer to a block of at least size bytes
      suitably  aligned for any use. If the space assigned by mal-
      loc() is overrun, the results are undefined.

Dave