https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99154
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID CC| |jakub at gcc dot gnu.org Status|UNCONFIRMED |RESOLVED --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- No, << has higher precedence in C++ than ?:, so it is parsed as ((cout<<"Hello World : ") << 1)?2:3 Just look at http://eel.is/c++draft/expr.shift and look at the non-terminals in there. If you want ... << (1?2:3) you need to write it that way with ()s around it.