Skip to content

Comments

fix warning C4702: unreachable code#368

Merged
lemire merged 1 commit intofastfloat:mainfrom
x1sc0:main
Feb 23, 2026
Merged

fix warning C4702: unreachable code#368
lemire merged 1 commit intofastfloat:mainfrom
x1sc0:main

Conversation

@x1sc0
Copy link
Contributor

@x1sc0 x1sc0 commented Feb 6, 2026

it fixes

E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\fast_float\include\fast_float\float_common.h(317) : error C2220: the following warning is treated as an error
E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\fast_float\include\fast_float\float_common.h(373) : error C2220: the following warning is treated as an error
E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\fast_float\include\fast_float\float_common.h(317) : warning C4702: unreachable code
E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\fast_float\include\fast_float\float_common.h(373) : warning C4702: unreachable code

@lemire
Copy link
Member

lemire commented Feb 6, 2026

Running tests.

@thbeu
Copy link

thbeu commented Feb 23, 2026

See #367. Only occurs with warning level /W4.

It can be simply circumvented by consumers via

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4702) // unreachable code
#endif
#include "fast_float.h"
#ifdef _MSC_VER
#pragma warning(pop)
#endif

At least, that's what was working for me.

@lemire
Copy link
Member

lemire commented Feb 23, 2026

I am happy to merge this.

@lemire
Copy link
Member

lemire commented Feb 23, 2026

Will be part of the next release.

@lemire lemire merged commit 9f30728 into fastfloat:main Feb 23, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants