CPP, 2727 25
main=print({-/*-}1{-*/-})
Prints ()
for -XCPP
and 1
for -XNoCPP
Previous version:
main=print[1{-/*-},2{-*/-}]
Prints [1]
with -XCPP
and [1,2]
otherwise.
Credits: This is inspired by Laikoni's answer, but instead of a #define
it simply uses C comments.