This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch: gcc/unwind-dw2{-fde,}.c: Warning removal. -- Take 2
- From: rbrown64 at csc dot com dot au
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 7 Nov 2002 15:14:33 +1100
- Subject: Re: Patch: gcc/unwind-dw2{-fde,}.c: Warning removal. -- Take 2
Remove the following warnings from the 1104 snapshot on
powerpc-apple-darwin6.0 .
1104/gcc/unwind-dw2.c: In function `extract_cie_info':
1104/gcc/unwind-dw2.c:228: warning: implicit declaration of function `strlen'
1104/gcc/unwind-dw2.c: In function `uw_frame_state_for':
1104/gcc/unwind-dw2.c:906: warning: implicit declaration of function `memset'
1104/gcc/unwind-dw2.c: In function `uw_install_context_1':
1104/gcc/unwind-dw2.c:1193: warning: implicit declaration of function `memcpy'
1104/gcc/unwind-dw2-fde.c: In function `get_cie_encoding':
1104/gcc/unwind-dw2-fde.c:271: warning: implicit declaration of function `strlen'
Bootstrapped on powerpc-apple-darwin6.0 with the following regression which
I think
is a dejagnu artefact.
-/devel/src/gcc-20021104/gcc/testsuite/gcc.dg/noncompile/init-1.c:16: warning: excess elements in struct initializer
-/devel/src/gcc-20021104/gcc/testsuite/gcc.dg/noncompile/init-1.c:16: warning: (near initialization for `a_b')
-
+/deve
PASS: gcc.dg/noncompile/init-1.c (test for errors, line 12)
PASS: gcc.dg/noncompile/init-1.c (test for errors, line 13)
PASS: gcc.dg/noncompile/init-1.c (test for errors, line 14)
PASS: gcc.dg/noncompile/init-1.c (test for errors, line 15)
PASS: gcc.dg/noncompile/init-1.c (test for errors, line 16)
-PASS: gcc.dg/noncompile/init-1.c (test for excess errors)
+FAIL: gcc.dg/noncompile/init-1.c (test for excess errors)
+Excess errors:
+/deve
2002-11-07 Kaveh Ghazi, Rodney Brown <rbrown64@csc.com.au>
* config.gcc (*-*-darwin*): Add xm_defines=POSIX.
--- config.gcc.orig Tue Oct 29 04:20:35 2002
+++ config.gcc Thu Nov 7 10:54:33 2002
@@ -983,6 +983,7 @@ i370-*-linux*)
elf=yes
;;
i[34567]86-*-darwin*)
+ xm_defines=POSIX
tm_file="${tm_file} darwin.h i386/darwin.h"
tm_p_file="${tm_p_file} darwin-protos.h"
tmake_file=i386/t-darwin
@@ -1954,6 +1955,7 @@ powerpc-*-beos*)
extra_headers=
;;
powerpc-*-darwin*)
+ xm_defines=POSIX
tm_file="${tm_file} darwin.h rs6000/darwin.h"
tm_p_file="${tm_p_file} darwin-protos.h"
tmake_file=rs6000/t-darwin
"Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> on 07/11/2002 01:36:52
To: rbrown64@csc.com.au
cc: gcc-patches@gcc.gnu.org
Subject: Re: Patch: gcc/unwind-dw2{-fde,}.c: Warning removal.
> 2002-11-06 Rodney Brown <rbrown64@csc.com.au>
>
> * unwind-dw2-fde.c: Include string.h.
> * unwind-dw2.c: Include string.h.
>
> --- unwind-dw2-fde.c.orig Sat Jun 1 08:15:39 2002
> +++ unwind-dw2-fde.c Wed Nov 6 17:54:15 2002
> @@ -37,6 +37,9 @@ Software Foundation, 59 Temple Place - S
> #include "unwind-pe.h"
> #include "unwind-dw2-fde.h"
> #include "gthr.h"
> +#ifndef inhibit_libc
> +#include <string.h>
> +#endif
> #endif
I believe this is the wrong approach. Instead try setting
xm_defines=POSIX in the x86 & ppc darwin entries in config.gcc.
(That's how every other port fixes this issue.)
This will trigger an include of string.h in tsystem.h. All target
files (should) include tsystem.h. I checked and unwind-dw2*.c do, so
it should work.
Thanks,
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu