std.cfg: Removed some non-existent functions that accidentially declared being in standard namespace. Improved testing of std.cfg functions.

This commit is contained in:
Martin Ettl 2015-08-16 14:38:13 +02:00
parent ab8afec3eb
commit 2665fb9481
3 changed files with 241 additions and 11 deletions

View File

@ -322,7 +322,7 @@
</arg> </arg>
</function> </function>
<!-- int feraiseexcept(int excepts); --> <!-- int feraiseexcept(int excepts); -->
<function name="feraiseexcept,std::feraiseexcept"> <function name="feraiseexcept">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<leak-ignore/> <leak-ignore/>
<arg nr="1"> <arg nr="1">
@ -330,7 +330,7 @@
</arg> </arg>
</function> </function>
<!-- int fesetenv(const fenv_t* envp); --> <!-- int fesetenv(const fenv_t* envp); -->
<function name="fesetenv,std::fesetenv"> <function name="fesetenv">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<leak-ignore/> <leak-ignore/>
<arg nr="1"> <arg nr="1">
@ -339,7 +339,7 @@
</arg> </arg>
</function> </function>
<!-- int fesetexceptflag(const fexcept_t* flagp, int excepts); --> <!-- int fesetexceptflag(const fexcept_t* flagp, int excepts); -->
<function name="fesetexceptflag,std::fesetexceptflag"> <function name="fesetexceptflag">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<leak-ignore/> <leak-ignore/>
<arg nr="1"> <arg nr="1">
@ -351,7 +351,7 @@
</arg> </arg>
</function> </function>
<!-- int fesetround(int rdir); --> <!-- int fesetround(int rdir); -->
<function name="fesetround,std::fesetround"> <function name="fesetround">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<leak-ignore/> <leak-ignore/>
<arg nr="1"> <arg nr="1">
@ -359,7 +359,7 @@
</arg> </arg>
</function> </function>
<!-- int fetestexcept(int excepts); --> <!-- int fetestexcept(int excepts); -->
<function name="fetestexcept,std::fetestexcept"> <function name="fetestexcept">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<leak-ignore/> <leak-ignore/>
<arg nr="1"> <arg nr="1">
@ -367,7 +367,7 @@
</arg> </arg>
</function> </function>
<!-- int feupdateenv(const fenv_t* envp); --> <!-- int feupdateenv(const fenv_t* envp); -->
<function name="feupdateenv,std::feupdateenv"> <function name="feupdateenv">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<leak-ignore/> <leak-ignore/>
<arg nr="1"> <arg nr="1">
@ -378,7 +378,7 @@
<!-- double atan(double x); --> <!-- double atan(double x); -->
<!-- float atanf(float x); --> <!-- float atanf(float x); -->
<!-- long double atanl(long double x); --> <!-- long double atanl(long double x); -->
<function name="atan,atanf,atanl"> <function name="atan,std::atan,atanf,atanl">
<use-retval/> <use-retval/>
<pure/> <pure/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -402,7 +402,7 @@
<!-- double tgamma(double x); --> <!-- double tgamma(double x); -->
<!-- float tgammaf(float x); --> <!-- float tgammaf(float x); -->
<!-- long double tgammal(long double x); --> <!-- long double tgammal(long double x); -->
<function name="tgamma,tgammaf,tgammal"> <function name="tgamma,std::tgamma,tgammaf,tgammal">
<use-retval/> <use-retval/>
<pure/> <pure/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -414,7 +414,7 @@
<!-- double trunc(double x); --> <!-- double trunc(double x); -->
<!-- float truncf(float x); --> <!-- float truncf(float x); -->
<!-- long double truncl(long double x); --> <!-- long double truncl(long double x); -->
<function name="trunc,truncf,truncl"> <function name="trunc,std::trunc,truncf,truncl">
<use-retval/> <use-retval/>
<pure/> <pure/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -426,7 +426,7 @@
<!-- double atanh(double x); --> <!-- double atanh(double x); -->
<!-- float atanhf(float x); --> <!-- float atanhf(float x); -->
<!-- long double atanhl(long double x); --> <!-- long double atanhl(long double x); -->
<function name="atanh,atanhf,atanhl"> <function name="atanh,std::atanh,atanhf,atanhl">
<use-retval/> <use-retval/>
<pure/> <pure/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -450,7 +450,7 @@
<!-- double atan2(double x, double y); --> <!-- double atan2(double x, double y); -->
<!-- float atan2f(float x, float y); --> <!-- float atan2f(float x, float y); -->
<!-- long double atan2l(long double x, long double y); --> <!-- long double atan2l(long double x, long double y); -->
<function name="atan2,atan2f,atan2l"> <function name="atan2,std::atan2,atan2f,atan2l">
<use-retval/> <use-retval/>
<pure/> <pure/>
<noreturn>false</noreturn> <noreturn>false</noreturn>

View File

