We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Variadic functions are unstable and the compiler should emit an appropriate error.
I tried this code:
pub fn toto(a: i32, ...) {} fn main() {}
I expected to see this happen:
error: only foreign or `unsafe extern "C"` functions may be C-variadic --> src/lib.rs:1:21 | 1 | pub fn toto(a :i32, ...) { | ^^^ error[E0658]: C-variadic functions are unstable --> src/lib.rs:1:1 | 1 | / pub fn toto(a :i32, ...) { 2 | | 3 | | } | |_^ | = note: see issue #44930 <https://github.com/rust-lang/rust/issues/44930> for more information
Instead, this happened:
ICE
crab1: internal compiler error: in get_pattern, at rust/ast/rust-item.h:611 0x1235da6 Rust::AST::FunctionParam::get_pattern() ../../gcc/rust/ast/rust-item.h:611 0x131e6f0 Rust::CfgStrip::maybe_strip_function_params(std::vector<Rust::AST::FunctionParam, std::allocatorRust::AST::FunctionParam >&) /home/patryp/Documents/gccrs/build/gcc/../../gcc/rust/expand/rust-cfg-strip.cc:236 0x1323344 Rust::CfgStrip::visit(Rust::AST::Function&) /home/patryp/Documents/gccrs/build/gcc/../../gcc/rust/expand/rust-cfg-strip.cc:2081 0x113afa0 Rust::AST::Function::accept_vis(Rust::AST::ASTVisitor&) /home/patryp/Documents/gccrs/build/gcc/../../gcc/rust/ast/rust-ast.cc:4757 0x131e342 Rust::CfgStrip::go(Rust::AST::Crate&) /home/patryp/Documents/gccrs/build/gcc/../../gcc/rust/expand/rust-cfg-strip.cc:153 0x1265978 Rust::Session::expansion(Rust::AST::Crate&) /home/patryp/Documents/gccrs/build/gcc/../../gcc/rust/rust-session-manager.cc:879 0x1264535 Rust::Session::compile_crate(char const*) /home/patryp/Documents/gccrs/build/gcc/../../gcc/rust/rust-session-manager.cc:588 0x1263f84 Rust::Session::handle_input_files(int, char const**) /home/patryp/Documents/gccrs/build/gcc/../../gcc/rust/rust-session-manager.cc:402 0x10d8172 grs_langhook_parse_file() /home/patryp/Documents/gccrs/build/gcc/../../gcc/rust/rust-lang.cc:165 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See https://gcc.gnu.org/bugs/ for instructions.
The text was updated successfully, but these errors were encountered:
P-E-P
Successfully merging a pull request may close this issue.
Variadic functions are unstable and the compiler should emit an appropriate error.
I tried this code:
I expected to see this happen:
Instead, this happened:
ICE
Details
crab1: internal compiler error: in get_pattern, at rust/ast/rust-item.h:611
0x1235da6 Rust::AST::FunctionParam::get_pattern()
../../gcc/rust/ast/rust-item.h:611
0x131e6f0 Rust::CfgStrip::maybe_strip_function_params(std::vector<Rust::AST::FunctionParam, std::allocatorRust::AST::FunctionParam >&)
/home/patryp/Documents/gccrs/build/gcc/../../gcc/rust/expand/rust-cfg-strip.cc:236
0x1323344 Rust::CfgStrip::visit(Rust::AST::Function&)
/home/patryp/Documents/gccrs/build/gcc/../../gcc/rust/expand/rust-cfg-strip.cc:2081
0x113afa0 Rust::AST::Function::accept_vis(Rust::AST::ASTVisitor&)
/home/patryp/Documents/gccrs/build/gcc/../../gcc/rust/ast/rust-ast.cc:4757
0x131e342 Rust::CfgStrip::go(Rust::AST::Crate&)
/home/patryp/Documents/gccrs/build/gcc/../../gcc/rust/expand/rust-cfg-strip.cc:153
0x1265978 Rust::Session::expansion(Rust::AST::Crate&)
/home/patryp/Documents/gccrs/build/gcc/../../gcc/rust/rust-session-manager.cc:879
0x1264535 Rust::Session::compile_crate(char const*)
/home/patryp/Documents/gccrs/build/gcc/../../gcc/rust/rust-session-manager.cc:588
0x1263f84 Rust::Session::handle_input_files(int, char const**)
/home/patryp/Documents/gccrs/build/gcc/../../gcc/rust/rust-session-manager.cc:402
0x10d8172 grs_langhook_parse_file()
/home/patryp/Documents/gccrs/build/gcc/../../gcc/rust/rust-lang.cc:165
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See https://gcc.gnu.org/bugs/ for instructions.
Meta
The text was updated successfully, but these errors were encountered: