This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/46711] __builtin_choose_expr checks not chosen expression


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46711

--- Comment #3 from PrzemysÅaw PaweÅczyk <przemoc at gmail dot com> 2010-11-29 20:07:20 UTC ---
Andrew, thanks for the always_inline hint.
But weren't you too fast with marking PR 46711 as duplicate of PR 19449?

Check which lines are marked with errors. 8th line is not mentioned (unless you
turn on optimization), so it's not the same problem, right? Am I missing
something?

The problem here is with ((a) == 0) and ((a) == 1) obviously not being constant
expressions, because a alone is not a constant expression. And this problem
derive from needless checking not chosen expression.

PR 19449 is problematic too, but it's other thing.

(I am not changing the status right now, because I believe that you'll step in
and explain me why I am wrong or admit that you were not careful enough.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]