Re: [PATCH v6 6/6] list-objects-filter: implement filter tree:0
- From
Stefan Beller <sbeller@google.com>
- Date
- Aug 21, 2018, 00:36 UTC
- Message-ID
- <CAGZ79kaR7WARYFOGw8p=B4v9hPyZJ71529y-V0cnB-_tnLiEXw@mail.gmail.com>
- In-Reply-To
- <CAMfpvh+7NoOGAmypGSCAtxH7DxHTvVB8_C3OkWNC14+c3MBO4A@mail.gmail.com>
Show 6 quoted lines
> At the risk of going on a tangent, I assumed this was because enums > are really ints, and the "default" is there in case the enum somehow > got assigned to an int without a corresponding value. Either because > of a cast from an int that was out-of-range, or new values that were > obtained from arithmetic or bitwise operations on the declared enum > values, which created undeclared values.
See 374166cb381 (grep: catch a missing enum in switch statement, 2017-05-25) or a bit date, but nevertheless an interesting read: b8527d5fa61 (wt-status: fix possible use of uninitialized variable, 2013-03-21)
...compilers these days are just too smart to reason about them :-)