The ANSI-C language does clearly separate the preprocessing from the C language parsing. The sizeof (types, stucts, variables, functions, enums,...) elements are all parts of the C language, during preprocessing they are identifiers like any other too.
I know some compilers (gnu and others) do support to use some features like sizeof in the preprocessor as language extension, but this extension is not available in CW for HC12 V4.5.
I don't have a really clean solution for you, but at least a solution. The point is that you can cause the compiler to generate an error both a preprocess time, as you tried, or at "compile" (say C parsing) time. During the parsing, things like sizeof are known. The reason why it is not so clean is that there is no equivalent to the preprocessor #error directive, so I'm usually "abusing" some other condition in the language to get the compile time test.
A example, to give an idea.
extern char TestCondition[2];
#define COMPILE_TIME_CHECK(cond) extern char TestCondition[(cond)+1];
COMPILE_TIME_CHECK(sizeof(int) == 3);
downside: using some other error message, unless you look at the location from where the error happens, the message maybe confusing.
upside: it's the ANSI-C compliant version.
Daniel