* [python] [commit] Fix compilation warning.
@ 2010-01-14 1:24 Jan Kratochvil
0 siblings, 0 replies; only message in thread
From: Jan Kratochvil @ 2010-01-14 1:24 UTC (permalink / raw)
To: archer
commit 7a55ecda83dff08a0f371947c5f9515184c02d8d
Author: Jan Kratochvil <jkratoch@host1.dyn.jankratochvil.net>
Date: Thu Jan 14 02:17:52 2010 +0100
gcc-4.4.2-20.fc12.x86_64 started to error out on:
gdbtypes.c: In function ‘delete_main_type’:
gdbtypes.c:3149: error: the address of ‘cplus_struct_default’ will always evaluate as ‘true’
It would be possible to fix it by:
- gdb_assert (!HAVE_CPLUS_STRUCT (type) || !TYPE_CPLUS_SPECIFIC (type));
+ gdb_assert (!HAVE_CPLUS_STRUCT (type) || TYPE_CPLUS_SPECIFIC (type) == NULL);
But at the same due since the introduction of TYPE_SPECIFIC_CPLUS_STUFF by
Re: [RFA/DWARF] Add DW_AT_GNAT_descriptive_type support
http://sourceware.org/ml/gdb-patches/2010-01/msg00243.html
TYPE_CPLUS_SPECIFIC can no longer ever be NULL and therefore this conditional
can be removed.
Another point is that there should be now rather:
gdb_assert (TYPE_SPECIFIC_FIELD (type) == TYPE_SPECIFIC_NONE)
as none of the extensions is supported but this garbage collecting code is
currently not in use anyway.
No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu.
* gdbtypes.c (delete_main_type): Remove !TYPE_CPLUS_SPECIFIC assertion.
---
gdb/gdbtypes.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 92a8980..2689ad3 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -3144,9 +3144,7 @@ delete_main_type (struct type *type, htab_t deleted_types)
}
xfree (TYPE_FIELDS (type));
- /* Strangely, HAVE_CPLUS_STRUCT will return true when there isn't
- one at all. */
- gdb_assert (!HAVE_CPLUS_STRUCT (type) || !TYPE_CPLUS_SPECIFIC (type));
+ gdb_assert (!HAVE_CPLUS_STRUCT (type));
xfree (TYPE_MAIN_TYPE (type));
}
--
1.6.5.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-14 1:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-14 1:24 [python] [commit] Fix compilation warning Jan Kratochvil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).