Message ID | CAGWvnymfOJ2VB9OW6wZEpZ0y7wo0_t-_TL1g5pUbGpPCvyucEA@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Fri, Mar 23, 2012 at 11:47 AM, David Edelsohn <dje.gcc@gmail.com> wrote: > Some early releases of AIX 6 include a malloc.h header with an > incorrect use of "builtin" keyword: > > #ifdef __cplusplus > extern "C" { > extern "builtin" char *__alloca (size_t); > # define alloca __alloca > } > #endif /* def __cplusplus */ > > GCC is not too happy about this. clearly. > Okay for trunk, 4.7 and 4.6? OK for any open branch you care to apply it to.
Index: inclhack.def =================================================================== --- inclhack.def (revision 185739) +++ inclhack.def (working copy) @@ -370,6 +370,19 @@ }; /* + * malloc.h on AIX6 uses XLC++ specific builtin syntax + */ +fix = { + hackname = aix_malloc; + mach = "*-*-aix*"; + files = "malloc.h"; + select = "#ifdef __cplusplus"; + c_fix = format; + c_fix_arg = "#if (defined(__cplusplus) && defined(__IBMCPP__))"; + test_text = "#ifdef __cplusplus"; +}; + +/* * net/if_arp.h defines a variable fc_softc instead of adding a * typedef for the struct on AIX 5.2, 5.3, 6.1 and 7.1 */