diff options
author | Lewis Hyatt <lhyatt@gmail.com> | 2024-10-28 12:55:24 -0400 |
---|---|---|
committer | Lewis Hyatt <lhyatt@gcc.gnu.org> | 2024-11-23 13:44:37 -0500 |
commit | cd86dd5f43f7b9ea688a404840ef9d5e0f5e4cf0 (patch) | |
tree | 1a1629151d8b6ff7a6c486536177d33063a6f2ee /gcc | |
parent | 9262b6e4e5f65ec3ea49a0ecc4b3ace91cc8b388 (diff) | |
download | gcc-cd86dd5f43f7b9ea688a404840ef9d5e0f5e4cf0.zip gcc-cd86dd5f43f7b9ea688a404840ef9d5e0f5e4cf0.tar.gz gcc-cd86dd5f43f7b9ea688a404840ef9d5e0f5e4cf0.tar.bz2 |
Support for 64-bit location_t: Analyzer parts
The analyzer occasionally prints internal location_t values for debugging;
adjust those parts so they will work if location_t is 64-bit. For
simplicity, to avoid hassling with the printf format string, just convert to
(unsigned long long) in either case.
gcc/analyzer/ChangeLog:
* checker-event.cc (checker_event::dump): Support printing either
32- or 64-bit location_t values.
* checker-path.cc (checker_path::inject_any_inlined_call_events):
Likewise.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/analyzer/checker-event.cc | 4 | ||||
-rw-r--r-- | gcc/analyzer/checker-path.cc | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/gcc/analyzer/checker-event.cc b/gcc/analyzer/checker-event.cc index a7098ae..0ba2a24 100644 --- a/gcc/analyzer/checker-event.cc +++ b/gcc/analyzer/checker-event.cc @@ -187,8 +187,8 @@ checker_event::dump (pretty_printer *pp) const if (m_effective_fndecl != m_original_fndecl) pp_printf (pp, " corrected from %qE", m_original_fndecl); } - pp_printf (pp, ", m_loc=%x)", - get_location ()); + pp_printf (pp, ", m_loc=%llx)", + (unsigned long long) get_location ()); } /* Dump this event to stderr (for debugging/logging purposes). */ diff --git a/gcc/analyzer/checker-path.cc b/gcc/analyzer/checker-path.cc index fd3d6ef..649eb23 100644 --- a/gcc/analyzer/checker-path.cc +++ b/gcc/analyzer/checker-path.cc @@ -280,8 +280,9 @@ checker_path::inject_any_inlined_call_events (logger *logger) logger->log_partial (" %qE", iter.get_block ()); if (!flag_dump_noaddr) logger->log_partial (" (%p)", iter.get_block ()); - logger->log_partial (", fndecl: %qE, callsite: 0x%x", - iter.get_fndecl (), iter.get_callsite ()); + logger->log_partial (", fndecl: %qE, callsite: 0x%llx", + iter.get_fndecl (), + (unsigned long long) iter.get_callsite ()); if (iter.get_callsite ()) dump_location (logger->get_printer (), iter.get_callsite ()); logger->end_log_line (); |