void foo(int* arr); int main() { using array = int[5]; foo((array{1, 2, 3, 4, 5})); } Gives an error: <source>: In function 'int main()': <source>:6:31: error: taking address of temporary array Problem occurs on all GCC versions 4.7.1 up.
Dup of bug 94264. *** This bug has been marked as a duplicate of bug 94264 ***