avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] question: promotion to integer


From: E. Weddington
Subject: Re: [avr-libc-dev] question: promotion to integer
Date: Thu, 31 Oct 2002 14:31:08 -0700

On 31 Oct 2002 at 10:48, E. Weddington wrote:

> Hello all,
> 
> In avr gcc,
> 
> sizeof((unsigned char)~PIND) == 1
> 
> sizeof(~(unsigned char)PIND) == 2
> 
> So, the NOT operator promotes the value to an integer? I can't 
> rembember, is this Standard C, or artifact of compiler?
> 
> Thanks,
> Eric

I think I answered my own question. I finally found a copy of the 
Standard (which date I'm not sure) and it says that bitwise operators 
promote their operands to int.

Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]