From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14043 invoked by alias); 20 Apr 2012 17:47:25 -0000 Received: (qmail 14024 invoked by uid 22791); 20 Apr 2012 17:47:24 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,SUBJ_OBFU_PUNCT_FEW,SUBJ_OBFU_PUNCT_MANY X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Apr 2012 17:47:11 +0000 From: "tim.mooney at ndsu dot edu" To: gdb-prs@sourceware.org Subject: [Bug build/14003] New: build fails on solaris in infrun.c because of empty inferior_suspend_state struct Date: Fri, 20 Apr 2012 17:47:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: build X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tim.mooney at ndsu dot edu X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2012-q2/txt/msg00042.txt.bz2 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.