This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug build/14003] New: build fails on solaris in infrun.c because ofempty inferior_suspend_state struct
- From: "tim.mooney at ndsu dot edu" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 20 Apr 2012 17:47:08 +0000
- Subject: [Bug build/14003] New: build fails on solaris in infrun.c because ofempty inferior_suspend_state struct
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=14003
Bug #: 14003
Summary: build fails on solaris in infrun.c because of empty
inferior_suspend_state struct
Product: gdb
Version: 7.4
Status: NEW
Severity: normal
Priority: P2
Component: build
AssignedTo: unassigned@sourceware.org
ReportedBy: tim.mooney@ndsu.edu
Classification: Unclassified
Attempting to build gdb-7.4 on x86_64-sun-solaris2.10 with the Sun/Oracle
Studio 12.3 compiler. I've previously built gdb (7.0.1, 7.2, some earlier
versions) with the Studio toolchain.
I'm using
CFLAGS='-Xa -g3 -features=extensions -xtarget=native -m64 -xarch=native'
The compile fails in infrun.c:
source='infrun.c' object='infrun.o' libtool=no DEPDIR=.deps
depmode=dashXmstdout
/bin/bash ./../depcomp cc -Xa -g3 -features=extensions -xtarget=native -m64
-xa
rch=native -I/local/gnu/include -I/local/gnu/include -I/local/include -I. -I.
-I./common -I./config -DLOCALEDIR="\"/local/gnu/share/locale\"" -DHAVE_CONFIG_H
-I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I../bfd -I./../bfd
-
I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib -Ignulib
-DTUI
=1 -I/local/gnu/include -I/local/gnu/include -I/local/include
-I/usr/include/p
ython2.4 -I/usr/include/python2.4 -c -o infrun.o infrun.c
"inferior.h", line 401: warning: zero-sized struct/union
"inferior.h", line 401: warning: zero-sized struct/union
"infrun.c", line 6644: unknown operand size: op "="
"infrun.c", line 6668: unknown operand size: op "="
cc: acomp failed for infrun.c
gmake[2]: *** [infrun.o] Error 2
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: Leaving directory `/local/src/RPM/BUILD/gdb-7.4/gdb'
The problem is that "struct inferior_suspend_state" has no members, so the
compiler doesn't know the size for "suspend" in struct inferior, when it's
assigned to something else.
I worked around this issue by adding a "void * placeholder" member to struct
inferior_suspend_state, but it's not clear to me what point there is in having
a structure with no members.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.