Reply-To: 
Hi!
Yesterday I spent 3 1/2 hours debugging code like this:

#include <SDL/SDL.h>
SDL_Surface *screen;

int main(int argc, char *argv[]) {
        SDL_Surface *screen;
        
        screen = SDL_SetVideoMode(640,480,8,0);
        drawRedSquare();
}

void drawRedSquare() {
        // do something with screen
        // SEGFAULT!
}

I kicked myself in the head when I found the problem:
duplicate declaration of screen at different scopes.
Is there any way to get EGCS to give me a warning about
this? 

-- 
Stephen Pitts
[EMAIL PROTECTED]
webmaster - http://www.mschess.org

Reply via email to