This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/71504] bogus error: accessing value through a glvalue in a constant expression


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]