This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: invalid operands to binary &


Operands of bitwise operators must have integral types, not pointer or
address, but their types can be different. You can check your operands
satisfy it or not.

Airara



> I get an
>
> invalid operands to binary &
>
> error when I compile this line in a kernel module
>
> return (pte_val(*pte) & ~(PAGE_SIZE -1)) + (address & (PAGE_SIZE - 1));
>
> Can anyone tell me why?
>
> TIA
>
>
> --
> Best regards,
> David Stroupe
> Keyed-Up Software
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]