On 1/30/19 6:37 PM, Jakub Jelinek wrote:
Hi!
The r265077 changes broke
+FAIL: libstdc++-prettyprinters/cxx17.cc print p
+FAIL: libstdc++-prettyprinters/cxx17.cc print p
+FAIL: libstdc++-prettyprinters/cxx17.cc print q
+FAIL: libstdc++-prettyprinters/cxx17.cc print q
+FAIL: libstdc++-prettyprinters/cxx17.cc print wp
+FAIL: libstdc++-prettyprinters/cxx17.cc print wp
+FAIL: libstdc++-prettyprinters/cxx17.cc print wq
+FAIL: libstdc++-prettyprinters/cxx17.cc print wq
+FAIL: libstdc++-prettyprinters/shared_ptr.cc print sp1
+FAIL: libstdc++-prettyprinters/shared_ptr.cc print sp1
+FAIL: libstdc++-prettyprinters/shared_ptr.cc print wp1
+FAIL: libstdc++-prettyprinters/shared_ptr.cc print wp1
+FAIL: libstdc++-prettyprinters/shared_ptr.cc print wp2
+FAIL: libstdc++-prettyprinters/shared_ptr.cc print wp2
where GDB isn't able to cope with the enumerators rather than
(enumerated_type) constant_integer e.g. in template arguments.
While printing enumerators might be more user-friendly in diagnostics
(though, if there are several enumerators with the same value, we don't
really preserve which one has been used in the source, just the first
matching one is printed), for debug info purposes I think the old
way is more expressive, requires less work from the debugger to find out
what exact value it has. We have other spots where we change the pretty
printing decisions based on whether it is a debug info string
(decl_as_dwarf_string or lang_decl_dwarf_name) or some other one.
Bootstrapped/regtested on x86_64-linux and i686-linux, fixes the above
tests, ok for trunk?
2019-01-30 Jakub Jelinek <ja...@redhat.com>
PR libstdc++/88170
* c-pretty-print.c (pp_c_enumeration_constant): Print always as
a C cast in pp_c_flag_gnu_v3 mode.
* cxx-pretty-print.c (pp_cxx_enumeration_constant): Print always as
a C cast in pp_c_flag_gnu_v3 mode.
OK.
Jason