This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, fixincludes] Fix PR 48009 53348
- From: Bruce Korb <bkorb at gnu dot org>
- To: David Edelsohn <dje dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 15 Feb 2015 13:52:34 -0800
- Subject: Re: [PATCH, fixincludes] Fix PR 48009 53348
- Authentication-results: sourceware.org; auth=none
- References: <CAGWvnynpG4AepA+GH-E4Hr9g0keSz2PPfwP9yf4o+cAjN-K47g at mail dot gmail dot com>
Looks good to me.
On Sun, Feb 15, 2015 at 12:49 PM, David Edelsohn <dje.gcc@gmail.com> wrote:
> The stdlib.h header in AIX 4.3 does not correctly declare strtof with
> a const char* argument. Users are building the latest releases of GCC
> on AIX 4.3 The appended patch from Richard G Daniel uses fixincludes
> to correct the declaration.
>
> Okay?
>
> Thanks, David
>
> PR bootstrap/48009
> PR bootstrap/53348
> * inclhack.def (aix_strtof_const): New fix.
> * fixincl.x: Regenerate.
> * tests/base/inttypes.h: New test.
>
> Index: inclhack.def
> ===================================================================
> --- inclhack.def (revision 220717)
> +++ inclhack.def (working copy)
> @@ -842,6 +842,18 @@
> };
>
> /*
> + * stdlib.h on AIX 4.3 declares strtof() with a non-const first argument.
> + */
> +fix = {
> + hackname = aix_strtof_const;
> + files = stdlib.h;
> + select = "((extern[ \t]+)?float[ \t]+strtof)\\(char \\*, char \\*\\*\\);
> ";
> + c_fix = format;
> + c_fix_arg = "%1(const char *, char **);";
> + test_text = "extern float strtof(char *, char **);";
> +};
> +
> +/*
> * sys/machine.h on AIX 4.3.3 puts whitespace between a \ and a newline
> * in an otherwise harmless (and #ifed out) macro definition
> */