9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] comments on c compiler flags
       [not found] <<278ec94331e39babcb3f59657516365e@proxima.alt.za>
@ 2009-12-22  5:31 ` erik quanstrom
  0 siblings, 0 replies; 6+ messages in thread
From: erik quanstrom @ 2009-12-22  5:31 UTC (permalink / raw)
  To: lucio, 9fans

On Tue Dec 22 00:20:35 EST 2009, lucio@proxima.alt.za wrote:
> > i hadn't thought about it before.  why aren't FVTw on by default?
> > is this a historical accident?
>
> They are, in /sys/src/mkfile.proto.  Is that really such a burden?

on the other hand, it is exactly code compiled by hand that is most
in need of these flags.  and why should i have to look at
"8c -FVTw yuk.c"?  flags are supposed to be non-defaults and should
stand out.  i'll admit i just ignore cflags.  it's hard to notice if they're
wrong.

- erik



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

* Re: [9fans] comments on c compiler flags
  2009-12-22 16:59   ` erik quanstrom
@ 2009-12-22 17:49     ` Russ Cox
  0 siblings, 0 replies; 6+ messages in thread
From: Russ Cox @ 2009-12-22 17:49 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> the tradition of c is that old programs may
> no longer compile without options.

that's not the tradition i've observed.


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

* Re: [9fans] comments on c compiler flags
  2009-12-22 16:41 ` Russ Cox
@ 2009-12-22 16:59   ` erik quanstrom
  2009-12-22 17:49     ` Russ Cox
  0 siblings, 1 reply; 6+ messages in thread
From: erik quanstrom @ 2009-12-22 16:59 UTC (permalink / raw)
  To: 9fans

> i think you could make that argument, but
> it's probably not worth changing now.
> a large part of the problem is that most
> of those flags (not w) turn on errors, not
> warnings, so making them the default
> would reject once-valid c programs.
>
> this is one thing that we tried to get right
> in go - 8g has no warnings, only errors,
> as far as possible they're mandated by
> the language spec, and there are no options
> to turn them off.  as rob likes to say,
> if it's worth warning about, it's worth fixing.

the tradition of c is that old programs may
no longer compile without options.  i wonder
how much of 1e would currently compile.
perhaps this is a bad tradition, but it's what
we've got.  and i think that rob's comment may
equally apply to old code and old languages.

- erik



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

* Re: [9fans] comments on c compiler flags
  2009-12-22  4:52 erik quanstrom
  2009-12-22  5:16 ` lucio
@ 2009-12-22 16:41 ` Russ Cox
  2009-12-22 16:59   ` erik quanstrom
  1 sibling, 1 reply; 6+ messages in thread
From: Russ Cox @ 2009-12-22 16:41 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> i hadn't thought about it before.  why aren't FVTw on by default?
> is this a historical accident?

i think you could make that argument, but
it's probably not worth changing now.
a large part of the problem is that most
of those flags (not w) turn on errors, not
warnings, so making them the default
would reject once-valid c programs.

this is one thing that we tried to get right
in go - 8g has no warnings, only errors,
as far as possible they're mandated by
the language spec, and there are no options
to turn them off.  as rob likes to say,
if it's worth warning about, it's worth fixing.

russ


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

* Re: [9fans] comments on c compiler flags
  2009-12-22  4:52 erik quanstrom
@ 2009-12-22  5:16 ` lucio
  2009-12-22 16:41 ` Russ Cox
  1 sibling, 0 replies; 6+ messages in thread
From: lucio @ 2009-12-22  5:16 UTC (permalink / raw)
  To: 9fans

> i hadn't thought about it before.  why aren't FVTw on by default?
> is this a historical accident?

They are, in /sys/src/mkfile.proto.  Is that really such a burden?

++L




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

* [9fans] comments on c compiler flags
@ 2009-12-22  4:52 erik quanstrom
  2009-12-22  5:16 ` lucio
  2009-12-22 16:41 ` Russ Cox
  0 siblings, 2 replies; 6+ messages in thread
From: erik quanstrom @ 2009-12-22  4:52 UTC (permalink / raw)
  To: 9fans

i got this response when pointing out the standard flags to
?c:

> Thanks!  It is crazy, I think, that folks should have to work
> so hard to get help from the compiler.  It should be an option
> to turn those helpful features off, especially since turning
> them off only makes sense for non-interactive use, [...]

i hadn't thought about it before.  why aren't FVTw on by default?
is this a historical accident?

- erik



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

end of thread, other threads:[~2009-12-22 17:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <<278ec94331e39babcb3f59657516365e@proxima.alt.za>
2009-12-22  5:31 ` [9fans] comments on c compiler flags erik quanstrom
2009-12-22  4:52 erik quanstrom
2009-12-22  5:16 ` lucio
2009-12-22 16:41 ` Russ Cox
2009-12-22 16:59   ` erik quanstrom
2009-12-22 17:49     ` Russ Cox

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).