In file included from /nix/gcc-13.2.0/include/c++/13.2.0/algorithm:61,
from stdc++.h:51:
In function ‘void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<greater<int> >]’,
inlined from ‘void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int*; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<greater<int> >]’ at /nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_algo.h:1950:31,
inlined from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = int*; _Compare = greater<int>]’ at /nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_algo.h:4894:18,
inlined from ‘int main()’ at foo.cc:9:6:
/nix/gcc-13.2.0/include/c++/13.2.0/bits/stl_algo.h:1859:32: warning: array subscript 17 is outside array bounds of ‘int [15]’ [-Warray-bounds=]
1859 | std::__insertion_sort(__first, __first + int(_S_threshold), __comp);
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc: In function ‘int main()’:
foo.cc:3:7: note: at offset 68 into object ‘a’ of size 60
3 | int n,a[15];
| ^