Hi Richard,
I tried the following very simple program
Code:
CMD VAR BYTE
CMD = SSPBUF
CMD = SSP1BUF
CMD = SSP2BUF
I compiled it for a couple of 18F devices, all with 2 MSSP modules. Some of them (like the 18F24J11, 18F44J50 and 18F46K22) worked fine while others didn't and gave a Bad Expression error on the CMD=SSPBUF. My conclusion is that Microchip isn't consistent in aliasing SSPBUF to SSP1BUF thru all their device header files :-(

I don't know a way of doing it automatically - that's not to say it can't be done though!
I'd probably use SSPBUF in the code and add a comment saying that if the compiler complains then add SSPBUF VAR SSP1BUF to the code. That's certainly not idiot proof but you do know that's an impossible thing to achieve ;-)

/Henrik.