From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Date: Fri, 4 Jan 2008 10:41:25 +1100 Subject: [U-Boot-Users] /* inside comment in libfdt.h In-Reply-To: <477D3BBF.9020301@ge.com> References: <200801021347.01153.matthias.fuchs@esd-electronics.com> <477B8DE6.5060501@ge.com> <1199388486.15929.24.camel@ld0161-tx32> <477D3BBF.9020301@ge.com> Message-ID: <20080103234125.GC12883@localhost.localdomain> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Jan 03, 2008 at 02:47:11PM -0500, Jerry Van Baren wrote: > Jon Loeliger wrote: >> On Wed, 2008-01-02 at 07:13, Jerry Van Baren wrote: >> Oh man.... >> OK. For the record, I'm all for only comments like this: >> /* >> * >> */ >> Clearly lax, I'll start enforcing it on the DTC sources more. >> Sorry. >> jdl > > FWIIW, the misdeed was the sample code embedded inside the comment had a > (sample) commented line "// add code here" which was done with a C++ // > comment so that it didn't run afoul of the C compiler's no nested comments > rule. A certain dignitary who breaks out in a rash when he sees // > comments made a "trivial" change to a /* */ comment, which then caused the > C compiler to throw a hissy fit because it now *was* a nested comment. > > All in all, a comedy of good intentions. No Code Was Harmed(R) in the > making of this patch sequence. Oh dear. Yes, I believe those '//' were deliberate to avoid nested comments. Think of them as pseudo-code, not C++ if that makes it any more palatable. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson