order of evaluation

From: ASobol (sobol_at_mccme.ru)
Date: 02/15/05


Date: 15 Feb 2005 03:27:41 -0800


//code.begin()
#include <iostream>

int g (int i)
{
        static const int j = i;
        return j;
}

int main (int, char**)
{
        std::cout << g(0) << g(1) << g (2) << g(3);
        return 0;
}
//code.end()

Is output of this program undefined due to C++ standart?
Compilers i have access to (msvc 7.1 and gcc 3.3) both produce "3333"
output.

--Sasha