* [9fans] const if false
@ 2007-01-16 17:39 ron minnich
2007-01-16 18:02 ` Devon H. O'Dell
0 siblings, 1 reply; 4+ messages in thread
From: ron minnich @ 2007-01-16 17:39 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
it's on something like this:
if (A != 0 && keylen != A) {
}
gets an error 'const if false'
A is defined to zero. So, what do I care if 'const if false'. I did
not write this code ... but it's what they want, evidently.
ron
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] const if false
2007-01-16 17:39 [9fans] const if false ron minnich
@ 2007-01-16 18:02 ` Devon H. O'Dell
2007-01-16 18:19 ` Russ Cox
0 siblings, 1 reply; 4+ messages in thread
From: Devon H. O'Dell @ 2007-01-16 18:02 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
2007/1/16, ron minnich <rminnich@gmail.com>:
> it's on something like this:
>
> if (A != 0 && keylen != A) {
> }
>
>
> gets an error 'const if false'
>
> A is defined to zero. So, what do I care if 'const if false'. I did
> not write this code ... but it's what they want, evidently.
I guess because the first part of the if is always false, the if is
useless and it is telling you to fix `your' code.
--dho
> ron
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] const if false
2007-01-16 18:02 ` Devon H. O'Dell
@ 2007-01-16 18:19 ` Russ Cox
2007-01-16 18:32 ` ron minnich
0 siblings, 1 reply; 4+ messages in thread
From: Russ Cox @ 2007-01-16 18:19 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
It sounds like you are running 8c -c file.c
to compile file.c into an object file.
This is a typical Unix command line,
but on Plan 9 the compilers create object
files, not executables, by default, so
you can just say "8c file.c". Adding -c
just sets the 'c' flag, which causes the
compiler to print some more information
about control flow, in this case a print about
the const if false.
If you just run 8c file.c (or even 8c -w file.c),
you shouldn't see this message. If you still
see a message, please report exactly what it is.
Russ
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-01-16 18:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-16 17:39 [9fans] const if false ron minnich
2007-01-16 18:02 ` Devon H. O'Dell
2007-01-16 18:19 ` Russ Cox
2007-01-16 18:32 ` ron minnich
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).