]>
git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: expand: Add parser for offset_of!() and builtin resolution.
gcc/rust/ChangeLog:
* Make-lang.in: Compile the offset_of handler.
* lang.opt: Add -frust-assume-builtin-offset-of option.
* ast/rust-ast.h: Add has_str() for const_TokenPtr.
* expand/rust-macro-builtins.cc: Map offset_of as builtin.
* expand/rust-macro-builtins.h: Declare it.
* expand/rust-macro-expand.cc (MacroExpander::expand_invoc): Add hack for calling builtin
offset_of!().
* resolve/rust-early-name-resolver-2.0.cc (Early::visit): Likewise.
* expand/rust-macro-builtins-offset-of.cc: New file.
gcc/testsuite/ChangeLog:
* rust/compile/offset_of1.rs: New test.