conversion warning bug?

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

 



Hello all,
I saw what i believe is a bug with -Wconversion option in GCC. Can
someone confirm? If it is a bug, i will file a bugzilla.


$gcc -S -O2 -Wconversion test2.c
test2.c: In function 'foo':
test2.c:5:8: warning: conversion to 'short int' from 'int' may alter
its value [-Wconversion]
   a += b;
        ^


      $more test2.c
short int a;

void foo (char b)
{
  a += b;
}



     $gcc --version
gcc (GCC) 4.9.1
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.




[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