This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, fixincludes] Fix PR 48009 53348
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Bruce Korb <bkorb at gnu dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 15 Feb 2015 15:49:02 -0500
- Subject: [PATCH, fixincludes] Fix PR 48009 53348
- Authentication-results: sourceware.org; auth=none
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
*/