Geoff
Given the code
#if defined(UBRRH) || defined(UBRR0H)
extern HardwareSerial Serial;
#elif defined(USBCON)
#include "usb_api.h"
#endif
#if defined(UBRR1H)
extern HardwareSerial Serial1;
#endif
#if defined(UBRR2H)
extern HardwareSerial Serial2;
#endif
#if defined(UBRR3H)
extern HardwareSerial Serial3;
#endif
It is very likely it won't hurt.
However you are missing something in your eclipse environment which will cause issues later.
Look at your console window in eclipse after a build. My plugin (eclipse.baeyens.it) provided following output when compiling the file ddd.cpp
avr-g++ -I"C:\arduino-0023\arduino-0023\hardware\arduino\cores\arduino" -D__IN_ECLIPSE__=1 -DARDUINO=0023 -Wall -Os -ffunction-sections -fdata-sections -fno-exceptions -g -mmcu=atmega328p -DF_CPU=16000000UL -MMD -MP -MF"ddd.d" -MT"ddd.d" -c -o "ddd.o" -x c++ "../ddd.cpp"
not all of the options are equally important. Following items may be missing or wrong in your case:
-Os -ffunction-sections -fdata-sections -fno-exceptions -g -mmcu=atmega328p -DF_CPU=16000000UL
I'm pretty sure you are missing the -mmcu=XXXX option as this defines the __AVR_ATmegaXXXXX which on his turn defines UBRRH or UBRR0H or USBCON which defines Serial.
Best regards
Jantje