diff --git a/cfg/std.cfg b/cfg/std.cfg index 490480a56..70c05e57b 100644 --- a/cfg/std.cfg +++ b/cfg/std.cfg @@ -3035,6 +3035,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + @@ -3044,8 +3045,11 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + + !0.0: + @@ -3055,8 +3059,11 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + + !0.0: + @@ -3066,6 +3073,8 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun + + !0.0: diff --git a/test/cfg/std.cpp b/test/cfg/std.cpp index 1762118c7..8bb7c29f4 100644 --- a/test/cfg/std.cpp +++ b/test/cfg/std.cpp @@ -2382,6 +2382,30 @@ void uninitvar_ldexp(void) (void)std::ldexp(ldc,e3); } +void invalidFunctionArg_lgamma(float f, double d, long double ld) +{ + (void)lgamma(d); + // cppcheck-suppress invalidFunctionArg + (void)lgamma(-0.1); + // cppcheck-suppress invalidFunctionArg + (void)lgamma(0.0); + (void)lgamma(0.1); + + (void)lgammaf(f); + // cppcheck-suppress invalidFunctionArg + (void)lgammaf(-0.1f); + // cppcheck-suppress invalidFunctionArg + (void)lgammaf(0.0f); + (void)lgammaf(0.1f); + + (void)lgammal(ld); + // cppcheck-suppress invalidFunctionArg + (void)lgammal(-0.1L); + // cppcheck-suppress invalidFunctionArg + (void)lgammal(0.0L); + (void)lgammal(0.1L); +} + void uninitvar_lgamma(void) { float f;