From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Sun, 23 Oct 2011 10:35:37 +0200 Subject: [U-Boot] [RESEND PATCH v3] Add assert() for debug assertions In-Reply-To: References: <1315434680-21641-1-git-send-email-sjg@chromium.org> <20111021222026.4F3FA18AE81D@gemini.denx.de> Message-ID: <20111023083537.2DD1A18AE823@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Simon Glass, In message you wrote: > > > Can you please #ifdef it so it doesn't get added for the non-debug > > case, too? > > Well I could, but then if someone defines DEBUG in a file they will > get a link error I think. Or are you thinking of adding a new CONFIG > which *permits* people to use DEBUG? I don't understand what you mean. __assert_fail() only ever gets used (and thus needs to be compiled in) if DEBUG is defined, right? SO why cannot you wrap the code in a "#ifdef DEBUG" ? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "There's only one kind of woman ..." "Or man, for that matter. You either believe in yourself or you don't." -- Kirk and Harry Mudd, "Mudd's Women", stardate 1330.1