5.1.2.4 Const Auto Objects

If a Baseline or Mid-range device is selected, any auto objects that are specified as const are treated as if they were also specified static. This does not affect the scope of the object, but does imply that its value will be stored in program memory and any initializer assigned to the variable when it is defined must be a constant expression.

This limitation does not affect projects using PIC18 devices, since const auto objects with these devices are stored in data memory.