The Cosmic compiler uses the + operator to calculate offsets into arrays. For the CodeWarrior compiler, use a colon (:) instead:
ldx array:7 #else ldx array+7 #endif