skvadrik / re2c

Lexer generator for C, C++, Go and Rust.
https://re2c.org
Other
1.09k stars 170 forks source link

Fix compiling on Windows (MSVC) #338

Closed unixod closed 3 years ago

unixod commented 3 years ago

Hi,

By trying to build re2c on Windows, using MSVS 2017 I faced the compile-time error: C2039: 'isalnum': is not a member of 'std'. This PR fixes this issue.

By the way I added a small fix of using this function: in order to avoid UB (which may occur in some situations, see links below) the argument should be passed by preliminary converting it to unsigned char. More info about this issue:

skvadrik commented 3 years ago

Thank you!