This has been dicussed earlier but apparently it hasn't been implemented by anyone. For plain #ifdefs and #if constant()s, all that's needed is the ability to get a list from the preprocessor which defines/constants it has tested on, and the dumper can encode this list (together with the current defined/undefined status for each) and it can be tested when loading the dumped file if any of them have changed their status. For more complex #if expressions, it might become a bit more hair, but I think a conservative approach would be to use the dumped file iff all macros that are expanded in the source code still has the exact same value, and all the constants that are tested still have the same constant/non-constant status.
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2003-10-22 14:08: Subject: Defines and dumped modules
Ah, naturally. Dumping some dependency info too and disregarding the dumped version when run under different conditions would be nice.
/ Johan Sundström, Lysator