[U-Boot-Users] /* inside comment in libfdt.h
David Gibson
david at gibson.dropbear.id.au
Fri Jan 4 00:41:25 CET 2008
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
More information about the U-Boot
mailing list