[Top][All Lists]

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

Re: [avr-gcc-list] Int32 Support

From: Dave Hylands
Subject: Re: [avr-gcc-list] Int32 Support
Date: Mon, 18 Sep 2006 16:51:05 -0700

Hi again Nigel (this time removing my foot from my mouth),

> You forget the standard 'c' gotcha:
> external void fn(uint32_t, uint32_t);
> int main() {
>    uint32_t a = 0x10000000<<15;    /* produces no warning */
>    uint32_t b = 0;
>    fn(a,b);                        //Use the variables
>    return -1;
>    }
> No warning is given but the variable a is set to zero.

I see now. the warning produced was for the second line. When I change
b to zero then I get no warnings (as you said).

The ANSI C Language says that the handling of overflow is not defined
as part of the language and that most implementation ignore it.

Seems like something that could be tested for.

Dave Hylands
Vancouver, BC, Canada

reply via email to

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