Re: gcc question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

On Wed, Sep 08, 2021 at 03:06:54PM +0000, HON  LUU wrote:
>       + The modified gcc command did not compile. The error message would look like this.
> In file included from ././include/linux/compiler_types.h:58,
>                  from <command-line>:
> ./arch/x86/include/asm/jump_label.h: In function ‘unmap_user_buf.part.3’:
> ./include/linux/compiler-gcc.h:305:38: error: asm operand 0 probably doesn’t match constraints [-Werror]
> #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
>                                       ^~~
> ./arch/x86/include/asm/jump_label.h:38:2: note: in expansion of macro ‘asm_volatile_goto’
>   asm_volatile_goto("1:"
>   ^~~~~~~~~~~~~~~~~
> ./include/linux/compiler-gcc.h:305:38: error: impossible constraint in ‘asm’
> #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0)
>                                       ^~~
> ./arch/x86/include/asm/jump_label.h:38:2: note: in expansion of macro ‘asm_volatile_goto’
>   asm_volatile_goto("1:"
>   ^~~~~~~~~~~~~~~~~
> cc1: all warnings being treated as errors

(Use LANG=C or LC_ALL=C to not get those weird quotes, just like you
would use this to get error messages that aren't translated, that the
compiler developers can actually read :-) )

You need to show the full code of the asm_volatile_goto, and the
declarations of everything used in its operands, for us to get a handle
on what is going on here.  Bonus points if you manage to make a stand-
alone compilable testcase that shows the problem.

GL;HF,


Segher



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux