Kyotaro HORIGUCHI <horiguchi.kyot...@lab.ntt.co.jp> writes: > I might misunderstand something, but my compiler (gcc 7.3.1) > won't be quiet about omitted value even with default:. > ...
I would call that a compiler bug, TBH. The code is 100% correct, if you intended to allow the default case to handle some enum values, which is perfectly reasonable coding. > Isn't it enough that at least one platform correctly warns that? No, especially not if it's only a warning. Many developers would not see it initially, and the buildfarm likely wouldn't complain either. regards, tom lane