Re: Switch to obtain "narrowing" warnings

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

 



On 6/5/07, Segher Boessenkool <segher@xxxxxxxxxxxxxxxxxxx> wrote:
> Interesting. It could well be my mistake, but shouldn't "gcc
> -Wconversion test.c" throw at least some unhappiness with:
>
> #include <stdio.h>
> int main(void){
>  int i=99999;
>  short s;
>  s=i;
>  printf("s is %d\n", s);
>  return 0;
> }

It does just that, with *newer* versions of GCC -- 4.2.0 doesn't
yet do this, you need an unreleased version right now.

Cool. Thanks for that ... :-)

[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