@ -638,6 +638,161 @@ void uninitvar_feclearexcept(void)
feclearexcept(i); feclearexcept(i);
} }
void uninitvar_fegetexceptflag(fexcept_t* flagp)
{
int excepts;
// cppcheck-suppress uninitvar
(void)fegetexceptflag(flagp, excepts);
}
void uninitvar_feraiseexcept(void)
{
int excepts;
// cppcheck-suppress uninitvar
(void)feraiseexcept(excepts);
}
void uninitvar_fesetenv(void)
{
fenv_t* envp;
// cppcheck-suppress uninitvar
(void)fesetenv(envp);
}
void uninitvar_fesetexceptflag(void)
{
fexcept_t* flagp;
int excepts;
// cppcheck-suppress uninitvar
(void)fesetexceptflag(flagp, excepts);
}
void uninitvar_fesetround(void)
{
int i;
// cppcheck-suppress uninitvar
(void)fesetround(i);
}
void uninitvar_fetestexcept(void)
{
int i;
// cppcheck-suppress uninitvar
(void)fetestexcept(i);
}
void uninitvar_feupdateenv(void)
{
fenv_t* envp;
// cppcheck-suppress uninitvar
(void)feupdateenv(envp);
}
void uninitvar_atan(void)
{
float f;
// cppcheck-suppress uninitvar
(void)atanf(f);
double d;
// cppcheck-suppress uninitvar
(void)atan(d);
long double ld;
// cppcheck-suppress uninitvar
(void)atanl(ld);
}
void uninitvar_catan(void)
{
float complex fd;
// cppcheck-suppress uninitvar
(void)catanf(fd);
double complex dc;
// cppcheck-suppress uninitvar
(void)catan(dc);
long double complex ldc;
// cppcheck-suppress uninitvar
(void)catanl(ldc);
}
void uninitvar_tgamma(void)
{
float f;
// cppcheck-suppress uninitvar
(void)tgammaf(f);
double d;
// cppcheck-suppress uninitvar
(void)tgamma(d);
long double ld;
// cppcheck-suppress uninitvar
(void)tgammal(ld);
}
void uninitvar_trunc(void)
{
float f;
// cppcheck-suppress uninitvar
(void)truncf(f);
double d;
// cppcheck-suppress uninitvar
(void)trunc(d);
long double ld;
// cppcheck-suppress uninitvar
(void)truncl(ld);
}
void uninitvar_atanh(void)
{
float f;
// cppcheck-suppress uninitvar
(void)atanhf(f);
double d;
// cppcheck-suppress uninitvar
(void)atanh(d);
long double ld;
// cppcheck-suppress uninitvar
(void)atanhl(ld);
}
void uninitvar_catanh(void)
{
float complex fd;
// cppcheck-suppress uninitvar
(void)catanhf(fd);
double complex dc;
// cppcheck-suppress uninitvar
(void)catanh(dc);
long double complex ldc;
// cppcheck-suppress uninitvar
(void)catanhl(ldc);
}
void uninitvar_atan2(void)
{
float f1,f2;
// cppcheck-suppress uninitvar
(void)atan2f(f1,f2);
double d1,d2;
// cppcheck-suppress uninitvar
(void)atan2(d1,d2);
long double ld1,ld2;
// cppcheck-suppress uninitvar
(void)atan2l(ld1,ld2);
}
void ignoreretrn(void) void ignoreretrn(void)
{ {
char szNumbers[] = "2001 60c0c0 -1101110100110100100000 0x6fffff"; char szNumbers[] = "2001 60c0c0 -1101110100110100100000 0x6fffff";

View File

@ -266,3 +266,78 @@ void uninitvar_tanh(void)
// cppcheck-suppress uninitvar // cppcheck-suppress uninitvar
(void)std::tanh(ld); (void)std::tanh(ld);
} }
void uninitvar_atan(void)
{
float f;
// cppcheck-suppress uninitvar
(void)std::atan(f);
double d;
// cppcheck-suppress uninitvar
(void)std::atan(d);
long double ld;
// cppcheck-suppress uninitvar
(void)std::atan(ld);
}
void uninitvar_tgamma(void)
{
float f;
// cppcheck-suppress uninitvar
(void)std::tgamma(f);
double d;
// cppcheck-suppress uninitvar
(void)std::tgamma(d);
long double ld;
// cppcheck-suppress uninitvar
(void)std::tgamma(ld);
}
void uninitvar_trunc(void)
{
float f;
// cppcheck-suppress uninitvar
(void)std::trunc(f);
double d;
// cppcheck-suppress uninitvar
(void)std::trunc(d);
long double ld;
// cppcheck-suppress uninitvar
(void)std::trunc(ld);
}
void uninitvar_atanh(void)
{
float f;
// cppcheck-suppress uninitvar
(void)std::atanh(f);
double d;
// cppcheck-suppress uninitvar
(void)std::atanh(d);
long double ld;
// cppcheck-suppress uninitvar
(void)std::atanh(ld);
}
void uninitvar_atan2(void)
{
float f1,f2;
// cppcheck-suppress uninitvar
(void)std::atan2(f1,f2);
double d1,d2;
// cppcheck-suppress uninitvar
(void)std::atan2(d1,d2);
long double ld1,ld2;
// cppcheck-suppress uninitvar
(void)std::atan2(ld1,ld2);
}