https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86186
--- Comment #2 from zhonghao at pku dot org.cn --- (In reply to Jonathan Wakely from comment #1) > (In reply to zhonghao from comment #0) > > A previous version of clang++ does not produce any error messages for the > > above code, but it was fixed in https://bugs.llvm.org/show_bug.cgi?id=20092 > > No, you've completely misunderstood the llvm bug report. Never the less, g++ accepts the code, but clang++ rejects it, right? My g++ is 8.0.1 20180413, my clang++ is 7.0.0 (trunk 329990). The warning message of clang++ is as follow: 17:5: warning: equality comparison result unused [-Wunused-comparison] t1 == t2; // error: static_assert failed "" ~~~^~~~~ code2.c.cpp:17:5: note: use '=' to turn this equality comparison into an assignment t1 == t2; // error: static_assert failed "" ^~ = 1 warning generated. The message sounds reasonable, but g++ does not produce any warning messages. Shall g++ make the improvement?