Skip to content

Regex doesn't compile under clang-cl with warnings-as-errors=on #219

@pdimov

Description

@pdimov

E.g. https://github.com/boostorg/unordered/actions/runs/10655219740/job/29532497175?pr=277#step:6:489

compile-c-c++ bin.v2\libs\regex\build\clng-win-16.0.\dbg\x86_3\cxstd-14-iso\inln-on\optmz-spc\thrd-mlt\wide_posix_api.obj
C:\actions-runner\_work\unordered\boost-root\libs\regex\build\..\src\wide_posix_api.cpp(199,21): error: 'wcscpy' is deprecated: This function or variable may be unsafe. Consider using wcscpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Werror,-Wdeprecated-declarations]
               std::wcscpy(buf, localbuf);
                    ^

This wasn't a problem before the modular changes because Serialization is referenced with <warnings>off here

https://github.com/boostorg/unordered/blob/21937249c47da1fbdb445dc40775a88832fd772d/test/Jamfile.v2#L156

However, post the modular changes Serialization depends on Regex, and <warnings>off doesn't get propagated to the Regex build for some reason, resulting in the error above.

I see that a PR addressing this (#218) has already been merged, but it doesn't seem to help for some reason.

The preprocessor condition should probably check for the MS STL, rather than specific compilers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions