https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27775
Rich Newman <rnewman at compubrite dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic, false-positive
--- Comment #7 from Rich Newman <rnewman at compubrite dot com> ---
Note: clang++ 13.1.0 and 16.0 accept this code, (clang 8.0 does not).
The proof:
$ /usr/local/llvm-16.0.0/bin/clang++ -c foo.cc
$ echo $?
0
$ /usr/local/llvm-13.1.0/bin/clang++ -c foo.cc
$ echo $?
0
It *may* have been fixed in clang in a version between 8.0 and 13.1, I don't
know, as I don't have those versions.