public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/44279]  New: system.h calloc/malloc/realloc VMS size_t vs. __size_t
@ 2010-05-26  4:41 jay dot krell at cornell dot edu
  0 siblings, 0 replies; only message in thread
From: jay dot krell at cornell dot edu @ 2010-05-26  4:41 UTC (permalink / raw)
  To: gcc-bugs

VMS has:
    typedef long unsigned int size_t;
    typedef unsigned int __size_t;
    void * calloc (__size_t __nmemb, __size_t __size);
    void * malloc (__size_t __size);
    void * realloc (__void_ptr64 __ptr, __size_t __size);

possibly this is something for fixincludes to deal with.

As a result, gcc/system.h gets warnings/errors here, due to varying
declarations of malloc/calloc/realloc (size_t vs. __size_t, unsigned vs.
unsigned long):

#if defined (HAVE_DECL_MALLOC) && !HAVE_DECL_MALLOC
extern void *malloc (size_t);
#endif

#if defined (HAVE_DECL_CALLOC) && !HAVE_DECL_CALLOC
extern void *calloc (size_t, size_t);
#endif

#if defined (HAVE_DECL_REALLOC) && !HAVE_DECL_REALLOC
extern void *realloc (void *, size_t);
#endif


I changed mine to:

#if defined (HAVE_DECL_MALLOC) && !HAVE_DECL_MALLOC && !defined(__vms)
extern void *malloc (size_t);
#endif

#if defined (HAVE_DECL_CALLOC) && !HAVE_DECL_CALLOC && !defined(__vms)
extern void *calloc (size_t, size_t);
#endif

#if defined (HAVE_DECL_REALLOC) && !HAVE_DECL_REALLOC && !defined(__vms)
extern void *realloc (void *, size_t);
#endif


perhaps not the best fix.


-- 
           Summary: system.h calloc/malloc/realloc VMS size_t vs. __size_t
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jay dot krell at cornell dot edu
GCC target triplet: alpha-dec-vms


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44279


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-26  4:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-26  4:41 [Bug c/44279] New: system.h calloc/malloc/realloc VMS size_t vs. __size_t jay dot krell at cornell dot edu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).