http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53220
superaxioma at hotmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |superaxioma at hotmail dot | |com --- Comment #20 from superaxioma at hotmail dot com 2013-05-01 09:54:43 UTC --- (In reply to comment #18) > #include <stdio.h> > > void fn(int arr[]) > { > for (int j = 0; j < 5; ++j) > printf("%d: %d\n", j, arr[j]); > } > > int main() > { > fn((int[]) { 41, 42, 43, 44, 45 } ); > return 0; > } > > g++ -c t.cc > t.cc: In function ‘int main()’: > t.cc:11:37: error: taking address of temporary array > fn((int[]) { 41, 42, 43, 44, 45 } ); I wrote some code which compiled perfectly using gcc 4.7. However, now I am using gcc 4.8 and I am encountering exactly the problem mentioned by Paul. Will this be solved or should I look for another solution to overcome this problem? Any suggestions?