[PATCH v2 2/4] rust: Use error_operand_p in rust-gcc.cc

2025-03-19 Thread Andrew Pinski
. (write_global_definitions): Use error_operand_p. Tighten up the code around the loop. Signed-off-by: Andrew Pinski --- gcc/rust/rust-gcc.cc | 189 --- 1 file changed, 88 insertions(+), 101 deletions(-) diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust

[PATCH v2 1/4] rust: Use FLOAT_TYPE_P instead of manual checking

2025-03-19 Thread Andrew Pinski
gcc/rust/ChangeLog: * rust-gcc.cc (is_floating_point): Use FLOAT_TYPE_P instead of manually checking the type. Signed-off-by: Andrew Pinski --- gcc/rust/rust-gcc.cc | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust

[PATCH v2 4/4] rust: Add comment inside block [PR119342]

2025-03-19 Thread Andrew Pinski
-gcc.cc (block): Add comment on why chaining the variables of the scope toether. Signed-off-by: Andrew Pinski --- gcc/rust/rust-gcc.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc index 1252798a87a..32d3aabbbe4 100644 --- a/gcc/rust/rust

[PATCH v2 3/4] rust: use range for inside rust-gcc.cc [PR119341]

2025-03-19 Thread Andrew Pinski
. (function_type_variadic): Likewise. (fill_in_fields): Likewise. (statement_list): Likewise. (block): Likewise. (block_add_statements): Likewise. (function_set_parameters): Likewise. (write_global_definitions): Likewise. Signed-off-by: Andrew Pinski

[PATCH v2 0/4] rust: Small cleanups of rust-gcc.cc

2025-03-19 Thread Andrew Pinski
that help the readability. Andrew Pinski (4): rust: Use FLOAT_TYPE_P instead of manual checking rust: Use error_operand_p in rust-gcc.cc rust: use range for inside rust-gcc.cc [PR119341] rust: Add comment inside block [PR119342] gcc/rust/rust-gcc.cc

[PATCH 4/4] rust: Add comment inside block [PR119342]

2025-03-17 Thread Andrew Pinski
-gcc.cc (block): Add comment on why chaining the variables of the scope toether. Signed-off-by: Andrew Pinski --- gcc/rust/rust-gcc.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc index 8a740f72513..53950a35fdc 100644 --- a/gcc/rust/rust

[PATCH 2/4] rust: Use error_operand_p in rust-gcc.cc

2025-03-17 Thread Andrew Pinski
. (write_global_definitions): Use error_operand_p. Tighten up the code around the loop. Signed-off-by: Andrew Pinski --- gcc/rust/rust-gcc.cc | 183 --- 1 file changed, 85 insertions(+), 98 deletions(-) diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust

[PATCH 3/4] rust: use range for inside rust-gcc.cc [PR119341]

2025-03-17 Thread Andrew Pinski
. (function_type_variadic): Likewise. (fill_in_fields): Likewise. (statement_list): Likewise. (block): Likewise. (block_add_statements): Likewise. (function_set_parameters): Likewise. (write_global_definitions): Likewise. Signed-off-by: Andrew Pinski

[PATCH 1/4] rust: Use REAL_TYPE_P instead of manual checking

2025-03-17 Thread Andrew Pinski
gcc/rust/ChangeLog: * rust-gcc.cc (is_floating_point): Use REAL_TYPE_P instead of manually checking the type. Signed-off-by: Andrew Pinski --- gcc/rust/rust-gcc.cc | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-g

Re: [PATCH] build: Check for cargo when building rust language

2024-04-16 Thread Andrew Pinski
On Mon, Apr 8, 2024 at 9:39 AM wrote: > > From: Pierre-Emmanuel Patry > > Hello, > > The rust frontend requires cargo to build some of it's components, > it's presence was not checked during configuration. WHY did this go in right before the release of GCC 14? I don't get why this is considered

Re: [PATCH] build: Check for cargo when building rust language

2024-04-09 Thread Andrew Pinski
there is a way to cache and use those specific versions using cargo, that should be done but I suspect cargo does not work that way. Also any time someone says this is a temporary measure it is NOT and we should never treat it as such unless you already have a patch to remove it. Thanks, Andrew Pins