From: Detlev Zundel Date: Mon, 24 Oct 2011 12:10:02 +0200 Subject: [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro In-Reply-To: <201110230017.34182.marek.vasut@gmail.com> (Marek Vasut's message of "Sun, 23 Oct 2011 00:17:33 +0200") References: <1319242654-15534-1-git-send-email-marek.vasut@gmail.com> <201110221619.55305.marek.vasut@gmail.com> <4EA2E008.4090209@aribaud.net> <201110230017.34182.marek.vasut@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Marek, [...] > So because noone actually bothered to compile u-boot with DEBUG enabled, we (me > ?) now have literally piles of places to fix. Hm :-( So it seems. This is a very good reminder of the fact that with ifdef we actually hide source code from the compiler under certain circumstances. The number of these "certain circumstances" produces the number of _differing input_ to our compiler. Given the trivial fact that a simple ifdef results in two different inputs one needs only to visualize the graph of 2^x to get an idea of how many sources we are actually using. Unrelated to your current efforts (that are greatly appreciated) We should really try not to use #ifdef at all. Using constants together with the dead code eliminatino of the compiler can usually reach the same goal but with syntax checks on every compile. Sorry, but I couldn't resist lobbying for this. Perhaps it helps when it gets repeated approximately every year ;) Cheers Detlev -- F?r jemanden, der in eine Religion geboren wurde, in der das Ringen um eine einzige Seele ein Stafettenlauf ?ber viele Jahrhunderte sein kann [..], hat das Tempo des Christentums etwas Schwindelerregendes. Wenn der Hinduismus friedlich dahinflie?t wie der Ganges, dann ist das Christentum Toronto in der Rushhour. -- Yann Martel -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de