[MPlayer-dev-eng] icc benchmark

Carl Eugen Hoyos cehoyos at ag.or.at
Mon Jun 11 11:03:46 CEST 2007


Hi!

Reimar Doeffinger <Reimar.Doeffinger <at> stud.uni-karlsruhe.de> writes:

> On Mon, Jun 11, 2007 at 08:35:45AM +0000, Carl Eugen Hoyos wrote:
> > Reimar Doeffinger <Reimar.Doeffinger <at> stud.uni-karlsruhe.de> writes:
> > > On Mon, Jun 11, 2007 at 12:15:05AM +0200, Carl Eugen Hoyos wrote:
> > > >  /* attribute(used) as needed by some compilers */
> > > >  #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300)
> > > > -# define attribute_used __attribute__((used))
> > > > +# define attribute_used __attribute__((used)) static
> > > 
> > > Hmm.. doesn't putting this in that order produce warnings?
> > 
> > Neither with icc (where it wouldn't be used) nor with gcc-2.95.3, 3.4.6,
> > 4.0.2 and 4.1.1.
> > 
> > Should I proceed this way?
> 
> Ok by me. I just though gcc wanted static to always be first...

Just found the problem:
static has to be in front of the variable name, __attribute__((*)) may appear
anywhere.
So the following does not work if attribute_used contains static:
int x attribute_used;
It would have to be changed to:
int attribute_used x;

Carl Eugen





More information about the MPlayer-dev-eng mailing list