Bug 678928

Summary: Possible bug related to empty structs
Product: [Fedora] Fedora Reporter: Bruno Wolff III <bruno>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: jakub
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gcc-4.6.0-0.11.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-21 10:07:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 674327    
Attachments:
Description Flags
.mi file for the module for which the compile errored out none

Description Bruno Wolff III 2011-02-20 21:58:49 UTC
Description of problem:
raidem is no longer rebuilding and stops with the following error:
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -W -Wall -Wno-deprecated-declarations -fno-strict-aliasing -Iinclude -Ilib -DNO_MP3 `/usr/bin/pkg-config AllegroOGG --cflags` -DNO_ALRAND -DNO_FBLEND -DGLYPH_TARGET=GLYPH_TARGET_ALLEGRO -DNO_ID3TAGS -DRAIDEM_DATA_DIR=\"/usr/share/raidem\" -o obj/candy/turret.o -c src/candy/turret.m
src/candy/tank-track.m:73:1: error: instance variable has unknown size

It looks like the code causing the problem is:
@interface TankTrack: Candy
{
    BITMAP *spr;
    int max_track_life;
}
@end

(from raidem-0.3.1-src/include/candy/tank-track.h)

BITMAP is defined in raidem-0.3.1-src/include/candy.h as:
struct BITMAP;

I don't really know objective C, so I might just be confused, but it looks as if pointers to empty structs is supposed to work. The way these values are used later, it doesn't look void will work. Probably there is a way to do it with unions, but that would be a hard change for me to make in the code.

Version-Release number of selected component (if applicable):
gcc-4.6.0-0.7.fc15.i686

How reproducible:


Steps to Reproduce:
1. fedpkg clone raidem
2. cd raidem
3. fedpkg local
  
Actual results:


Expected results:


Additional info:

Comment 1 Jakub Jelinek 2011-02-20 22:52:49 UTC
Please provide preprocessed source (*.mi file), either by running gcc with -E instead of -c, or by using -save-temps.

Comment 2 Bruno Wolff III 2011-02-21 01:42:56 UTC
Created attachment 479806 [details]
.mi file for the module for which the compile errored out

Comment 3 Jakub Jelinek 2011-02-21 10:07:41 UTC
Tracking this upstream, not sure myself whether it is a bug or not, ObjC is very badly specified language.

Comment 4 Fedora Update System 2011-02-23 11:33:17 UTC
gcc-4.6.0-0.9.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/gcc-4.6.0-0.9.fc15

Comment 5 Fedora Update System 2011-03-01 16:06:49 UTC
Package gcc-4.6.0-0.11.fc15:
* should fix your issue,
* was pushed to the Fedora 15 updates-testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gcc-4.6.0-0.11.fc15'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/gcc-4.6.0-0.11.fc15
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2011-03-03 03:37:44 UTC
gcc-4.6.0-0.11.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.