[PATCH] Make wine build with the Intel CC

Eric Pouech eric.pouech at wanadoo.fr
Mon Apr 23 15:33:27 CDT 2007


Alexandre Julliard a écrit :
> But here you really have two non-inline definitions, one in C and one
> in assembly. What happens if you remove the C version?
>
>   
sorry, I redid my week end tests and went too fast
the real "bad" case is:

/* case with 2 C declarations */
extern inline int foo(int a);
extern inline int foo(int a) {return a + 1;}
int tfoo(int b)
{
        return foo(b) * b;
}
int foo(int a) {return a+1;}

/* case with C & ASM declarations */
extern inline int ffo(int a);
extern inline int ffo(int a) {return a + 1;}
int tffo(int f)
{
        return ffo(f) * f;
}
__asm__( ".text\n\t"
         ".align 4\n\t"
         ".globl ffo\n\t"
         ".type ffo, at function\n"
         "ffo:\n\tret\n"
         "\n\t.previous" );
[eric at localhost wine-git]$ /opt2/intel/cc/9.1.047/bin/icc -c -O2 ~/icc2.c
/home/eric/icc2.c(7): warning #290: function "foo" has already been defined
  int foo(int a) {return a+1;}
      ^

IPO: WARNING: File scope asm disables -ipo
/home/eric/tmp/iccTSWeMaas_.s: Assembler messages:
/home/eric/tmp/iccTSWeMaas_.s:86: Error: symbol `ffo' is already defined

we don't get the error if the inline function is not inlined
changing the order of asm def & inline usage doesn't change the output 
either

A+

-- 
Eric Pouech
"The problem with designing something completely foolproof is to underestimate the ingenuity of a complete idiot." (Douglas Adams)





More information about the wine-devel mailing list