Bug 678928 - Possible bug related to empty structs
Summary: Possible bug related to empty structs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 674327
TreeView+ depends on / blocked
 
Reported: 2011-02-20 21:58 UTC by Bruno Wolff III
Modified: 2011-03-03 03:38 UTC (History)
1 user (show)

Fixed In Version: gcc-4.6.0-0.11.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-21 10:07:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
.mi file for the module for which the compile errored out (315.33 KB, text/plain)
2011-02-21 01:42 UTC, Bruno Wolff III
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 47832 0 None None None Never

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.


Note You need to log in before you can comment on or make changes to this bug.