I tried the following code:
int main()
{
int x {23.22};
}
which includes an initialization that requires narrowing, but the code compiles fine without any error or warning. On the other hand, the following code gives error:
int main()
{
int x[]{23.22};
}
Have I found a bug or what?
PS: I'm currently using GCC 4.5.0