projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a2a386
)
c++: Fix null this pointer [PR 98624]
author
Nathan Sidwell
<nathan@acm.org>
Tue, 19 Jan 2021 19:31:57 +0000
(11:31 -0800)
committer
Nathan Sidwell
<nathan@acm.org>
Tue, 19 Jan 2021 19:37:03 +0000
(11:37 -0800)
There's no need for this function to have an object, so make it
static and avoid UB.
PR c++/98624
gcc/cp/
* module.cc (trees_out::write_location): Make static.
gcc/cp/module.cc
patch
|
blob
|
history
diff --git
a/gcc/cp/module.cc
b/gcc/cp/module.cc
index
1fd0bcf
..
3b224b6
100644
(file)
--- a/
gcc/cp/module.cc
+++ b/
gcc/cp/module.cc
@@
-3727,7
+3727,7
@@
class GTY((chain_next ("%h.parent"), for_user)) module_state {
static cpp_macro *deferred_macro (cpp_reader *, location_t, cpp_hashnode *);
public:
- void write_location (bytes_out &, location_t);
+
static
void write_location (bytes_out &, location_t);
location_t read_location (bytes_in &) const;
public: