This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: invalid operands to binary &
- From: "Airara" <Jaswant at indofuji dot soft dot net>
- To: "David Stroupe" <dstroupe at keyed-upsoftware dot com>,<gcc-help at gcc dot gnu dot org>
- Date: Mon, 6 May 2002 09:36:17 +0530
- Subject: Re: invalid operands to binary &
- References: <3CD5B730.1060909@keyed-upsoftware.com>
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
>
>