Discussion:
[Bug c/60974] New: bfdio.c:580:30: error: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
atvreddy97 at gmail dot com
2014-04-26 08:51:31 UTC
Permalink
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60974

Bug ID: 60974
Summary: bfdio.c:580:30: error: argument to ‘sizeof’ in
‘memset’ call is the same expression as the
destination; did you mean to dereference it?
[-Werror=sizeof-pointer-memaccess]
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: atvreddy97 at gmail dot com

hi sir...
i tried with new version of gcc 4.8.2. i solved the previous problem[bug
60961].

when i am compiling gdb-7.3.1, i got following error.please help......!

make[4]: Entering directory '/home/ADMIN/cortex_m4/gdb-7.3.1/bfd'
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.
-I./../include -DHAVE_bfd_elf32_littlearm_vec -DHAVE_bfd_elf32_bigarm_vec
-DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec
-DBINDIR='"/home/ADMIN/cortex_m4/bin"' -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wshadow -Werror -g -O2 -MT bfdio.lo -MD -MP -MF
.deps/bfdio.Tpo -c -o bfdio.lo bfdio.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I. -I. -I./../include
-DHAVE_bfd_elf32_littlearm_vec -DHAVE_bfd_elf32_bigarm_vec
-DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec
-DBINDIR=\"/home/ADMIN/cortex_m4/bin\" -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Wshadow -Werror -g -O2 -MT bfdio.lo -MD -MP -MF
.deps/bfdio.Tpo -c bfdio.c -o bfdio.o
bfdio.c: In function ‘memory_bstat’:
bfdio.c:580:30: error: argument to ‘sizeof’ in ‘memset’ call is the same
expression as the destination; did you mean to dereference it?
[-Werror=sizeof-pointer-memaccess]
memset (statbuf, 0, sizeof (statbuf));
^
cc1: all warnings being treated as errors
Makefile:1513: recipe for target 'bfdio.lo' failed
make[4]: *** [bfdio.lo] Error 1
make[4]: Leaving directory '/home/ADMIN/cortex_m4/gdb-7.3.1/bfd'
Makefile:1555: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/ADMIN/cortex_m4/gdb-7.3.1/bfd'
Makefile:1066: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/ADMIN/cortex_m4/gdb-7.3.1/bfd'
Makefile:3496: recipe for target 'all-bfd' failed
make[1]: *** [all-bfd] Error 2
make[1]: Leaving directory '/home/ADMIN/cortex_m4/gdb-7.3.1'
Makefile:857: recipe for target 'all' failed
make: *** [all] Error 2
pinskia at gcc dot gnu.org
2014-04-26 09:00:46 UTC
Permalink
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60974

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Configure gdb with --disable-Werror or better yet use a newer gdb since a newer
is required anyways for dwarf4 support.
atvreddy97 at gmail dot com
2014-04-26 09:38:58 UTC
Permalink
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60974

--- Comment #2 from atvreddy <atvreddy97 at gmail dot com> ---
thank you so much......!,i will try with new gdb version..... thanks for
support..



On Sat, Apr 26, 2014 at 2:30 PM, pinskia at gcc dot gnu.org <
Post by atvreddy97 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60974
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Configure gdb with --disable-Werror or better yet use a newer gdb since a
newer
is required anyways for dwarf4 support.
--
You reported the bug.
Loading...