http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55737
--- Comment #2 from GS <greenscape777 at gmail dot com> 2012-12-19 10:31:45 UTC
---
Hey Andrew. You words completely logical,. But I think it can be avoided when
condition can be calculated during compilation. Though it's only my opinion.
Though I still have a couple of counter arguments in my pocket :). First of
all, clang++ compiles with out errors. Not an important argument, I know. The
second one is code snippet:
enum
{
valueA = 0,
/// False branch in the condition should never be taken into account.
/// And moreover, template should be constructed.
valueB = (/* Always false >>>*/1 > 2 /*<<<*/) ? /* False branch
>>>*/int(1.0f / 0)/*<<<*/ : 1
};
It doesn't whine about division by 0. So either former case or the later is a
bug.