From e453751ada4a79e54499eff4c76f394f50f8373d Mon Sep 17 00:00:00 2001 From: William Jakobsson <50847546+wjakobsson@users.noreply.github.com> Date: Mon, 2 Nov 2026 13:48:13 +0100 Subject: [PATCH 1/2] test std.cfg --- test/cfg/std.cpp | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/test/cfg/std.cpp b/test/cfg/std.cpp index e4753a09f7c..cf4f74b6dbf 100644 --- a/test/cfg/std.cpp +++ b/test/cfg/std.cpp @@ -2838,6 +2838,13 @@ void uninitvar_logb(void) (void)std::logbl(ld); } +void bool_isless(float f1, float f2) +{ + // cppcheck-suppress compareBoolExpressionWithInt + // cppcheck-suppress compareValueOutOfTypeRangeError + if (std::isless(f1,f2)==123) {} +} + void uninitvar_isless(void) { float f1,f2; @@ -2853,6 +2860,13 @@ void uninitvar_isless(void) (void)std::isless(ld1,ld2); } +void bool_islessequal(float f1, float f2) +{ + // cppcheck-suppress compareBoolExpressionWithInt + // cppcheck-suppress compareValueOutOfTypeRangeError + if (std::islessequal(f1,f2)==123) {} +} + void uninitvar_islessequal(void) { float f1,f2; @@ -2868,6 +2882,13 @@ void uninitvar_islessequal(void) (void)std::islessequal(ld1,ld2); } +void bool_islessgreater(float f1, float f2) +{ + // cppcheck-suppress compareBoolExpressionWithInt + // cppcheck-suppress compareValueOutOfTypeRangeError + if (std::islessgreater(f1,f2)==123) {} +} + void uninitvar_islessgreater(void) { float f1,f2; @@ -2894,6 +2915,13 @@ void uninitvar_nan(void) (void)std::nanl(tagp3); } +void bool_isnan(float f) +{ + // cppcheck-suppress compareBoolExpressionWithInt + // cppcheck-suppress compareValueOutOfTypeRangeError + if (std::isnan(f)==123) {} +} + void uninitvar_isnan(void) { double d; @@ -2901,6 +2929,13 @@ void uninitvar_isnan(void) (void)std::isnan(d); } +void bool_isnormal(float f) +{ + // cppcheck-suppress compareBoolExpressionWithInt + // cppcheck-suppress compareValueOutOfTypeRangeError + if (std::isnormal(f)==123) {} +} + void uninitvar_isnormal(void) { double d; @@ -2908,6 +2943,13 @@ void uninitvar_isnormal(void) (void)std::isnormal(d); } +void bool_isunordered(float f1, float f2) +{ + // cppcheck-suppress compareBoolExpressionWithInt + // cppcheck-suppress compareValueOutOfTypeRangeError + if (std::isunordered(f1,f2)==123) {} +} + void uninitvar_isunordered(void) { double d1,d2; @@ -3443,6 +3485,13 @@ void uninivar_scalbln(void) (void)std::scalblnl(ld,i3); } +void bool_signbit(float f) +{ + // cppcheck-suppress compareBoolExpressionWithInt + // cppcheck-suppress compareValueOutOfTypeRangeError + if (std::signbit(f)==123) {} +} + void uninitvar_signbit(void) { double d; From a6ad2dc2770571de35c2d9da3d459b2c771a0609 Mon Sep 17 00:00:00 2001 From: William Jakobsson <50847546+wjakobsson@users.noreply.github.com> Date: Mon, 2 Nov 2026 13:48:39 +0100 Subject: [PATCH 2/2] update std.cfg --- cfg/std.cfg | 101 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 94 insertions(+), 7 deletions(-) diff --git a/cfg/std.cfg b/cfg/std.cfg index 99377575428..fc6a6c4d0f8 100644 --- a/cfg/std.cfg +++ b/cfg/std.cfg @@ -3461,7 +3461,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun - + arg1<arg2?1:0 @@ -3474,8 +3474,21 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + + + + arg1<arg2?1:0 + false + + + + + + + + - + arg1 <= arg2?1:0 @@ -3488,8 +3501,21 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + + + + arg1 <= arg2?1:0 + false + + + + + + + + - + (arg1<arg2 || arg1>arg2)?1:0 @@ -3503,6 +3529,20 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + + + + (arg1<arg2 || arg1>arg2)?1:0 + + false + + + + + + + + @@ -3547,7 +3587,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun - + @@ -3558,12 +3598,23 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + + + + + false + + + + + + - + @@ -3574,12 +3625,23 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + + + + + false + + + + + + - + @@ -3594,6 +3656,21 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + + + + + false + + + + + + + + + + @@ -4671,7 +4748,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun - + @@ -4681,6 +4758,16 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + + + + + false + + + + + false