On 8/2/2010 1:53 PM, Ralf Wildenhues wrote:
> This should be fixed:
>
> | ++ make all
> | stderr:
> | lib2.c: In function 'g':
> | lib2.c:6:13: warning: initialization makes pointer from integer without a
> cast
> | stdout:
This addendum appears to do it (Tested on cygwin->mingw cross. Note that
this implementation assumes for PE/COFF that auto-import support is
present. This is safe since 2000. No PE/COFF support for runtime
pseudo-relocs is necessary in these examples. This is just a
long-winded way of saying we don't need to do the Dance Of The Declspecs.)
Paolo?
--
Chuck
diff --git a/tests/sysroot.at b/tests/sysroot.at
index be9fa58..0d98990 100644
--- a/tests/sysroot.at
+++ b/tests/sysroot.at
@@ -128,6 +128,7 @@ AT_DATA([lib2/lib2.c],
[[#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+extern char *f(const char *s);
char *g(const char *s)
{
char *q = f(s);
@@ -167,6 +168,7 @@ AT_DATA([prog/prog.c],
[[#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+extern char *g(const char *s);
int main()
{
char *q = g("hello world");