[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Optimization
>
> >
> > >
> > >
> > > Hi there!
> > >
> > > Has anyone ever stumbled over a situation where comiling an application
> > > with optimizations turned on (as opposed to compiling with debugging info)
> > > makes the app not work anymore? I experienced it yesterday, and it took
> > > some time to find out... Basically it gets stuck in code that works just
> > > fine with debugging turned on. The code is a select() and a read(), i.e.
> > > system calls. Maybe I do something weird, but that part has worked for
> > > ages... I get no warnings when compiling, except for a:
> > >
> > > /usr/include/socketbits.h:173: warning: ANSI C++ forbids zero-size array
> > > `__cmsg_data'
> > >
> > > This is also something I'd like to get rid of. It's an warning, not
> > > serious, but it comes from _every_ file I compile, and it's much harder to
> > > spot the more serious because of it.
> > >
> > > The flags I use for compilation are:
> > >
> > > ##########################################################################
> > > # Specific definitions for a 'release' and 'debug' compile
> > > ##########################################################################
> > > RELEASECFLAGS =3D -pedantic -O2 -Wall -I$(INCDIR) -D_REENTRANT
> > > RELEASELFLAGS =3D -D_REENTRANT -L$(LIBDIR)
> > >
> > > DEBUGCFLAGS =3D -pedantic -ggdb -Wall -I$(INCDIR) -D_REENTRANT
> > > DEBUGLFLAGS =3D -D_REENTRANT -L$(LIBDIR)
> > >
> > > The only real difference is the '-ggdb' is replaced by a '-O2'. Does
> > > anyone have any good ideas as to what might go wrong here?
> > >
> > > =09Chakie
> > >
> > > ---------------------+-----------------------------------------------------=
> > > -
> > > Jan 'Chakie' Ekholm | CS at =C5bo Akademi University, Turku, Finland
> > > Linux Inside | I'm the blue screen of death, no-one hears you screa=
> > > m
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: penguinplay-unsubscribe@sunsite.auc.dk
> > > For additional commands, e-mail: penguinplay-help@sunsite.auc.dk
> > >
> > >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: penguinplay-unsubscribe@sunsite.auc.dk
> For additional commands, e-mail: penguinplay-help@sunsite.auc.dk
>
>