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 chec
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91312
--- Comment #4 from Kostas Sotiropoulos ---
Any comments on my questions?
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
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 w
Assignee: unassigned at gcc dot gnu.org
Reporter: kosotiro at yahoo dot gr
Target Milestone: ---