Returning a structure without any temporary variable



Hi folks,

Is the following code standard ? (which one ?)

typedef struct my_t {
double d;
unsigned long long l;
} my_t;

void my_t getOne() {
return (my_t) { 1.0 };
}

My feeling is that the code might be correct in C99, but not in C89.
.