[Bug c/91312] -Wconversion warning with += operator

2019-08-05 Thread kosotiro at yahoo dot gr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91312 --- Comment #7 from Kostas Sotiropoulos --- (In reply to Andrew Pinski from comment #5) > (In reply to Kostas Sotiropoulos from comment #4) > > Any comments on my questions? > > Yes go read the c standard about prompting to int here. I had

[Bug c/91312] -Wconversion warning with += operator

2019-08-02 Thread kosotiro at yahoo dot gr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91312 --- Comment #4 from Kostas Sotiropoulos --- Any comments on my questions?

[Bug c/91312] -Wconversion warning with += operator

2019-07-31 Thread kosotiro at yahoo dot gr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91312 --- Comment #3 from Kostas Sotiropoulos --- (In reply to Andrew Pinski from comment #2) > THis is not a bug, In C, "i += MACRO;" is equivant to: > i = i + MACRO. > And since you are using a type smaller than int, it is prompted to int. > > NOTE

[Bug c/91312] -Wconversion warning with += operator

2019-07-31 Thread kosotiro at yahoo dot gr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91312 --- Comment #1 from Kostas Sotiropoulos --- Hi, When compiling the following code snippet with gcc 8.3.0 with -Werror=conversion option: #include #define MACRO 1 int main(void) { unsigned char i; i += MACRO; return i; } the following

[Bug c/91312] New: -Wconversion warning with += operator

2019-07-31 Thread kosotiro at yahoo dot gr
Assignee: unassigned at gcc dot gnu.org Reporter: kosotiro at yahoo dot gr Target Milestone: ---