https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92365

--- Comment #6 from Bernd Edlinger <edlinger at gcc dot gnu.org> ---
I tried this, and it contradicts what above comment says:

$ cat test1.cc 
void foo()
{
  char *x = int();
}

gcc -Wall -S -std=c++17 test1.cc 
test1.cc: In function ‘void foo()’:
test1.cc:3:9: warning: unused variable ‘x’
[]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-variable-Wunused-variable]8;;]
    3 |   char *x = int();
      |         ^

So I would have expected that to be rejected with c++11 and above
and accepted with c++98, but it is accepted with all C++ versions.

BTW: can we get rid of this URL-escapes in the warnings, soon?

Reply via email to