Skip to content

Miscompilation of is_whitespace inside rustc on Windows-msvc (with -Zdylib-lto) #109067

@kpreid

Description

@kpreid

Code

fn main() { println!( "Hello \  • world!" ); }

Current output

warning: non-ASCII whitespace symbol '\u{2022}' is not skipped --> experiment\src\main.rs:3:16 | 3 | "Hello \  | ________________^ 4 | | • world!" | | ^ non-ASCII whitespace symbol '\u{2022}' is not skipped | |_____| |

Desired output

No warning, since U+2022 "" is not whitespace.

Anything else?

stable-x86_64-pc-windows-msvc - rustc 1.68.0 (2c8cc3432 2023-03-06)

Weirdly, this warning only occurs on Windows. Unfortunately, I have no Windows systems to test on other than GitHub Actions, so it isn't convenient to test further. I hope this bug report is useful anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-LTOArea: Link-time optimization (LTO)E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessP-criticalCritical priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions