rpms/gdb/FC-4 gdb-6.3-type-punning-20051219.patch, NONE, 1.1 gdb.spec, 1.165, 1.166
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Jan 16 16:25:44 UTC 2006
Author: aoliva
Update of /cvs/dist/rpms/gdb/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv5120
Modified Files:
gdb.spec
Added Files:
gdb-6.3-type-punning-20051219.patch
Log Message:
* Mon Jan 16 2006 Alexandre Oliva <aoliva at redhat.com> 6.3.0.0-1.97
- Bump up release number.
* Mon Dec 19 2005 Alexandre Oliva <aoliva at redhat.com> 6.3.0.0-1.94
- Fix type-punning warnings issued by GCC 4.1.
gdb-6.3-type-punning-20051219.patch:
gdb-6.3/gdb/c-exp.c | 4 ++--
gdb-6.3/gdb/c-exp.y | 4 ++--
gdb-6.3/gdb/jv-exp.c | 4 ++--
gdb-6.3/gdb/jv-exp.y | 4 ++--
gdb-6.3/gdb/objc-exp.c | 4 ++--
gdb-6.3/gdb/objc-exp.y | 4 ++--
gdb-6.3/gdb/p-exp.c | 4 ++--
gdb-6.3/gdb/p-exp.y | 4 ++--
gdb-6.3/gdb/tui/tui-data.c | 8 +++++++-
gdb-6.3/gdb/varobj.c | 4 ++--
gdb/ChangeLog | 0
11 files changed, 25 insertions(+), 19 deletions(-)
--- NEW FILE gdb-6.3-type-punning-20051219.patch ---
Index: gdb/ChangeLog
2005-12-19 Alexandre Oliva <aoliva at redhat.com>
* c-exp.y (parse_number): Silence type-punning warnings.
* jv-exp.y (parse_number): Likewise.
* objc-exp.y (parse_number): Likewise.
* p-exp.y (parse_number): Likewise.
* tui/tui-data.c (source_windows): Likewise.
* varobj.c (free_variable, varobj_refresh): Likewise.
* c-exp.c, jv-exp.c, objc-exp.c, p-exp.c: Rebuilt.
Index: gdb-6.3/gdb/c-exp.y
===================================================================
--- gdb-6.3.orig/gdb/c-exp.y 2005-12-19 14:48:56.000000000 -0200
+++ gdb-6.3/gdb/c-exp.y 2005-12-19 14:48:59.000000000 -0200
@@ -1076,9 +1076,9 @@
p[len] = 0; /* null-terminate the token */
if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- num = sscanf (p, "%g%c", (float *) &putithere->typed_val_float.dval,&c);
+ num = sscanf (p, "%g%c", (float *) (void *) &putithere->typed_val_float.dval,&c);
else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- num = sscanf (p, "%lg%c", (double *) &putithere->typed_val_float.dval,&c);
+ num = sscanf (p, "%lg%c", (double *) (void *) &putithere->typed_val_float.dval,&c);
else
{
#ifdef SCANF_HAS_LONG_DOUBLE
Index: gdb-6.3/gdb/jv-exp.y
===================================================================
--- gdb-6.3.orig/gdb/jv-exp.y 2005-12-19 14:48:56.000000000 -0200
+++ gdb-6.3/gdb/jv-exp.y 2005-12-19 14:48:59.000000000 -0200
@@ -713,9 +713,9 @@
p[len] = 0; /* null-terminate the token */
if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- num = sscanf (p, "%g%c", (float *) &putithere->typed_val_float.dval, &c);
+ num = sscanf (p, "%g%c", (float *) (void *) &putithere->typed_val_float.dval, &c);
else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- num = sscanf (p, "%lg%c", (double *) &putithere->typed_val_float.dval, &c);
+ num = sscanf (p, "%lg%c", (double *) (void *) &putithere->typed_val_float.dval, &c);
else
{
#ifdef SCANF_HAS_LONG_DOUBLE
Index: gdb-6.3/gdb/objc-exp.y
===================================================================
--- gdb-6.3.orig/gdb/objc-exp.y 2005-12-19 14:48:56.000000000 -0200
+++ gdb-6.3/gdb/objc-exp.y 2005-12-19 14:48:59.000000000 -0200
@@ -1026,9 +1026,9 @@
/* It's a float since it contains a point or an exponent. */
if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- sscanf (p, "%g", (float *)&putithere->typed_val_float.dval);
+ sscanf (p, "%g", (float *) (void *) &putithere->typed_val_float.dval);
else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- sscanf (p, "%lg", (double *)&putithere->typed_val_float.dval);
+ sscanf (p, "%lg", (double *) (void *) &putithere->typed_val_float.dval);
else
{
#ifdef PRINTF_HAS_LONG_DOUBLE
Index: gdb-6.3/gdb/p-exp.y
===================================================================
--- gdb-6.3.orig/gdb/p-exp.y 2005-12-19 14:48:57.000000000 -0200
+++ gdb-6.3/gdb/p-exp.y 2005-12-19 14:48:59.000000000 -0200
@@ -799,9 +799,9 @@
p[len] = 0; /* null-terminate the token */
if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- num = sscanf (p, "%g%c", (float *) &putithere->typed_val_float.dval,&c);
+ num = sscanf (p, "%g%c", (float *) (void *) &putithere->typed_val_float.dval,&c);
else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- num = sscanf (p, "%lg%c", (double *) &putithere->typed_val_float.dval,&c);
+ num = sscanf (p, "%lg%c", (double *) (void *) &putithere->typed_val_float.dval,&c);
else
{
#ifdef SCANF_HAS_LONG_DOUBLE
Index: gdb-6.3/gdb/tui/tui-data.c
===================================================================
--- gdb-6.3.orig/gdb/tui/tui-data.c 2005-12-19 14:48:57.000000000 -0200
+++ gdb-6.3/gdb/tui/tui-data.c 2005-12-19 14:48:59.000000000 -0200
@@ -44,7 +44,13 @@
static struct tui_gen_win_info _locator;
static struct tui_gen_win_info exec_info[2];
static struct tui_win_info * src_win_list[2];
-static struct tui_list source_windows = {(void **) src_win_list, 0};
+/* The intermediate cast to void* silences a type-punning warning
+ issued by GCC. The use appears to be safe, since we always access
+ source_windows.list with type void**, and whenever we access one of
+ the list members, we cast it to struct tui_win_info*. The
+ interface of struct tui_list should probably be redesigned with
+ less type opacity to avoid type punning. -aoliva */
+static struct tui_list source_windows = {(void **) (void *) src_win_list, 0};
static int default_tab_len = DEFAULT_TAB_LEN;
static struct tui_win_info * win_with_focus = (struct tui_win_info *) NULL;
static struct tui_layout_def layout_def =
Index: gdb-6.3/gdb/varobj.c
===================================================================
--- gdb-6.3.orig/gdb/varobj.c 2005-12-19 14:48:57.000000000 -0200
+++ gdb-6.3/gdb/varobj.c 2005-12-19 14:48:59.000000000 -0200
@@ -866,7 +866,7 @@
/* Get rid of the memory for the old expression. This also
leaves var->root->exp == NULL, which is ok for the parsing
below. */
- free_current_contents ((char **) &var->root->exp);
+ free_current_contents (&var->root->exp);
value_free (var->value);
var->type = NULL;
@@ -1410,7 +1410,7 @@
/* Free the expression if this is a root variable. */
if (var->root->rootvar == var)
{
- free_current_contents ((char **) &var->root->exp);
+ free_current_contents (&var->root->exp);
xfree (var->root);
}
Index: gdb-6.3/gdb/c-exp.c
===================================================================
--- gdb-6.3.orig/gdb/c-exp.c 2005-12-19 14:48:56.000000000 -0200
+++ gdb-6.3/gdb/c-exp.c 2005-12-19 14:48:59.000000000 -0200
@@ -2728,9 +2728,9 @@
p[len] = 0; /* null-terminate the token */
if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- num = sscanf (p, "%g%c", (float *) &putithere->typed_val_float.dval,&c);
+ num = sscanf (p, "%g%c", (float *) (void *) &putithere->typed_val_float.dval,&c);
else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- num = sscanf (p, "%lg%c", (double *) &putithere->typed_val_float.dval,&c);
+ num = sscanf (p, "%lg%c", (double *) (void *) &putithere->typed_val_float.dval,&c);
else
{
#ifdef SCANF_HAS_LONG_DOUBLE
Index: gdb-6.3/gdb/jv-exp.c
===================================================================
--- gdb-6.3.orig/gdb/jv-exp.c 2005-12-19 14:48:56.000000000 -0200
+++ gdb-6.3/gdb/jv-exp.c 2005-12-19 14:48:59.000000000 -0200
@@ -2100,9 +2100,9 @@
p[len] = 0; /* null-terminate the token */
if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- num = sscanf (p, "%g%c", (float *) &putithere->typed_val_float.dval, &c);
+ num = sscanf (p, "%g%c", (float *) (void *) &putithere->typed_val_float.dval, &c);
else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- num = sscanf (p, "%lg%c", (double *) &putithere->typed_val_float.dval, &c);
+ num = sscanf (p, "%lg%c", (double *) (void *) &putithere->typed_val_float.dval, &c);
else
{
#ifdef SCANF_HAS_LONG_DOUBLE
Index: gdb-6.3/gdb/objc-exp.c
===================================================================
--- gdb-6.3.orig/gdb/objc-exp.c 2005-12-19 14:48:56.000000000 -0200
+++ gdb-6.3/gdb/objc-exp.c 2005-12-19 14:48:59.000000000 -0200
@@ -2689,9 +2689,9 @@
/* It's a float since it contains a point or an exponent. */
if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- sscanf (p, "%g", (float *)&putithere->typed_val_float.dval);
+ sscanf (p, "%g", (float *) (void *) &putithere->typed_val_float.dval);
else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- sscanf (p, "%lg", (double *)&putithere->typed_val_float.dval);
+ sscanf (p, "%lg", (double *) (void *) &putithere->typed_val_float.dval);
else
{
#ifdef PRINTF_HAS_LONG_DOUBLE
Index: gdb-6.3/gdb/p-exp.c
===================================================================
--- gdb-6.3.orig/gdb/p-exp.c 2005-12-19 14:48:57.000000000 -0200
+++ gdb-6.3/gdb/p-exp.c 2005-12-19 14:48:59.000000000 -0200
@@ -2142,9 +2142,9 @@
p[len] = 0; /* null-terminate the token */
if (sizeof (putithere->typed_val_float.dval) <= sizeof (float))
- num = sscanf (p, "%g%c", (float *) &putithere->typed_val_float.dval,&c);
+ num = sscanf (p, "%g%c", (float *) (void *) &putithere->typed_val_float.dval,&c);
else if (sizeof (putithere->typed_val_float.dval) <= sizeof (double))
- num = sscanf (p, "%lg%c", (double *) &putithere->typed_val_float.dval,&c);
+ num = sscanf (p, "%lg%c", (double *) (void *) &putithere->typed_val_float.dval,&c);
else
{
#ifdef SCANF_HAS_LONG_DOUBLE
Index: gdb.spec
===================================================================
RCS file: /cvs/dist/rpms/gdb/FC-4/gdb.spec,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -r1.165 -r1.166
--- gdb.spec 1 Dec 2005 21:05:06 -0000 1.165
+++ gdb.spec 16 Jan 2006 16:25:41 -0000 1.166
@@ -11,7 +11,7 @@
Version: 6.3.0.0
# The release always contains a leading reserved number, start it at 0.
-Release: 1.92
+Release: 1.97
License: GPL
Group: Development/Debuggers
@@ -261,6 +261,10 @@
# Allow option to continue backtracing past a zero pc value
Patch170: gdb-6.3-bt-past-zero-20051201.patch
+# Silence type-punning warnings that cause compilation errors because
+# of -Werror.
+Patch171: gdb-6.3-type-punning-20051219.patch
+
%ifarch ia64
BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu libunwind >= 0.96-3
%else
@@ -363,6 +367,7 @@
%patch168 -p1
%patch169 -p1
%patch170 -p1
+%patch171 -p1
# Change the version that gets printed at GDB startup, so it is RedHat
# specific.
@@ -531,7 +536,16 @@
# don't include the files in include, they are part of binutils
%changelog
-* Thu Dec 01 2005 Jeff Johnston <jjohnstn at redhat.com> 6.3.0.0-1.92
+* Mon Jan 16 2006 Alexandre Oliva <aoliva at redhat.com> 6.3.0.0-1.97
+- Bump up release number.
+
+* Mon Dec 19 2005 Alexandre Oliva <aoliva at redhat.com> 6.3.0.0-1.94
+- Fix type-punning warnings issued by GCC 4.1.
+
+* Fri Dec 16 2005 Jesse Keating <jkeating at redhat.com>
+- rebuilt for new gcj
+
+* Thu Dec 01 2005 Jeff Johnston <jjohnstn at redhat.com> 6.3.0.0-1.93
- Bump up release number.
* Thu Dec 01 2005 Jeff Johnston <jjohnstn at redhat.com> 6.3.0.0-1.90
More information about the fedora-cvs-commits
mailing list