From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Thu, 03 Jan 2008 14:47:11 -0500 Subject: [U-Boot-Users] /* inside comment in libfdt.h In-Reply-To: <1199388486.15929.24.camel@ld0161-tx32> References: <200801021347.01153.matthias.fuchs@esd-electronics.com> <477B8DE6.5060501@ge.com> <1199388486.15929.24.camel@ld0161-tx32> Message-ID: <477D3BBF.9020301@ge.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Jon Loeliger wrote: > On Wed, 2008-01-02 at 07:13, Jerry Van Baren wrote: > >> Yes, nested comments is something that should not be done and should be >> fixed. This was inherited from the original code, although the current >> version uses // for the embedded comment which avoids the issue (but >> causes "no C++ comments" people to break out in rashes). >> >> > > Woah, hey! That's me! > > Uh... Stop. Take a deep breath. It really wasn't you, just had your fingerprints because you touched it last. I referenced your repository as the convenient/canonical repository for dtc/libfdt. [snip] > 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. HTH, gvb (R) P.S. :-D, but you knew that already.