On 25/04/19 17:02 -0400, Jason Merrill wrote:
Perhaps initialize show_notes to (complain & tf_error), so you only
need to update it from permerror.
But doesn't fix the bug, because the error is only printed for
!is_instantiation_of_constexpr (current_function_decl)
so we need to suppress the notes otherwise.
On Thu, Apr 25, 2019 at 4:31 PM Jonathan Wakely <jwak...@redhat.com> wrote:
gcc/cp:
PR c++/90243 - orphaned note in uninstantiated constexpr function
* decl.c (check_for_uninitialized_const_var): Suppress notes if no
error was shown.
gcc/testsuite:
PR c++/90243
* g++.dg/diagnostic/pr90243.C: New test.
Tested powerpc64le-linux, OK for trunk?