This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/71504] bogus error: accessing value through a glvalue in a constant expression
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 18 Sep 2017 17:08:35 +0000
- Subject: [Bug c++/71504] bogus error: accessing value through a glvalue in a constant expression
- Auto-submitted: auto-generated
- References: <bug-71504-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71504
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
(In reply to Tom Westerhout from comment #2)
Start by stepping through the GCC code that handles the test case and figuring
out what triggers the error and what makes GCC accept the successful case.
Compile GCC for debugging (https://gcc.gnu.org/wiki/DebuggingGCC), load xgcc
into GDB, set a breakpoint in function error(), and run it. A relatively easy
way to figure things out is to start two debugging sessions side by side, one
with the successful test case and one with the failing one, step through them
side by side, and make note of the differences. To see the tree operand that's
being processed call the GCC function debug_tree() on it.