[cfe-dev] Possibly invalid enum tautology warning

John McCall rjmccall at apple.com
Sun Aug 7 12:29:46 PDT 2011


On Aug 7, 2011, at 6:44 AM, Peter Geoghegan wrote:
> Anyway, the above test could be perfectly valid in the case where some
> compiler's enum representation is signed. That isn't true of Clang or
> GCC, but I feel that Clang should aim to both follow the standard to
> the letter and follow it in spirit, allowing people to write portable
> code.

I'm not sure what's actually going on in your example, but it sounds
like you're arguing that we should suppress warnings when another
platform exists where the warning wouldn't trigger.  Not only would
that be a ridiculously work-intensive standard to maintain, but it's
contrary to what most people writing portable code want;  indeed,
we frequently get the dual request, to enable warnings on code that
works on the current platform but wouldn't on something else.

John.



More information about the cfe-dev mailing list