Commit 9459866
gccrs: Fix compile_float_literal not compiling negatives properly
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (compile_float_literal): Add is_negative
check to compile negative float literals properly.
* backend/rust-compile-pattern.cc (CompilePatternCheckExpr::visit(RangePattern)):
Minor optimization to E0579 checks to reduce memory copy.
Signed-off-by: Yap Zhi Heng <[email protected]>1 parent ce52535 commit 9459866
File tree
4 files changed
+23
-3
lines changed- gcc
- rust/backend
- testsuite/rust/compile
4 files changed
+23
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1712 | 1712 | | |
1713 | 1713 | | |
1714 | 1714 | | |
| 1715 | + | |
| 1716 | + | |
1715 | 1717 | | |
1716 | 1718 | | |
1717 | 1719 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
174 | | - | |
175 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments