enums and ints are compatible

But like GCC do warn about changes in signedness.  The latter
leads to some changes in gen_assign_cast to not also warn about
  unsigned* = int*
(where GCC warns, but only with extra warnings).
This commit is contained in:
Michael Matz
2016-08-07 02:15:34 +02:00
parent b1a906b970
commit 34fc6435ee
4 changed files with 35 additions and 14 deletions

View File

@ -591,7 +591,7 @@ void enum_test()
{
enum test b1;
/* The following should give no warning */
int *p = &b1;
unsigned *p = &b1;
printf("enum:\n%d %d %d %d %d %d\n",
E0, E1, E2, E3, E4, E5);
b1 = 1;