[Bug preprocessor/48865] It would be useful to have a way to check the value of a #define at preprocessing time

bero at arklinux dot org gcc-bugzilla@gcc.gnu.org
Wed May 4 11:16:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48865

--- Comment #2 from bero at arklinux dot org 2011-05-04 11:16:01 UTC ---
It does - if you know how to read it.

It's easy to tell a student who has never used a compiler outside of an IDE how
to add a #warning -- teaching him how to read the output of -E -dD is quite a
bit harder and might trigger the old "Linux is hard, give me my Vi$ual $tudio"
myth.

Even for someone who does know how to read -E -dD, I think sometimes the "easy"
way could be quicker sometimes (especially locating the relevant place in
pieces of code that are so full of macros that the output doesn't bear much
resemblance to the original).



More information about the Gcc-bugs mailing list