compiler error?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
psiko_scweek
Posts: 42
Joined: Sat Nov 12, 2005 2:30 am

compiler error?

Post by psiko_scweek »

Whenever I try to compile my source after I add the following Code:

Code: Select all

gfx_apply_surface(Objects[1].x,Objects[1].y,gfx_ball,gfx_screen);
I get a compiler error.

here is the gfx_appy_surface function code.

Code: Select all

void gfx_apply_surface(int x, int y, SDL_Surface* source, SDL_Surface* destination )
{  
SDL_Rect offset;  
offset.x = x;
offset.y = y;
SDL_BlitSurface( source, NULL, destination, &offset );
}
and here is the code for the object structure.

Code: Select all

typedef struct{
int x;
int y;
SDL_Surface *graphic;
int graphicx;
int graphicy;
int height;
int width;
int solid;
}Ob_Objects;
and the error i get is:

main.c142 :Internal Compiler Error: in Propagate_one_insn, at flow.c1690
User avatar
dsn
Posts: 47
Joined: Wed Nov 09, 2005 11:48 am
Location: Indianapolis, Indiana, USA

Post by dsn »

Usually an internal compiler error means one of three things: the compiler ran out of memory; your seemingly innocent code accidentally uses a preposterous amount of stack space; or there's a bug in the compiler. One way to narrow down what's happening is to recompile with less aggressive optimization settings (change -O2 to -O1, for example).
Post Reply