mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-13 22:11:47 +08:00
c++: Fix offsetof use [PR 98232]
offsetof is underspecified. GCC happened to accept an unneeded explicit scoping, clang does not. gcc/cp/ * module.cc (dumper::push): Clangify offsetof use.
This commit is contained in:
parent
269e82d49e
commit
8379916b16
@ -4153,7 +4153,7 @@ dumper::push (module_state *m)
|
||||
/* Create or extend the dump implementor. */
|
||||
unsigned current = dumps ? dumps->stack.length () : 0;
|
||||
unsigned count = current ? current * 2 : EXPERIMENT (1, 20);
|
||||
size_t alloc = (offsetof (impl, impl::stack)
|
||||
size_t alloc = (offsetof (impl, stack)
|
||||
+ impl::stack_t::embedded_size (count));
|
||||
dumps = XRESIZEVAR (impl, dumps, alloc);
|
||||
dumps->stack.embedded_init (count, current);
|
||||
|
Loading…
x
Reference in New Issue
Block a user