* [COMMIT] Avoid compiler warnings in gnu-v3-abi.c
@ 2005-05-12 15:33 Eli Zaretskii
2005-05-12 15:42 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2005-05-12 15:33 UTC (permalink / raw)
To: gdb-patches
Without this patch, GCC whines about assignment from incompatible
pointer type. Admittedly, such coding practice is not very clean,
but...
Committed as obvious.
2005-05-12 Eli Zaretskii <eliz@gnu.org>
* gnu-v3-abi.c (init_gnuv3_ops): Cast is_gnu_v3_mangled_dtor and
is_gnu_v3_mangled_ctor to avoid compiler warnings.
Index: gdb/gnu-v3-abi.c
===================================================================
RCS file: /cvs/src/src/gdb/gnu-v3-abi.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- gdb/gnu-v3-abi.c 19 Mar 2005 19:44:10 -0000 1.27
+++ gdb/gnu-v3-abi.c 12 May 2005 15:28:31 -0000 1.28
@@ -424,8 +424,10 @@
gnu_v3_abi_ops.shortname = "gnu-v3";
gnu_v3_abi_ops.longname = "GNU G++ Version 3 ABI";
gnu_v3_abi_ops.doc = "G++ Version 3 ABI";
- gnu_v3_abi_ops.is_destructor_name = is_gnu_v3_mangled_dtor;
- gnu_v3_abi_ops.is_constructor_name = is_gnu_v3_mangled_ctor;
+ gnu_v3_abi_ops.is_destructor_name =
+ (enum dtor_kinds (*) (const char *))is_gnu_v3_mangled_dtor;
+ gnu_v3_abi_ops.is_constructor_name =
+ (enum ctor_kinds (*) (const char *))is_gnu_v3_mangled_ctor;
gnu_v3_abi_ops.is_vtable_name = gnuv3_is_vtable_name;
gnu_v3_abi_ops.is_operator_name = gnuv3_is_operator_name;
gnu_v3_abi_ops.rtti_type = gnuv3_rtti_type;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [COMMIT] Avoid compiler warnings in gnu-v3-abi.c
2005-05-12 15:33 [COMMIT] Avoid compiler warnings in gnu-v3-abi.c Eli Zaretskii
@ 2005-05-12 15:42 ` Daniel Jacobowitz
2005-05-12 20:50 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2005-05-12 15:42 UTC (permalink / raw)
To: gdb-patches
On Thu, May 12, 2005 at 06:29:15PM +0300, Eli Zaretskii wrote:
> Without this patch, GCC whines about assignment from incompatible
> pointer type. Admittedly, such coding practice is not very clean,
> but...
>
> Committed as obvious.
>
> 2005-05-12 Eli Zaretskii <eliz@gnu.org>
>
> * gnu-v3-abi.c (init_gnuv3_ops): Cast is_gnu_v3_mangled_dtor and
> is_gnu_v3_mangled_ctor to avoid compiler warnings.
What compiler version produced this warning? GCC 3.3 and 3.4 don't,
AFAICT; maybe it's new in 4.0.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [COMMIT] Avoid compiler warnings in gnu-v3-abi.c
2005-05-12 15:42 ` Daniel Jacobowitz
@ 2005-05-12 20:50 ` Eli Zaretskii
2005-05-12 20:51 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2005-05-12 20:50 UTC (permalink / raw)
To: gdb-patches
> Date: Thu, 12 May 2005 11:33:41 -0400
> From: Daniel Jacobowitz <drow@false.org>
>
> What compiler version produced this warning? GCC 3.3 and 3.4 don't,
> AFAICT; maybe it's new in 4.0.
I used GCC 3.4.3. Perhaps it's a matter of what warning options are
turned on? The ones I used are in the current CVS's djconfig.sh.
Are you saying that this is a GCC bug? I don't think so, since the
code is clearly unclean: it mixes two different enums. GCC is right
warning about that.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [COMMIT] Avoid compiler warnings in gnu-v3-abi.c
2005-05-12 20:50 ` Eli Zaretskii
@ 2005-05-12 20:51 ` Daniel Jacobowitz
2005-05-12 20:55 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2005-05-12 20:51 UTC (permalink / raw)
To: gdb-patches, gdb-patches
On Thu, May 12, 2005 at 11:45:01PM +0300, Eli Zaretskii wrote:
> > Date: Thu, 12 May 2005 11:33:41 -0400
> > From: Daniel Jacobowitz <drow@false.org>
> >
> > What compiler version produced this warning? GCC 3.3 and 3.4 don't,
> > AFAICT; maybe it's new in 4.0.
>
> I used GCC 3.4.3. Perhaps it's a matter of what warning options are
> turned on? The ones I used are in the current CVS's djconfig.sh.
>
> Are you saying that this is a GCC bug? I don't think so, since the
> code is clearly unclean: it mixes two different enums. GCC is right
> warning about that.
Yes, the patch is definitely right. I hadn't thought that GCC 3.4.3
generated the warning, but I only checked 3.3.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [COMMIT] Avoid compiler warnings in gnu-v3-abi.c
2005-05-12 20:51 ` Daniel Jacobowitz
@ 2005-05-12 20:55 ` Daniel Jacobowitz
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2005-05-12 20:55 UTC (permalink / raw)
To: gdb-patches, gdb-patches
On Thu, May 12, 2005 at 11:45:01PM +0300, Eli Zaretskii wrote:
> > Date: Thu, 12 May 2005 11:33:41 -0400
> > From: Daniel Jacobowitz <drow@false.org>
> >
> > What compiler version produced this warning? GCC 3.3 and 3.4 don't,
> > AFAICT; maybe it's new in 4.0.
>
> I used GCC 3.4.3. Perhaps it's a matter of what warning options are
> turned on? The ones I used are in the current CVS's djconfig.sh.
>
> Are you saying that this is a GCC bug? I don't think so, since the
> code is clearly unclean: it mixes two different enums. GCC is right
> warning about that.
Yes, the patch is definitely right. I hadn't thought that GCC 3.4.3
generated the warning, but I only checked 3.3.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-05-12 20:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-12 15:33 [COMMIT] Avoid compiler warnings in gnu-v3-abi.c Eli Zaretskii
2005-05-12 15:42 ` Daniel Jacobowitz
2005-05-12 20:50 ` Eli Zaretskii
2005-05-12 20:51 ` Daniel Jacobowitz
2005-05-12 20:55 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox