From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 25 Jun 2010 17:50:55 -0700 Message-ID: From: Christopher Nielsen To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=0016367d5e60b437810489e4472a Subject: Re: [9fans] comment and newline in define Topicbox-Message-UUID: 36fcb394-ead6-11e9-9d60-3106f5b1d025 --0016367d5e60b437810489e4472a Content-Type: text/plain; charset=UTF-8 The [568]c compilers in the Go tree are based on the Inferno/Plan 9 compilers. Did something change? On Jun 25, 2010 8:47 AM, wrote: In /sys/src/cmd/cc/macbody:298,301 if(c == '\n') { yyerror("comment and newline in define: %s", s->name); break; } suggests that all "C" compilers explictly forbid newlines within comments when a macro is #defined. At a glance, I'd say that removing the above will eliminate what to me seems an anachronism. Am I overlooking something? The Go toolchain code unsurprisingly uses multiline comments in src/cmd/ld/elf.h and I'm loath to request the Go Authors to hack their header file for a non-standard feature of the Plan 9 compilers. I concede that the header in question would benefit, aesthetically, from having those comments adjusted. ++L --0016367d5e60b437810489e4472a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

The [568]c compilers in the Go tree are based on the Inferno/Plan 9 comp= ilers. Did something change?

On Jun 25, 2010 8:47 AM, <lucio@proxima.alt.za> wrote:

In /sys/= src/cmd/cc/macbody:298,301

=C2=A0 =C2=A0 =C2=A0 =C2=A0if(c =3D=3D '\n') {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0yyerror("comme= nt and newline in define: %s", s->name);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0break;
=C2=A0 =C2=A0 =C2=A0 =C2=A0}

suggests that all "C" compilers explictly forbid newlines within<= br> comments when a macro is #defined. =C2=A0At a glance, I'd say that remo= ving
the above will eliminate what to me seems an anachronism. =C2=A0Am I
overlooking something?

The Go toolchain code unsurprisingly uses multiline comments in
src/cmd/ld/elf.h and I'm loath to request the Go Authors to hack their<= br> header file for a non-standard feature of the Plan 9 compilers. =C2=A0I
concede that the header in question would benefit, aesthetically, from
having those comments adjusted.

++L


--0016367d5e60b437810489e4472a--