Re:Const and Optimization in C
by arm85 on Monday July 25, 2016 @07:21AM
(#12157862)
"void foo(const int * );"
"The function foo takes a const pointer".
I thought foo was taking a pointer a constant, where the pointer itself could change. This may seem pedantic, but perhaps the optimization he expected would have worked if foo took "const int * const ".
"The function foo takes a const pointer".
I thought foo was taking a pointer a constant, where the pointer itself could change. This may seem pedantic, but perhaps the optimization he expected would have worked if foo took "const int * const ".