[Bug rust/108111] Rust meets clang
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108111 --- Comment #1 from Marc Poulhiès --- Hello David, Looking at the errors, most of them are trivial to fix. 1-6: missing 'override'. 9: not present in most recent dev branch on github, can be ignored as it will disappear when we update the gcc master branch with latest code. 13-14: class is missing a virtual dtor 7,10-12: unused variables I'll need to read a bit more about the 8 (default move assignment op being deleted). I've a first patch that addresses most of the warnings, but I'm missing the last one. If Arthur (or someone else) doesn't beat me to it, I'll have a fix shortly
[Bug rust/108111] Rust meets clang
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108111 --- Comment #2 from Jonathan Wakely --- (In reply to Marc Poulhiès from comment #1) > I'll need to read a bit more about the 8 (default move assignment op being > deleted). Lexer has this member: buffered_queue input_queue; That has a member of type InputSource& which means it is not assignable, so Lexer is not assignable either. Are you sure you want a reference there? Using std::reference_wrapper would work without needing to change buffered_queue.
[Bug rust/108111] Rust meets clang
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108111 Martin Liška changed: What|Removed |Added CC||marxin at gcc dot gnu.org Last reconfirmed||2022-12-15 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW
[Bug rust/108111] Rust meets clang
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108111 --- Comment #3 from Marc Poulhiès --- Thanks Jonathan for the suggestion. The lexer code still need some refactor because the Source type (2nd template argument to buffered_queue) is expected to have a next() method and is used with both a InputSource& and a TokenSource. I have a local patch but still need to use clang to check the fix first :)
[Bug rust/108111] Rust meets clang
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108111 --- Comment #4 from GCC Commits --- The trunk branch has been updated by Arthur Cohen : https://gcc.gnu.org/g:2046aec032f743023a5e353735255d951e2e54d6 commit r14-7347-g2046aec032f743023a5e353735255d951e2e54d6 Author: Marc Poulhiès Date: Sat Dec 17 16:23:05 2022 +0100 gccrs: fix some clang warnings This fixes some extra warnings reported by clang. gcc/rust/ChangeLog: PR rust/108111 * ast/rust-ast-full-decls.h (StructPatternElements): Declare as a class. * ast/rust-item.h (EnumItem): Mark several method as being overrides. * ast/rust-pattern.h (StructPattern::get_locus): Add override. * lex/rust-lex.h (BufferInputSource): Use reference_wrapper instead of bare reference. (TokenSource::get): Add method to implement the reference_wrapper interface. * typecheck/rust-tyty.h (TypeBoundPredicate): Add empty dtor. * util/rust-buffered-queue.h (peek): Source token stream is now using a reference_wrapper, use .get() Signed-off-by: Marc Poulhiès