9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] comment and newline in define
@ 2010-06-25 15:35 lucio
       [not found] ` <AANLkTilhVWAu8htoIL903rtMK1z9Sw88pSfEASawc5Xi@mail.gmail.com>
  0 siblings, 1 reply; 32+ messages in thread
From: lucio @ 2010-06-25 15:35 UTC (permalink / raw)
  To: 9fans

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




^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2010-06-30  9:25 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-25 15:35 [9fans] comment and newline in define lucio
     [not found] ` <AANLkTilhVWAu8htoIL903rtMK1z9Sw88pSfEASawc5Xi@mail.gmail.com>
2010-06-26  0:50   ` Christopher Nielsen
2010-06-26  0:58     ` erik quanstrom
2010-06-26  4:18       ` Rob Pike
2010-06-26  6:15         ` Christopher Nielsen
2010-06-26  5:19     ` [9fans] Go/Inferno toolchain (Was: comment and newline in define) lucio
2010-06-26  6:46       ` Christopher Nielsen
2010-06-26  9:26         ` [9fans] Go/Inferno toolchain (Was: comment and newline in lucio
2010-06-26 10:34           ` erik quanstrom
2010-06-26 11:00             ` lucio
2010-06-28 22:03           ` Eric Van Hensbergen
2010-06-29 17:24             ` Rob Pike
2010-06-29 17:31               ` Devon H. O'Dell
2010-06-29 17:36               ` Francisco J Ballesteros
2010-06-29 17:48                 ` Francisco J Ballesteros
2010-06-29 18:02                   ` Jack Johnson
2010-06-29 18:10               ` Eric Van Hensbergen
2010-06-29 18:12                 ` Francisco J Ballesteros
2010-06-29 20:30                   ` Eric Van Hensbergen
2010-06-29 18:32                 ` erik quanstrom
2010-06-29 20:45                   ` Eric Van Hensbergen
2010-06-29 20:52                     ` erik quanstrom
2010-06-29 21:03                       ` ron minnich
2010-06-29 21:36                         ` Steve Simon
2010-06-29 21:54                         ` Charles Forsyth
2010-06-30  9:25                           ` Lucio De Re
2010-06-29 22:35                         ` cinap_lenrek
2010-06-29 23:00                         ` Russ Cox
2010-06-30  8:17                           ` Lucio De Re
2010-06-29 21:15                       ` Devon H. O'Dell
2010-06-29 21:27                         ` ron minnich
2010-06-26  7:37       ` [9fans] Go/Inferno toolchain (Was: comment and newline in define) Ethan Grammatikidis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).