So basically the following function would always return 1 on Linux.
int funct(const int param = 1)
{
return param;
}
I think it is because the compiler is doing some optimization.
Or may be it was a similar case ... Does someone know in which
situation this would happen ?
It can only happen if you have a seriously broken compiler.
And it seems unlikely that g++ has had such a bug in the last decade,
although perhaps a superficially similar case could have.
Why are you asking, by the way? Are you really trying to ask about
something else, such as whether Linux is a useful platform, or g++ a
useful compiler?
/Jorgen