http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54299
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-08-17 15:40:42 UTC --- I think the compiler's correct to reject the first example, the type of arr is int* so it's not an array, and so the for loop calls begin(arr) and end(arr) In the second example the parameter type is int(*)[10] so arr[0] is an array of known bound, and so the for loop works.