enums and ints are compatible

This commit is contained in:
Michael Matz
2016-08-07 00:09:10 +02:00
parent c0368604e1
commit b1a906b970
2 changed files with 10 additions and 0 deletions

View File

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