On Sun, Apr 7, 2019 at 11:10 AM ashwina kumar <kumarashwin...@gmail.com> wrote: > > Hi , > > While working I just figured out that -Wconversion is buggy. Please see the > below code- - > > $ cat b.c > #include <stdint.h> > > void main (void) > { > //contains build errors > uint16_t x = 1; > uint16_t y = 2; > y += x; /* contains error */ > > } > > $ gcc b.c -Wconversion > b.c: In function ‘main’: > b.c:22:7: warning: conversion to ‘uint16_t {aka short unsigned int}’ > from ‘int’ may alter its value [-Wconversion] > y += x; /* contains error */
The warning is correct unless you factor in that x == 1 and y == 2. > Please help me to know as an GSOC student can I work on this for this year > to make -Wconversion more robust. > > Thanks & Regards, > Ashwina > > -- > Ashwina Kumar > BIT Mesra