[PATCH] Tame a few enum size tests when using -fshort-enums on ARM.

Eric Fiselier eric at efcs.ca
Fri Aug 15 11:25:21 PDT 2014

> I'm not sure I understand... This works on ARM for both -fshort-enums and -fno-short-enums.

Sorry, I meant the original test fails whenever -fshort-enums is used. Not just on ARM. Your patch is definitely a lot better at calling out the weird behavior. Optimally I would like to make the workaround less ARM specific, like how wchar_t is handled.

I'm not convinced that we are going to run into cases where `sizeof(Enum)` is not the same as `sizeof(int)` or `sizeof(char)`. 
I apologize. I'm not trying to be difficult. My main concern is introducing a workaround that only a very small set of users can test and reason about. If '-fshort-enums' is causing this failure then I want to work around the switch and not how an architecture handles the switch.


More information about the cfe-commits mailing list